Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1 | // <auto-generated> |
| 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | // source: unittest_proto3.proto |
| 4 | // </auto-generated> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5 | #pragma warning disable 1591, 0612, 3021 |
| 6 | #region Designer generated code |
| 7 | |
| 8 | using pb = global::Google.Protobuf; |
| 9 | using pbc = global::Google.Protobuf.Collections; |
| 10 | using pbr = global::Google.Protobuf.Reflection; |
| 11 | using scg = global::System.Collections.Generic; |
| 12 | namespace Google.Protobuf.TestProtos { |
| 13 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 14 | /// <summary>Holder for reflection information generated from unittest_proto3.proto</summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 15 | public static partial class UnittestProto3Reflection { |
| 16 | |
| 17 | #region Descriptor |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 18 | /// <summary>File descriptor for unittest_proto3.proto</summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 19 | public static pbr::FileDescriptor Descriptor { |
| 20 | get { return descriptor; } |
| 21 | } |
| 22 | private static pbr::FileDescriptor descriptor; |
| 23 | |
| 24 | static UnittestProto3Reflection() { |
| 25 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 26 | string.Concat( |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 27 | "ChV1bml0dGVzdF9wcm90bzMucHJvdG8SEnByb3RvYnVmX3VuaXR0ZXN0Mxoc", |
| 28 | "dW5pdHRlc3RfaW1wb3J0X3Byb3RvMy5wcm90byL5DwoMVGVzdEFsbFR5cGVz", |
| 29 | "EhQKDHNpbmdsZV9pbnQzMhgBIAEoBRIUCgxzaW5nbGVfaW50NjQYAiABKAMS", |
| 30 | "FQoNc2luZ2xlX3VpbnQzMhgDIAEoDRIVCg1zaW5nbGVfdWludDY0GAQgASgE", |
| 31 | "EhUKDXNpbmdsZV9zaW50MzIYBSABKBESFQoNc2luZ2xlX3NpbnQ2NBgGIAEo", |
| 32 | "EhIWCg5zaW5nbGVfZml4ZWQzMhgHIAEoBxIWCg5zaW5nbGVfZml4ZWQ2NBgI", |
| 33 | "IAEoBhIXCg9zaW5nbGVfc2ZpeGVkMzIYCSABKA8SFwoPc2luZ2xlX3NmaXhl", |
| 34 | "ZDY0GAogASgQEhQKDHNpbmdsZV9mbG9hdBgLIAEoAhIVCg1zaW5nbGVfZG91", |
| 35 | "YmxlGAwgASgBEhMKC3NpbmdsZV9ib29sGA0gASgIEhUKDXNpbmdsZV9zdHJp", |
| 36 | "bmcYDiABKAkSFAoMc2luZ2xlX2J5dGVzGA8gASgMEk0KFXNpbmdsZV9uZXN0", |
| 37 | "ZWRfbWVzc2FnZRgSIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxs", |
| 38 | "VHlwZXMuTmVzdGVkTWVzc2FnZRJCChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdl", |
| 39 | "GBMgASgLMiIucHJvdG9idWZfdW5pdHRlc3QzLkZvcmVpZ25NZXNzYWdlEkYK", |
| 40 | "FXNpbmdsZV9pbXBvcnRfbWVzc2FnZRgUIAEoCzInLnByb3RvYnVmX3VuaXR0", |
| 41 | "ZXN0X2ltcG9ydC5JbXBvcnRNZXNzYWdlEkcKEnNpbmdsZV9uZXN0ZWRfZW51", |
| 42 | "bRgVIAEoDjIrLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVz", |
| 43 | "dGVkRW51bRI8ChNzaW5nbGVfZm9yZWlnbl9lbnVtGBYgASgOMh8ucHJvdG9i", |
| 44 | "dWZfdW5pdHRlc3QzLkZvcmVpZ25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51", |
| 45 | "bRgXIAEoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVt", |
| 46 | "ElMKHHNpbmdsZV9wdWJsaWNfaW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90", |
| 47 | "b2J1Zl91bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5y", |
| 48 | "ZXBlYXRlZF9pbnQzMhgfIAMoBRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIX", |
| 49 | "Cg9yZXBlYXRlZF91aW50MzIYISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIg", |
| 50 | "AygEEhcKD3JlcGVhdGVkX3NpbnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50", |
| 51 | "NjQYJCADKBISGAoQcmVwZWF0ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRl", |
| 52 | "ZF9maXhlZDY0GCYgAygGEhkKEXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkK", |
| 53 | "EXJlcGVhdGVkX3NmaXhlZDY0GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkg", |
| 54 | "AygCEhcKD3JlcGVhdGVkX2RvdWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29s", |
| 55 | "GCsgAygIEhcKD3JlcGVhdGVkX3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9i", |
| 56 | "eXRlcxgtIAMoDBJPChdyZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzIu", |
| 57 | "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn", |
| 58 | "ZRJEChhyZXBlYXRlZF9mb3JlaWduX21lc3NhZ2UYMSADKAsyIi5wcm90b2J1", |
| 59 | "Zl91bml0dGVzdDMuRm9yZWlnbk1lc3NhZ2USSAoXcmVwZWF0ZWRfaW1wb3J0", |
| 60 | "X21lc3NhZ2UYMiADKAsyJy5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1w", |
| 61 | "b3J0TWVzc2FnZRJJChRyZXBlYXRlZF9uZXN0ZWRfZW51bRgzIAMoDjIrLnBy", |
| 62 | "b3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkRW51bRI+ChVy", |
| 63 | "ZXBlYXRlZF9mb3JlaWduX2VudW0YNCADKA4yHy5wcm90b2J1Zl91bml0dGVz", |
| 64 | "dDMuRm9yZWlnbkVudW0SQgoUcmVwZWF0ZWRfaW1wb3J0X2VudW0YNSADKA4y", |
| 65 | "JC5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0RW51bRJVCh5yZXBl", |
| 66 | "YXRlZF9wdWJsaWNfaW1wb3J0X21lc3NhZ2UYNiADKAsyLS5wcm90b2J1Zl91", |
| 67 | "bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCgxvbmVvZl91", |
| 68 | "aW50MzIYbyABKA1IABJOChRvbmVvZl9uZXN0ZWRfbWVzc2FnZRhwIAEoCzIu", |
| 69 | "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn", |
| 70 | "ZUgAEhYKDG9uZW9mX3N0cmluZxhxIAEoCUgAEhUKC29uZW9mX2J5dGVzGHIg", |
| 71 | "ASgMSAAaGwoNTmVzdGVkTWVzc2FnZRIKCgJiYhgBIAEoBSJWCgpOZXN0ZWRF", |
| 72 | "bnVtEhsKF05FU1RFRF9FTlVNX1VOU1BFQ0lGSUVEEAASBwoDRk9PEAESBwoD", |
| 73 | "QkFSEAISBwoDQkFaEAMSEAoDTkVHEP///////////wFCDQoLb25lb2ZfZmll", |
| 74 | "bGQivgEKEk5lc3RlZFRlc3RBbGxUeXBlcxI1CgVjaGlsZBgBIAEoCzImLnBy", |
| 75 | "b3RvYnVmX3VuaXR0ZXN0My5OZXN0ZWRUZXN0QWxsVHlwZXMSMQoHcGF5bG9h", |
| 76 | "ZBgCIAEoCzIgLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMSPgoO", |
| 77 | "cmVwZWF0ZWRfY2hpbGQYAyADKAsyJi5wcm90b2J1Zl91bml0dGVzdDMuTmVz", |
| 78 | "dGVkVGVzdEFsbFR5cGVzIjQKFFRlc3REZXByZWNhdGVkRmllbGRzEhwKEGRl", |
| 79 | "cHJlY2F0ZWRfaW50MzIYASABKAVCAhgBIhsKDkZvcmVpZ25NZXNzYWdlEgkK", |
| 80 | "AWMYASABKAUiMAoSVGVzdFJlc2VydmVkRmllbGRzSgQIAhADSgQIDxAQSgQI", |
| 81 | "CRAMUgNiYXJSA2JheiJbChFUZXN0Rm9yZWlnbk5lc3RlZBJGCg5mb3JlaWdu", |
| 82 | "X25lc3RlZBgBIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlw", |
| 83 | "ZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVhbGx5TGFyZ2VUYWdOdW1iZXIS", |
| 84 | "CQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJWChRUZXN0UmVjdXJzaXZlTWVz", |
| 85 | "c2FnZRIzCgFhGAEgASgLMigucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RSZWN1", |
| 86 | "cnNpdmVNZXNzYWdlEgkKAWkYAiABKAUiTAoUVGVzdE11dHVhbFJlY3Vyc2lv", |
| 87 | "bkESNAoCYmIYASABKAsyKC5wcm90b2J1Zl91bml0dGVzdDMuVGVzdE11dHVh", |
| 88 | "bFJlY3Vyc2lvbkIiYwoUVGVzdE11dHVhbFJlY3Vyc2lvbkISMwoBYRgBIAEo", |
| 89 | "CzIoLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0TXV0dWFsUmVjdXJzaW9uQRIW", |
| 90 | "Cg5vcHRpb25hbF9pbnQzMhgCIAEoBSJNChJUZXN0RW51bUFsbG93QWxpYXMS", |
| 91 | "NwoFdmFsdWUYASABKA4yKC5wcm90b2J1Zl91bml0dGVzdDMuVGVzdEVudW1X", |
| 92 | "aXRoRHVwVmFsdWUi7wIKF1Rlc3RDYW1lbENhc2VGaWVsZE5hbWVzEhYKDlBy", |
| 93 | "aW1pdGl2ZUZpZWxkGAEgASgFEhMKC1N0cmluZ0ZpZWxkGAIgASgJEjIKCUVu", |
| 94 | "dW1GaWVsZBgDIAEoDjIfLnByb3RvYnVmX3VuaXR0ZXN0My5Gb3JlaWduRW51", |
| 95 | "bRI4CgxNZXNzYWdlRmllbGQYBCABKAsyIi5wcm90b2J1Zl91bml0dGVzdDMu", |
| 96 | "Rm9yZWlnbk1lc3NhZ2USHgoWUmVwZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMo", |
| 97 | "BRIbChNSZXBlYXRlZFN0cmluZ0ZpZWxkGAggAygJEjoKEVJlcGVhdGVkRW51", |
| 98 | "bUZpZWxkGAkgAygOMh8ucHJvdG9idWZfdW5pdHRlc3QzLkZvcmVpZ25FbnVt", |
| 99 | "EkAKFFJlcGVhdGVkTWVzc2FnZUZpZWxkGAogAygLMiIucHJvdG9idWZfdW5p", |
| 100 | "dHRlc3QzLkZvcmVpZ25NZXNzYWdlIsgBChJUZXN0RmllbGRPcmRlcmluZ3MS", |
| 101 | "EQoJbXlfc3RyaW5nGAsgASgJEg4KBm15X2ludBgBIAEoAxIQCghteV9mbG9h", |
| 102 | "dBhlIAEoAhJUChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYyAEgASgLMjQucHJv", |
| 103 | "dG9idWZfdW5pdHRlc3QzLlRlc3RGaWVsZE9yZGVyaW5ncy5OZXN0ZWRNZXNz", |
| 104 | "YWdlGicKDU5lc3RlZE1lc3NhZ2USCgoCb28YAiABKAMSCgoCYmIYASABKAUi", |
| 105 | "TAoRU3BhcnNlRW51bU1lc3NhZ2USNwoLc3BhcnNlX2VudW0YASABKA4yIi5w", |
| 106 | "cm90b2J1Zl91bml0dGVzdDMuVGVzdFNwYXJzZUVudW0iGQoJT25lU3RyaW5n", |
| 107 | "EgwKBGRhdGEYASABKAkiGgoKTW9yZVN0cmluZxIMCgRkYXRhGAEgAygJIhgK", |
| 108 | "CE9uZUJ5dGVzEgwKBGRhdGEYASABKAwiGQoJTW9yZUJ5dGVzEgwKBGRhdGEY", |
| 109 | "ASABKAwiHAoMSW50MzJNZXNzYWdlEgwKBGRhdGEYASABKAUiHQoNVWludDMy", |
| 110 | "TWVzc2FnZRIMCgRkYXRhGAEgASgNIhwKDEludDY0TWVzc2FnZRIMCgRkYXRh", |
| 111 | "GAEgASgDIh0KDVVpbnQ2NE1lc3NhZ2USDAoEZGF0YRgBIAEoBCIbCgtCb29s", |
| 112 | "TWVzc2FnZRIMCgRkYXRhGAEgASgIInQKCVRlc3RPbmVvZhIRCgdmb29faW50", |
| 113 | "GAEgASgFSAASFAoKZm9vX3N0cmluZxgCIAEoCUgAEjcKC2Zvb19tZXNzYWdl", |
| 114 | "GAMgASgLMiAucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RBbGxUeXBlc0gAQgUK", |
| 115 | "A2ZvbyKrAwoPVGVzdFBhY2tlZFR5cGVzEhgKDHBhY2tlZF9pbnQzMhhaIAMo", |
| 116 | "BUICEAESGAoMcGFja2VkX2ludDY0GFsgAygDQgIQARIZCg1wYWNrZWRfdWlu", |
| 117 | "dDMyGFwgAygNQgIQARIZCg1wYWNrZWRfdWludDY0GF0gAygEQgIQARIZCg1w", |
| 118 | "YWNrZWRfc2ludDMyGF4gAygRQgIQARIZCg1wYWNrZWRfc2ludDY0GF8gAygS", |
| 119 | "QgIQARIaCg5wYWNrZWRfZml4ZWQzMhhgIAMoB0ICEAESGgoOcGFja2VkX2Zp", |
| 120 | "eGVkNjQYYSADKAZCAhABEhsKD3BhY2tlZF9zZml4ZWQzMhhiIAMoD0ICEAES", |
| 121 | "GwoPcGFja2VkX3NmaXhlZDY0GGMgAygQQgIQARIYCgxwYWNrZWRfZmxvYXQY", |
| 122 | "ZCADKAJCAhABEhkKDXBhY2tlZF9kb3VibGUYZSADKAFCAhABEhcKC3BhY2tl", |
| 123 | "ZF9ib29sGGYgAygIQgIQARI4CgtwYWNrZWRfZW51bRhnIAMoDjIfLnByb3Rv", |
| 124 | "YnVmX3VuaXR0ZXN0My5Gb3JlaWduRW51bUICEAEiyQMKEVRlc3RVbnBhY2tl", |
| 125 | "ZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFogAygFQgIQABIaCg51bnBhY2tl", |
| 126 | "ZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNrZWRfdWludDMyGFwgAygNQgIQ", |
| 127 | "ABIbCg91bnBhY2tlZF91aW50NjQYXSADKARCAhAAEhsKD3VucGFja2VkX3Np", |
| 128 | "bnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRfc2ludDY0GF8gAygSQgIQABIc", |
| 129 | "ChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQABIcChB1bnBhY2tlZF9maXhl", |
| 130 | "ZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9zZml4ZWQzMhhiIAMoD0ICEAAS", |
| 131 | "HQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBCAhAAEhoKDnVucGFja2VkX2Zs", |
| 132 | "b2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9kb3VibGUYZSADKAFCAhAAEhkK", |
| 133 | "DXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjoKDXVucGFja2VkX2VudW0YZyAD", |
| 134 | "KA4yHy5wcm90b2J1Zl91bml0dGVzdDMuRm9yZWlnbkVudW1CAhAAIsABCiNU", |
| 135 | "ZXN0UmVwZWF0ZWRTY2FsYXJEaWZmZXJlbnRUYWdTaXplcxIYChByZXBlYXRl", |
| 136 | "ZF9maXhlZDMyGAwgAygHEhYKDnJlcGVhdGVkX2ludDMyGA0gAygFEhkKEHJl", |
| 137 | "cGVhdGVkX2ZpeGVkNjQY/g8gAygGEhcKDnJlcGVhdGVkX2ludDY0GP8PIAMo", |
| 138 | "AxIYCg5yZXBlYXRlZF9mbG9hdBj+/w8gAygCEhkKD3JlcGVhdGVkX3VpbnQ2", |
| 139 | "NBj//w8gAygEIigKG1Rlc3RDb21tZW50SW5qZWN0aW9uTWVzc2FnZRIJCgFh", |
| 140 | "GAEgASgJIgwKCkZvb1JlcXVlc3QiDQoLRm9vUmVzcG9uc2UiEgoQRm9vQ2xp", |
| 141 | "ZW50TWVzc2FnZSISChBGb29TZXJ2ZXJNZXNzYWdlIgwKCkJhclJlcXVlc3Qi", |
| 142 | "DQoLQmFyUmVzcG9uc2UiEgoQVGVzdEVtcHR5TWVzc2FnZSpZCgtGb3JlaWdu", |
| 143 | "RW51bRIXChNGT1JFSUdOX1VOU1BFQ0lGSUVEEAASDwoLRk9SRUlHTl9GT08Q", |
| 144 | "BBIPCgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVu", |
| 145 | "dW1XaXRoRHVwVmFsdWUSKAokVEVTVF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VO", |
| 146 | "U1BFQ0lGSUVEEAASCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRG", |
| 147 | "T08yEAESCAoEQkFSMhACGgIQASqdAQoOVGVzdFNwYXJzZUVudW0SIAocVEVT", |
| 148 | "VF9TUEFSU0VfRU5VTV9VTlNQRUNJRklFRBAAEgwKCFNQQVJTRV9BEHsSDgoI", |
| 149 | "U1BBUlNFX0IQpucDEg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//", |
| 150 | "////////ARIVCghTUEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9HEAIy", |
| 151 | "nQEKC1Rlc3RTZXJ2aWNlEkYKA0ZvbxIeLnByb3RvYnVmX3VuaXR0ZXN0My5G", |
| 152 | "b29SZXF1ZXN0Gh8ucHJvdG9idWZfdW5pdHRlc3QzLkZvb1Jlc3BvbnNlEkYK", |
| 153 | "A0JhchIeLnByb3RvYnVmX3VuaXR0ZXN0My5CYXJSZXF1ZXN0Gh8ucHJvdG9i", |
| 154 | "dWZfdW5pdHRlc3QzLkJhclJlc3BvbnNlQixCDVVuaXR0ZXN0UHJvdG+qAhpH", |
| 155 | "b29nbGUuUHJvdG9idWYuVGVzdFByb3Rvc2IGcHJvdG8z")); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 156 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 157 | new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor, }, |
| 158 | new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), }, new pbr::GeneratedClrTypeInfo[] { |
| 159 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes), global::Google.Protobuf.TestProtos.TestAllTypes.Parser, new[]{ "SingleInt32", "SingleInt64", "SingleUint32", "SingleUint64", "SingleSint32", "SingleSint64", "SingleFixed32", "SingleFixed64", "SingleSfixed32", "SingleSfixed64", "SingleFloat", "SingleDouble", "SingleBool", "SingleString", "SingleBytes", "SingleNestedMessage", "SingleForeignMessage", "SingleImportMessage", "SingleNestedEnum", "SingleForeignEnum", "SingleImportEnum", "SinglePublicImportMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedPublicImportMessage", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null)}), |
| 160 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null), |
| 161 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32" }, null, null, null), |
| 162 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[]{ "C" }, null, null, null), |
| 163 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Parser, null, null, null, null), |
| 164 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null), |
| 165 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null), |
| 166 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null), |
| 167 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.Parser, new[]{ "Bb" }, null, null, null), |
| 168 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 169 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestEnumAllowAlias), global::Google.Protobuf.TestProtos.TestEnumAllowAlias.Parser, new[]{ "Value" }, null, null, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 170 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField" }, null, null, null), |
| 171 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb" }, null, null, null)}), |
| 172 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null), |
| 173 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data" }, null, null, null), |
| 174 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data" }, null, null, null), |
| 175 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" }, null, null, null), |
| 176 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data" }, null, null, null), |
| 177 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "Data" }, null, null, null), |
| 178 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{ "Data" }, null, null, null), |
| 179 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "Data" }, null, null, null), |
| 180 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{ "Data" }, null, null, null), |
| 181 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Data" }, null, null, null), |
| 182 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null), |
| 183 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestPackedTypes), global::Google.Protobuf.TestProtos.TestPackedTypes.Parser, new[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null, null), |
| 184 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestUnpackedTypes), global::Google.Protobuf.TestProtos.TestUnpackedTypes.Parser, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum" }, null, null, null), |
| 185 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null, null, null), |
| 186 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null), |
| 187 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null, null, null), |
| 188 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null, null, null), |
| 189 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser, null, null, null, null), |
| 190 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser, null, null, null, null), |
| 191 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null, null, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 192 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null, null, null), |
| 193 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestEmptyMessage), global::Google.Protobuf.TestProtos.TestEmptyMessage.Parser, null, null, null, null) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 194 | })); |
| 195 | } |
| 196 | #endregion |
| 197 | |
| 198 | } |
| 199 | #region Enums |
| 200 | public enum ForeignEnum { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 201 | [pbr::OriginalName("FOREIGN_UNSPECIFIED")] ForeignUnspecified = 0, |
| 202 | [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 4, |
| 203 | [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 5, |
| 204 | [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 6, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 208 | /// Test an enum that has multiple values with the same number. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 209 | /// </summary> |
| 210 | public enum TestEnumWithDupValue { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 211 | [pbr::OriginalName("TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED")] Unspecified = 0, |
| 212 | [pbr::OriginalName("FOO1")] Foo1 = 1, |
| 213 | [pbr::OriginalName("BAR1")] Bar1 = 2, |
| 214 | [pbr::OriginalName("BAZ")] Baz = 3, |
| 215 | [pbr::OriginalName("FOO2", PreferredAlias = false)] Foo2 = 1, |
| 216 | [pbr::OriginalName("BAR2", PreferredAlias = false)] Bar2 = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 220 | /// Test an enum with large, unordered values. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 221 | /// </summary> |
| 222 | public enum TestSparseEnum { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 223 | [pbr::OriginalName("TEST_SPARSE_ENUM_UNSPECIFIED")] Unspecified = 0, |
| 224 | [pbr::OriginalName("SPARSE_A")] SparseA = 123, |
| 225 | [pbr::OriginalName("SPARSE_B")] SparseB = 62374, |
| 226 | [pbr::OriginalName("SPARSE_C")] SparseC = 12589234, |
| 227 | [pbr::OriginalName("SPARSE_D")] SparseD = -15, |
| 228 | [pbr::OriginalName("SPARSE_E")] SparseE = -53452, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 229 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 230 | /// In proto3, value 0 must be the first one specified |
| 231 | /// SPARSE_F = 0; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 232 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 233 | [pbr::OriginalName("SPARSE_G")] SparseG = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | #endregion |
| 237 | |
| 238 | #region Messages |
| 239 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 240 | /// This proto includes every type of field in both singular and repeated |
| 241 | /// forms. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 242 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 243 | public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> { |
| 244 | private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 245 | private pb::UnknownFieldSet _unknownFields; |
| 246 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 247 | public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } } |
| 248 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 249 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 250 | public static pbr::MessageDescriptor Descriptor { |
| 251 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[0]; } |
| 252 | } |
| 253 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 254 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 255 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 256 | get { return Descriptor; } |
| 257 | } |
| 258 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 259 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 260 | public TestAllTypes() { |
| 261 | OnConstruction(); |
| 262 | } |
| 263 | |
| 264 | partial void OnConstruction(); |
| 265 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 266 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 267 | public TestAllTypes(TestAllTypes other) : this() { |
| 268 | singleInt32_ = other.singleInt32_; |
| 269 | singleInt64_ = other.singleInt64_; |
| 270 | singleUint32_ = other.singleUint32_; |
| 271 | singleUint64_ = other.singleUint64_; |
| 272 | singleSint32_ = other.singleSint32_; |
| 273 | singleSint64_ = other.singleSint64_; |
| 274 | singleFixed32_ = other.singleFixed32_; |
| 275 | singleFixed64_ = other.singleFixed64_; |
| 276 | singleSfixed32_ = other.singleSfixed32_; |
| 277 | singleSfixed64_ = other.singleSfixed64_; |
| 278 | singleFloat_ = other.singleFloat_; |
| 279 | singleDouble_ = other.singleDouble_; |
| 280 | singleBool_ = other.singleBool_; |
| 281 | singleString_ = other.singleString_; |
| 282 | singleBytes_ = other.singleBytes_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 283 | singleNestedMessage_ = other.singleNestedMessage_ != null ? other.singleNestedMessage_.Clone() : null; |
| 284 | singleForeignMessage_ = other.singleForeignMessage_ != null ? other.singleForeignMessage_.Clone() : null; |
| 285 | singleImportMessage_ = other.singleImportMessage_ != null ? other.singleImportMessage_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 286 | singleNestedEnum_ = other.singleNestedEnum_; |
| 287 | singleForeignEnum_ = other.singleForeignEnum_; |
| 288 | singleImportEnum_ = other.singleImportEnum_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 289 | singlePublicImportMessage_ = other.singlePublicImportMessage_ != null ? other.singlePublicImportMessage_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 290 | repeatedInt32_ = other.repeatedInt32_.Clone(); |
| 291 | repeatedInt64_ = other.repeatedInt64_.Clone(); |
| 292 | repeatedUint32_ = other.repeatedUint32_.Clone(); |
| 293 | repeatedUint64_ = other.repeatedUint64_.Clone(); |
| 294 | repeatedSint32_ = other.repeatedSint32_.Clone(); |
| 295 | repeatedSint64_ = other.repeatedSint64_.Clone(); |
| 296 | repeatedFixed32_ = other.repeatedFixed32_.Clone(); |
| 297 | repeatedFixed64_ = other.repeatedFixed64_.Clone(); |
| 298 | repeatedSfixed32_ = other.repeatedSfixed32_.Clone(); |
| 299 | repeatedSfixed64_ = other.repeatedSfixed64_.Clone(); |
| 300 | repeatedFloat_ = other.repeatedFloat_.Clone(); |
| 301 | repeatedDouble_ = other.repeatedDouble_.Clone(); |
| 302 | repeatedBool_ = other.repeatedBool_.Clone(); |
| 303 | repeatedString_ = other.repeatedString_.Clone(); |
| 304 | repeatedBytes_ = other.repeatedBytes_.Clone(); |
| 305 | repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone(); |
| 306 | repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone(); |
| 307 | repeatedImportMessage_ = other.repeatedImportMessage_.Clone(); |
| 308 | repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone(); |
| 309 | repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone(); |
| 310 | repeatedImportEnum_ = other.repeatedImportEnum_.Clone(); |
| 311 | repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone(); |
| 312 | switch (other.OneofFieldCase) { |
| 313 | case OneofFieldOneofCase.OneofUint32: |
| 314 | OneofUint32 = other.OneofUint32; |
| 315 | break; |
| 316 | case OneofFieldOneofCase.OneofNestedMessage: |
| 317 | OneofNestedMessage = other.OneofNestedMessage.Clone(); |
| 318 | break; |
| 319 | case OneofFieldOneofCase.OneofString: |
| 320 | OneofString = other.OneofString; |
| 321 | break; |
| 322 | case OneofFieldOneofCase.OneofBytes: |
| 323 | OneofBytes = other.OneofBytes; |
| 324 | break; |
| 325 | } |
| 326 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 327 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 328 | } |
| 329 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 330 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 331 | public TestAllTypes Clone() { |
| 332 | return new TestAllTypes(this); |
| 333 | } |
| 334 | |
| 335 | /// <summary>Field number for the "single_int32" field.</summary> |
| 336 | public const int SingleInt32FieldNumber = 1; |
| 337 | private int singleInt32_; |
| 338 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 339 | /// Singular |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 340 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 341 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 342 | public int SingleInt32 { |
| 343 | get { return singleInt32_; } |
| 344 | set { |
| 345 | singleInt32_ = value; |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | /// <summary>Field number for the "single_int64" field.</summary> |
| 350 | public const int SingleInt64FieldNumber = 2; |
| 351 | private long singleInt64_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 352 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 353 | public long SingleInt64 { |
| 354 | get { return singleInt64_; } |
| 355 | set { |
| 356 | singleInt64_ = value; |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | /// <summary>Field number for the "single_uint32" field.</summary> |
| 361 | public const int SingleUint32FieldNumber = 3; |
| 362 | private uint singleUint32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 363 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 364 | public uint SingleUint32 { |
| 365 | get { return singleUint32_; } |
| 366 | set { |
| 367 | singleUint32_ = value; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | /// <summary>Field number for the "single_uint64" field.</summary> |
| 372 | public const int SingleUint64FieldNumber = 4; |
| 373 | private ulong singleUint64_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 374 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 375 | public ulong SingleUint64 { |
| 376 | get { return singleUint64_; } |
| 377 | set { |
| 378 | singleUint64_ = value; |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | /// <summary>Field number for the "single_sint32" field.</summary> |
| 383 | public const int SingleSint32FieldNumber = 5; |
| 384 | private int singleSint32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 385 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 386 | public int SingleSint32 { |
| 387 | get { return singleSint32_; } |
| 388 | set { |
| 389 | singleSint32_ = value; |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | /// <summary>Field number for the "single_sint64" field.</summary> |
| 394 | public const int SingleSint64FieldNumber = 6; |
| 395 | private long singleSint64_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 396 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 397 | public long SingleSint64 { |
| 398 | get { return singleSint64_; } |
| 399 | set { |
| 400 | singleSint64_ = value; |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | /// <summary>Field number for the "single_fixed32" field.</summary> |
| 405 | public const int SingleFixed32FieldNumber = 7; |
| 406 | private uint singleFixed32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 407 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 408 | public uint SingleFixed32 { |
| 409 | get { return singleFixed32_; } |
| 410 | set { |
| 411 | singleFixed32_ = value; |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | /// <summary>Field number for the "single_fixed64" field.</summary> |
| 416 | public const int SingleFixed64FieldNumber = 8; |
| 417 | private ulong singleFixed64_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 418 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 419 | public ulong SingleFixed64 { |
| 420 | get { return singleFixed64_; } |
| 421 | set { |
| 422 | singleFixed64_ = value; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | /// <summary>Field number for the "single_sfixed32" field.</summary> |
| 427 | public const int SingleSfixed32FieldNumber = 9; |
| 428 | private int singleSfixed32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 429 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 430 | public int SingleSfixed32 { |
| 431 | get { return singleSfixed32_; } |
| 432 | set { |
| 433 | singleSfixed32_ = value; |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | /// <summary>Field number for the "single_sfixed64" field.</summary> |
| 438 | public const int SingleSfixed64FieldNumber = 10; |
| 439 | private long singleSfixed64_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 440 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 441 | public long SingleSfixed64 { |
| 442 | get { return singleSfixed64_; } |
| 443 | set { |
| 444 | singleSfixed64_ = value; |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | /// <summary>Field number for the "single_float" field.</summary> |
| 449 | public const int SingleFloatFieldNumber = 11; |
| 450 | private float singleFloat_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 451 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 452 | public float SingleFloat { |
| 453 | get { return singleFloat_; } |
| 454 | set { |
| 455 | singleFloat_ = value; |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | /// <summary>Field number for the "single_double" field.</summary> |
| 460 | public const int SingleDoubleFieldNumber = 12; |
| 461 | private double singleDouble_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 462 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 463 | public double SingleDouble { |
| 464 | get { return singleDouble_; } |
| 465 | set { |
| 466 | singleDouble_ = value; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | /// <summary>Field number for the "single_bool" field.</summary> |
| 471 | public const int SingleBoolFieldNumber = 13; |
| 472 | private bool singleBool_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 473 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 474 | public bool SingleBool { |
| 475 | get { return singleBool_; } |
| 476 | set { |
| 477 | singleBool_ = value; |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | /// <summary>Field number for the "single_string" field.</summary> |
| 482 | public const int SingleStringFieldNumber = 14; |
| 483 | private string singleString_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 484 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 485 | public string SingleString { |
| 486 | get { return singleString_; } |
| 487 | set { |
| 488 | singleString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | /// <summary>Field number for the "single_bytes" field.</summary> |
| 493 | public const int SingleBytesFieldNumber = 15; |
| 494 | private pb::ByteString singleBytes_ = pb::ByteString.Empty; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 495 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 496 | public pb::ByteString SingleBytes { |
| 497 | get { return singleBytes_; } |
| 498 | set { |
| 499 | singleBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | /// <summary>Field number for the "single_nested_message" field.</summary> |
| 504 | public const int SingleNestedMessageFieldNumber = 18; |
| 505 | private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage singleNestedMessage_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 506 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 507 | public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage SingleNestedMessage { |
| 508 | get { return singleNestedMessage_; } |
| 509 | set { |
| 510 | singleNestedMessage_ = value; |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | /// <summary>Field number for the "single_foreign_message" field.</summary> |
| 515 | public const int SingleForeignMessageFieldNumber = 19; |
| 516 | private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessage_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 517 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 518 | public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessage { |
| 519 | get { return singleForeignMessage_; } |
| 520 | set { |
| 521 | singleForeignMessage_ = value; |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | /// <summary>Field number for the "single_import_message" field.</summary> |
| 526 | public const int SingleImportMessageFieldNumber = 20; |
| 527 | private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 528 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 529 | public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage { |
| 530 | get { return singleImportMessage_; } |
| 531 | set { |
| 532 | singleImportMessage_ = value; |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | /// <summary>Field number for the "single_nested_enum" field.</summary> |
| 537 | public const int SingleNestedEnumFieldNumber = 21; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 538 | private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum singleNestedEnum_ = 0; |
| 539 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 540 | public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum SingleNestedEnum { |
| 541 | get { return singleNestedEnum_; } |
| 542 | set { |
| 543 | singleNestedEnum_ = value; |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | /// <summary>Field number for the "single_foreign_enum" field.</summary> |
| 548 | public const int SingleForeignEnumFieldNumber = 22; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 549 | private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ = 0; |
| 550 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 551 | public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum { |
| 552 | get { return singleForeignEnum_; } |
| 553 | set { |
| 554 | singleForeignEnum_ = value; |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | /// <summary>Field number for the "single_import_enum" field.</summary> |
| 559 | public const int SingleImportEnumFieldNumber = 23; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 560 | private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = 0; |
| 561 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 562 | public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum { |
| 563 | get { return singleImportEnum_; } |
| 564 | set { |
| 565 | singleImportEnum_ = value; |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | /// <summary>Field number for the "single_public_import_message" field.</summary> |
| 570 | public const int SinglePublicImportMessageFieldNumber = 26; |
| 571 | private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_; |
| 572 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 573 | /// Defined in unittest_import_public.proto |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 574 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 575 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 576 | public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage { |
| 577 | get { return singlePublicImportMessage_; } |
| 578 | set { |
| 579 | singlePublicImportMessage_ = value; |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | /// <summary>Field number for the "repeated_int32" field.</summary> |
| 584 | public const int RepeatedInt32FieldNumber = 31; |
| 585 | private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec |
| 586 | = pb::FieldCodec.ForInt32(250); |
| 587 | private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>(); |
| 588 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 589 | /// Repeated |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 590 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 591 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 592 | public pbc::RepeatedField<int> RepeatedInt32 { |
| 593 | get { return repeatedInt32_; } |
| 594 | } |
| 595 | |
| 596 | /// <summary>Field number for the "repeated_int64" field.</summary> |
| 597 | public const int RepeatedInt64FieldNumber = 32; |
| 598 | private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec |
| 599 | = pb::FieldCodec.ForInt64(258); |
| 600 | private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 601 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 602 | public pbc::RepeatedField<long> RepeatedInt64 { |
| 603 | get { return repeatedInt64_; } |
| 604 | } |
| 605 | |
| 606 | /// <summary>Field number for the "repeated_uint32" field.</summary> |
| 607 | public const int RepeatedUint32FieldNumber = 33; |
| 608 | private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec |
| 609 | = pb::FieldCodec.ForUInt32(266); |
| 610 | private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 611 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 612 | public pbc::RepeatedField<uint> RepeatedUint32 { |
| 613 | get { return repeatedUint32_; } |
| 614 | } |
| 615 | |
| 616 | /// <summary>Field number for the "repeated_uint64" field.</summary> |
| 617 | public const int RepeatedUint64FieldNumber = 34; |
| 618 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec |
| 619 | = pb::FieldCodec.ForUInt64(274); |
| 620 | private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 621 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 622 | public pbc::RepeatedField<ulong> RepeatedUint64 { |
| 623 | get { return repeatedUint64_; } |
| 624 | } |
| 625 | |
| 626 | /// <summary>Field number for the "repeated_sint32" field.</summary> |
| 627 | public const int RepeatedSint32FieldNumber = 35; |
| 628 | private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec |
| 629 | = pb::FieldCodec.ForSInt32(282); |
| 630 | private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 631 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 632 | public pbc::RepeatedField<int> RepeatedSint32 { |
| 633 | get { return repeatedSint32_; } |
| 634 | } |
| 635 | |
| 636 | /// <summary>Field number for the "repeated_sint64" field.</summary> |
| 637 | public const int RepeatedSint64FieldNumber = 36; |
| 638 | private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec |
| 639 | = pb::FieldCodec.ForSInt64(290); |
| 640 | private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 641 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 642 | public pbc::RepeatedField<long> RepeatedSint64 { |
| 643 | get { return repeatedSint64_; } |
| 644 | } |
| 645 | |
| 646 | /// <summary>Field number for the "repeated_fixed32" field.</summary> |
| 647 | public const int RepeatedFixed32FieldNumber = 37; |
| 648 | private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec |
| 649 | = pb::FieldCodec.ForFixed32(298); |
| 650 | private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 651 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 652 | public pbc::RepeatedField<uint> RepeatedFixed32 { |
| 653 | get { return repeatedFixed32_; } |
| 654 | } |
| 655 | |
| 656 | /// <summary>Field number for the "repeated_fixed64" field.</summary> |
| 657 | public const int RepeatedFixed64FieldNumber = 38; |
| 658 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec |
| 659 | = pb::FieldCodec.ForFixed64(306); |
| 660 | private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 661 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 662 | public pbc::RepeatedField<ulong> RepeatedFixed64 { |
| 663 | get { return repeatedFixed64_; } |
| 664 | } |
| 665 | |
| 666 | /// <summary>Field number for the "repeated_sfixed32" field.</summary> |
| 667 | public const int RepeatedSfixed32FieldNumber = 39; |
| 668 | private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec |
| 669 | = pb::FieldCodec.ForSFixed32(314); |
| 670 | private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 671 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 672 | public pbc::RepeatedField<int> RepeatedSfixed32 { |
| 673 | get { return repeatedSfixed32_; } |
| 674 | } |
| 675 | |
| 676 | /// <summary>Field number for the "repeated_sfixed64" field.</summary> |
| 677 | public const int RepeatedSfixed64FieldNumber = 40; |
| 678 | private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec |
| 679 | = pb::FieldCodec.ForSFixed64(322); |
| 680 | private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 681 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 682 | public pbc::RepeatedField<long> RepeatedSfixed64 { |
| 683 | get { return repeatedSfixed64_; } |
| 684 | } |
| 685 | |
| 686 | /// <summary>Field number for the "repeated_float" field.</summary> |
| 687 | public const int RepeatedFloatFieldNumber = 41; |
| 688 | private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec |
| 689 | = pb::FieldCodec.ForFloat(330); |
| 690 | private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 691 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 692 | public pbc::RepeatedField<float> RepeatedFloat { |
| 693 | get { return repeatedFloat_; } |
| 694 | } |
| 695 | |
| 696 | /// <summary>Field number for the "repeated_double" field.</summary> |
| 697 | public const int RepeatedDoubleFieldNumber = 42; |
| 698 | private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec |
| 699 | = pb::FieldCodec.ForDouble(338); |
| 700 | private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 701 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 702 | public pbc::RepeatedField<double> RepeatedDouble { |
| 703 | get { return repeatedDouble_; } |
| 704 | } |
| 705 | |
| 706 | /// <summary>Field number for the "repeated_bool" field.</summary> |
| 707 | public const int RepeatedBoolFieldNumber = 43; |
| 708 | private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec |
| 709 | = pb::FieldCodec.ForBool(346); |
| 710 | private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 711 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 712 | public pbc::RepeatedField<bool> RepeatedBool { |
| 713 | get { return repeatedBool_; } |
| 714 | } |
| 715 | |
| 716 | /// <summary>Field number for the "repeated_string" field.</summary> |
| 717 | public const int RepeatedStringFieldNumber = 44; |
| 718 | private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec |
| 719 | = pb::FieldCodec.ForString(354); |
| 720 | private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 721 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 722 | public pbc::RepeatedField<string> RepeatedString { |
| 723 | get { return repeatedString_; } |
| 724 | } |
| 725 | |
| 726 | /// <summary>Field number for the "repeated_bytes" field.</summary> |
| 727 | public const int RepeatedBytesFieldNumber = 45; |
| 728 | private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec |
| 729 | = pb::FieldCodec.ForBytes(362); |
| 730 | private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 731 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 732 | public pbc::RepeatedField<pb::ByteString> RepeatedBytes { |
| 733 | get { return repeatedBytes_; } |
| 734 | } |
| 735 | |
| 736 | /// <summary>Field number for the "repeated_nested_message" field.</summary> |
| 737 | public const int RepeatedNestedMessageFieldNumber = 48; |
| 738 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec |
| 739 | = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser); |
| 740 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 741 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 742 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage { |
| 743 | get { return repeatedNestedMessage_; } |
| 744 | } |
| 745 | |
| 746 | /// <summary>Field number for the "repeated_foreign_message" field.</summary> |
| 747 | public const int RepeatedForeignMessageFieldNumber = 49; |
| 748 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedForeignMessage_codec |
| 749 | = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.ForeignMessage.Parser); |
| 750 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 751 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 752 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedForeignMessage { |
| 753 | get { return repeatedForeignMessage_; } |
| 754 | } |
| 755 | |
| 756 | /// <summary>Field number for the "repeated_import_message" field.</summary> |
| 757 | public const int RepeatedImportMessageFieldNumber = 50; |
| 758 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportMessage> _repeated_repeatedImportMessage_codec |
| 759 | = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.ImportMessage.Parser); |
| 760 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 761 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 762 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> RepeatedImportMessage { |
| 763 | get { return repeatedImportMessage_; } |
| 764 | } |
| 765 | |
| 766 | /// <summary>Field number for the "repeated_nested_enum" field.</summary> |
| 767 | public const int RepeatedNestedEnumFieldNumber = 51; |
| 768 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec |
| 769 | = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) x); |
| 770 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 771 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 772 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum { |
| 773 | get { return repeatedNestedEnum_; } |
| 774 | } |
| 775 | |
| 776 | /// <summary>Field number for the "repeated_foreign_enum" field.</summary> |
| 777 | public const int RepeatedForeignEnumFieldNumber = 52; |
| 778 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedForeignEnum_codec |
| 779 | = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x); |
| 780 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 781 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 782 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedForeignEnum { |
| 783 | get { return repeatedForeignEnum_; } |
| 784 | } |
| 785 | |
| 786 | /// <summary>Field number for the "repeated_import_enum" field.</summary> |
| 787 | public const int RepeatedImportEnumFieldNumber = 53; |
| 788 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportEnum> _repeated_repeatedImportEnum_codec |
| 789 | = pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobuf.TestProtos.ImportEnum) x); |
| 790 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 791 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 792 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> RepeatedImportEnum { |
| 793 | get { return repeatedImportEnum_; } |
| 794 | } |
| 795 | |
| 796 | /// <summary>Field number for the "repeated_public_import_message" field.</summary> |
| 797 | public const int RepeatedPublicImportMessageFieldNumber = 54; |
| 798 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.PublicImportMessage> _repeated_repeatedPublicImportMessage_codec |
| 799 | = pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser); |
| 800 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage>(); |
| 801 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 802 | /// Defined in unittest_import_public.proto |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 803 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 804 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 805 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> RepeatedPublicImportMessage { |
| 806 | get { return repeatedPublicImportMessage_; } |
| 807 | } |
| 808 | |
| 809 | /// <summary>Field number for the "oneof_uint32" field.</summary> |
| 810 | public const int OneofUint32FieldNumber = 111; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 811 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 812 | public uint OneofUint32 { |
| 813 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; } |
| 814 | set { |
| 815 | oneofField_ = value; |
| 816 | oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; |
| 817 | } |
| 818 | } |
| 819 | |
| 820 | /// <summary>Field number for the "oneof_nested_message" field.</summary> |
| 821 | public const int OneofNestedMessageFieldNumber = 112; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 822 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 823 | public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage { |
| 824 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_ : null; } |
| 825 | set { |
| 826 | oneofField_ = value; |
| 827 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage; |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | /// <summary>Field number for the "oneof_string" field.</summary> |
| 832 | public const int OneofStringFieldNumber = 113; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 833 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 834 | public string OneofString { |
| 835 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; } |
| 836 | set { |
| 837 | oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 838 | oneofFieldCase_ = OneofFieldOneofCase.OneofString; |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | /// <summary>Field number for the "oneof_bytes" field.</summary> |
| 843 | public const int OneofBytesFieldNumber = 114; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 844 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 845 | public pb::ByteString OneofBytes { |
| 846 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; } |
| 847 | set { |
| 848 | oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 849 | oneofFieldCase_ = OneofFieldOneofCase.OneofBytes; |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | private object oneofField_; |
| 854 | /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary> |
| 855 | public enum OneofFieldOneofCase { |
| 856 | None = 0, |
| 857 | OneofUint32 = 111, |
| 858 | OneofNestedMessage = 112, |
| 859 | OneofString = 113, |
| 860 | OneofBytes = 114, |
| 861 | } |
| 862 | private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 863 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 864 | public OneofFieldOneofCase OneofFieldCase { |
| 865 | get { return oneofFieldCase_; } |
| 866 | } |
| 867 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 869 | public void ClearOneofField() { |
| 870 | oneofFieldCase_ = OneofFieldOneofCase.None; |
| 871 | oneofField_ = null; |
| 872 | } |
| 873 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 874 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 875 | public override bool Equals(object other) { |
| 876 | return Equals(other as TestAllTypes); |
| 877 | } |
| 878 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 879 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 880 | public bool Equals(TestAllTypes other) { |
| 881 | if (ReferenceEquals(other, null)) { |
| 882 | return false; |
| 883 | } |
| 884 | if (ReferenceEquals(other, this)) { |
| 885 | return true; |
| 886 | } |
| 887 | if (SingleInt32 != other.SingleInt32) return false; |
| 888 | if (SingleInt64 != other.SingleInt64) return false; |
| 889 | if (SingleUint32 != other.SingleUint32) return false; |
| 890 | if (SingleUint64 != other.SingleUint64) return false; |
| 891 | if (SingleSint32 != other.SingleSint32) return false; |
| 892 | if (SingleSint64 != other.SingleSint64) return false; |
| 893 | if (SingleFixed32 != other.SingleFixed32) return false; |
| 894 | if (SingleFixed64 != other.SingleFixed64) return false; |
| 895 | if (SingleSfixed32 != other.SingleSfixed32) return false; |
| 896 | if (SingleSfixed64 != other.SingleSfixed64) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 897 | if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SingleFloat, other.SingleFloat)) return false; |
| 898 | if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SingleDouble, other.SingleDouble)) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 899 | if (SingleBool != other.SingleBool) return false; |
| 900 | if (SingleString != other.SingleString) return false; |
| 901 | if (SingleBytes != other.SingleBytes) return false; |
| 902 | if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false; |
| 903 | if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) return false; |
| 904 | if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return false; |
| 905 | if (SingleNestedEnum != other.SingleNestedEnum) return false; |
| 906 | if (SingleForeignEnum != other.SingleForeignEnum) return false; |
| 907 | if (SingleImportEnum != other.SingleImportEnum) return false; |
| 908 | if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMessage)) return false; |
| 909 | if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; |
| 910 | if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false; |
| 911 | if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false; |
| 912 | if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false; |
| 913 | if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false; |
| 914 | if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false; |
| 915 | if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false; |
| 916 | if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false; |
| 917 | if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false; |
| 918 | if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false; |
| 919 | if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false; |
| 920 | if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false; |
| 921 | if(!repeatedBool_.Equals(other.repeatedBool_)) return false; |
| 922 | if(!repeatedString_.Equals(other.repeatedString_)) return false; |
| 923 | if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false; |
| 924 | if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false; |
| 925 | if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false; |
| 926 | if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false; |
| 927 | if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false; |
| 928 | if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false; |
| 929 | if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false; |
| 930 | if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_)) return false; |
| 931 | if (OneofUint32 != other.OneofUint32) return false; |
| 932 | if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false; |
| 933 | if (OneofString != other.OneofString) return false; |
| 934 | if (OneofBytes != other.OneofBytes) return false; |
| 935 | if (OneofFieldCase != other.OneofFieldCase) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 936 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 937 | } |
| 938 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 939 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 940 | public override int GetHashCode() { |
| 941 | int hash = 1; |
| 942 | if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode(); |
| 943 | if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode(); |
| 944 | if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode(); |
| 945 | if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode(); |
| 946 | if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode(); |
| 947 | if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode(); |
| 948 | if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode(); |
| 949 | if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode(); |
| 950 | if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode(); |
| 951 | if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 952 | if (SingleFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SingleFloat); |
| 953 | if (SingleDouble != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SingleDouble); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 954 | if (SingleBool != false) hash ^= SingleBool.GetHashCode(); |
| 955 | if (SingleString.Length != 0) hash ^= SingleString.GetHashCode(); |
| 956 | if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode(); |
| 957 | if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode(); |
| 958 | if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCode(); |
| 959 | if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 960 | if (SingleNestedEnum != 0) hash ^= SingleNestedEnum.GetHashCode(); |
| 961 | if (SingleForeignEnum != 0) hash ^= SingleForeignEnum.GetHashCode(); |
| 962 | if (SingleImportEnum != 0) hash ^= SingleImportEnum.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 963 | if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.GetHashCode(); |
| 964 | hash ^= repeatedInt32_.GetHashCode(); |
| 965 | hash ^= repeatedInt64_.GetHashCode(); |
| 966 | hash ^= repeatedUint32_.GetHashCode(); |
| 967 | hash ^= repeatedUint64_.GetHashCode(); |
| 968 | hash ^= repeatedSint32_.GetHashCode(); |
| 969 | hash ^= repeatedSint64_.GetHashCode(); |
| 970 | hash ^= repeatedFixed32_.GetHashCode(); |
| 971 | hash ^= repeatedFixed64_.GetHashCode(); |
| 972 | hash ^= repeatedSfixed32_.GetHashCode(); |
| 973 | hash ^= repeatedSfixed64_.GetHashCode(); |
| 974 | hash ^= repeatedFloat_.GetHashCode(); |
| 975 | hash ^= repeatedDouble_.GetHashCode(); |
| 976 | hash ^= repeatedBool_.GetHashCode(); |
| 977 | hash ^= repeatedString_.GetHashCode(); |
| 978 | hash ^= repeatedBytes_.GetHashCode(); |
| 979 | hash ^= repeatedNestedMessage_.GetHashCode(); |
| 980 | hash ^= repeatedForeignMessage_.GetHashCode(); |
| 981 | hash ^= repeatedImportMessage_.GetHashCode(); |
| 982 | hash ^= repeatedNestedEnum_.GetHashCode(); |
| 983 | hash ^= repeatedForeignEnum_.GetHashCode(); |
| 984 | hash ^= repeatedImportEnum_.GetHashCode(); |
| 985 | hash ^= repeatedPublicImportMessage_.GetHashCode(); |
| 986 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode(); |
| 987 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode(); |
| 988 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode(); |
| 989 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode(); |
| 990 | hash ^= (int) oneofFieldCase_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 991 | if (_unknownFields != null) { |
| 992 | hash ^= _unknownFields.GetHashCode(); |
| 993 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 994 | return hash; |
| 995 | } |
| 996 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 997 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 998 | public override string ToString() { |
| 999 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1000 | } |
| 1001 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1002 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1003 | public void WriteTo(pb::CodedOutputStream output) { |
| 1004 | if (SingleInt32 != 0) { |
| 1005 | output.WriteRawTag(8); |
| 1006 | output.WriteInt32(SingleInt32); |
| 1007 | } |
| 1008 | if (SingleInt64 != 0L) { |
| 1009 | output.WriteRawTag(16); |
| 1010 | output.WriteInt64(SingleInt64); |
| 1011 | } |
| 1012 | if (SingleUint32 != 0) { |
| 1013 | output.WriteRawTag(24); |
| 1014 | output.WriteUInt32(SingleUint32); |
| 1015 | } |
| 1016 | if (SingleUint64 != 0UL) { |
| 1017 | output.WriteRawTag(32); |
| 1018 | output.WriteUInt64(SingleUint64); |
| 1019 | } |
| 1020 | if (SingleSint32 != 0) { |
| 1021 | output.WriteRawTag(40); |
| 1022 | output.WriteSInt32(SingleSint32); |
| 1023 | } |
| 1024 | if (SingleSint64 != 0L) { |
| 1025 | output.WriteRawTag(48); |
| 1026 | output.WriteSInt64(SingleSint64); |
| 1027 | } |
| 1028 | if (SingleFixed32 != 0) { |
| 1029 | output.WriteRawTag(61); |
| 1030 | output.WriteFixed32(SingleFixed32); |
| 1031 | } |
| 1032 | if (SingleFixed64 != 0UL) { |
| 1033 | output.WriteRawTag(65); |
| 1034 | output.WriteFixed64(SingleFixed64); |
| 1035 | } |
| 1036 | if (SingleSfixed32 != 0) { |
| 1037 | output.WriteRawTag(77); |
| 1038 | output.WriteSFixed32(SingleSfixed32); |
| 1039 | } |
| 1040 | if (SingleSfixed64 != 0L) { |
| 1041 | output.WriteRawTag(81); |
| 1042 | output.WriteSFixed64(SingleSfixed64); |
| 1043 | } |
| 1044 | if (SingleFloat != 0F) { |
| 1045 | output.WriteRawTag(93); |
| 1046 | output.WriteFloat(SingleFloat); |
| 1047 | } |
| 1048 | if (SingleDouble != 0D) { |
| 1049 | output.WriteRawTag(97); |
| 1050 | output.WriteDouble(SingleDouble); |
| 1051 | } |
| 1052 | if (SingleBool != false) { |
| 1053 | output.WriteRawTag(104); |
| 1054 | output.WriteBool(SingleBool); |
| 1055 | } |
| 1056 | if (SingleString.Length != 0) { |
| 1057 | output.WriteRawTag(114); |
| 1058 | output.WriteString(SingleString); |
| 1059 | } |
| 1060 | if (SingleBytes.Length != 0) { |
| 1061 | output.WriteRawTag(122); |
| 1062 | output.WriteBytes(SingleBytes); |
| 1063 | } |
| 1064 | if (singleNestedMessage_ != null) { |
| 1065 | output.WriteRawTag(146, 1); |
| 1066 | output.WriteMessage(SingleNestedMessage); |
| 1067 | } |
| 1068 | if (singleForeignMessage_ != null) { |
| 1069 | output.WriteRawTag(154, 1); |
| 1070 | output.WriteMessage(SingleForeignMessage); |
| 1071 | } |
| 1072 | if (singleImportMessage_ != null) { |
| 1073 | output.WriteRawTag(162, 1); |
| 1074 | output.WriteMessage(SingleImportMessage); |
| 1075 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1076 | if (SingleNestedEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1077 | output.WriteRawTag(168, 1); |
| 1078 | output.WriteEnum((int) SingleNestedEnum); |
| 1079 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1080 | if (SingleForeignEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1081 | output.WriteRawTag(176, 1); |
| 1082 | output.WriteEnum((int) SingleForeignEnum); |
| 1083 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1084 | if (SingleImportEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1085 | output.WriteRawTag(184, 1); |
| 1086 | output.WriteEnum((int) SingleImportEnum); |
| 1087 | } |
| 1088 | if (singlePublicImportMessage_ != null) { |
| 1089 | output.WriteRawTag(210, 1); |
| 1090 | output.WriteMessage(SinglePublicImportMessage); |
| 1091 | } |
| 1092 | repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); |
| 1093 | repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec); |
| 1094 | repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec); |
| 1095 | repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec); |
| 1096 | repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec); |
| 1097 | repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec); |
| 1098 | repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec); |
| 1099 | repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec); |
| 1100 | repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec); |
| 1101 | repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec); |
| 1102 | repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec); |
| 1103 | repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec); |
| 1104 | repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec); |
| 1105 | repeatedString_.WriteTo(output, _repeated_repeatedString_codec); |
| 1106 | repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec); |
| 1107 | repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec); |
| 1108 | repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec); |
| 1109 | repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec); |
| 1110 | repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec); |
| 1111 | repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec); |
| 1112 | repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec); |
| 1113 | repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImportMessage_codec); |
| 1114 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1115 | output.WriteRawTag(248, 6); |
| 1116 | output.WriteUInt32(OneofUint32); |
| 1117 | } |
| 1118 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1119 | output.WriteRawTag(130, 7); |
| 1120 | output.WriteMessage(OneofNestedMessage); |
| 1121 | } |
| 1122 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1123 | output.WriteRawTag(138, 7); |
| 1124 | output.WriteString(OneofString); |
| 1125 | } |
| 1126 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1127 | output.WriteRawTag(146, 7); |
| 1128 | output.WriteBytes(OneofBytes); |
| 1129 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1130 | if (_unknownFields != null) { |
| 1131 | _unknownFields.WriteTo(output); |
| 1132 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1133 | } |
| 1134 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1136 | public int CalculateSize() { |
| 1137 | int size = 0; |
| 1138 | if (SingleInt32 != 0) { |
| 1139 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32); |
| 1140 | } |
| 1141 | if (SingleInt64 != 0L) { |
| 1142 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64); |
| 1143 | } |
| 1144 | if (SingleUint32 != 0) { |
| 1145 | size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32); |
| 1146 | } |
| 1147 | if (SingleUint64 != 0UL) { |
| 1148 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64); |
| 1149 | } |
| 1150 | if (SingleSint32 != 0) { |
| 1151 | size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32); |
| 1152 | } |
| 1153 | if (SingleSint64 != 0L) { |
| 1154 | size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64); |
| 1155 | } |
| 1156 | if (SingleFixed32 != 0) { |
| 1157 | size += 1 + 4; |
| 1158 | } |
| 1159 | if (SingleFixed64 != 0UL) { |
| 1160 | size += 1 + 8; |
| 1161 | } |
| 1162 | if (SingleSfixed32 != 0) { |
| 1163 | size += 1 + 4; |
| 1164 | } |
| 1165 | if (SingleSfixed64 != 0L) { |
| 1166 | size += 1 + 8; |
| 1167 | } |
| 1168 | if (SingleFloat != 0F) { |
| 1169 | size += 1 + 4; |
| 1170 | } |
| 1171 | if (SingleDouble != 0D) { |
| 1172 | size += 1 + 8; |
| 1173 | } |
| 1174 | if (SingleBool != false) { |
| 1175 | size += 1 + 1; |
| 1176 | } |
| 1177 | if (SingleString.Length != 0) { |
| 1178 | size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString); |
| 1179 | } |
| 1180 | if (SingleBytes.Length != 0) { |
| 1181 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes); |
| 1182 | } |
| 1183 | if (singleNestedMessage_ != null) { |
| 1184 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage); |
| 1185 | } |
| 1186 | if (singleForeignMessage_ != null) { |
| 1187 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessage); |
| 1188 | } |
| 1189 | if (singleImportMessage_ != null) { |
| 1190 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage); |
| 1191 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1192 | if (SingleNestedEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1193 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum); |
| 1194 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1195 | if (SingleForeignEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1196 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnum); |
| 1197 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1198 | if (SingleImportEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1199 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum); |
| 1200 | } |
| 1201 | if (singlePublicImportMessage_ != null) { |
| 1202 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportMessage); |
| 1203 | } |
| 1204 | size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); |
| 1205 | size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec); |
| 1206 | size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec); |
| 1207 | size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec); |
| 1208 | size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec); |
| 1209 | size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec); |
| 1210 | size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec); |
| 1211 | size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec); |
| 1212 | size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec); |
| 1213 | size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec); |
| 1214 | size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec); |
| 1215 | size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec); |
| 1216 | size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec); |
| 1217 | size += repeatedString_.CalculateSize(_repeated_repeatedString_codec); |
| 1218 | size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec); |
| 1219 | size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec); |
| 1220 | size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec); |
| 1221 | size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec); |
| 1222 | size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec); |
| 1223 | size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec); |
| 1224 | size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec); |
| 1225 | size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPublicImportMessage_codec); |
| 1226 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1227 | size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32); |
| 1228 | } |
| 1229 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1230 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage); |
| 1231 | } |
| 1232 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1233 | size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString); |
| 1234 | } |
| 1235 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1236 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes); |
| 1237 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1238 | if (_unknownFields != null) { |
| 1239 | size += _unknownFields.CalculateSize(); |
| 1240 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1241 | return size; |
| 1242 | } |
| 1243 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1245 | public void MergeFrom(TestAllTypes other) { |
| 1246 | if (other == null) { |
| 1247 | return; |
| 1248 | } |
| 1249 | if (other.SingleInt32 != 0) { |
| 1250 | SingleInt32 = other.SingleInt32; |
| 1251 | } |
| 1252 | if (other.SingleInt64 != 0L) { |
| 1253 | SingleInt64 = other.SingleInt64; |
| 1254 | } |
| 1255 | if (other.SingleUint32 != 0) { |
| 1256 | SingleUint32 = other.SingleUint32; |
| 1257 | } |
| 1258 | if (other.SingleUint64 != 0UL) { |
| 1259 | SingleUint64 = other.SingleUint64; |
| 1260 | } |
| 1261 | if (other.SingleSint32 != 0) { |
| 1262 | SingleSint32 = other.SingleSint32; |
| 1263 | } |
| 1264 | if (other.SingleSint64 != 0L) { |
| 1265 | SingleSint64 = other.SingleSint64; |
| 1266 | } |
| 1267 | if (other.SingleFixed32 != 0) { |
| 1268 | SingleFixed32 = other.SingleFixed32; |
| 1269 | } |
| 1270 | if (other.SingleFixed64 != 0UL) { |
| 1271 | SingleFixed64 = other.SingleFixed64; |
| 1272 | } |
| 1273 | if (other.SingleSfixed32 != 0) { |
| 1274 | SingleSfixed32 = other.SingleSfixed32; |
| 1275 | } |
| 1276 | if (other.SingleSfixed64 != 0L) { |
| 1277 | SingleSfixed64 = other.SingleSfixed64; |
| 1278 | } |
| 1279 | if (other.SingleFloat != 0F) { |
| 1280 | SingleFloat = other.SingleFloat; |
| 1281 | } |
| 1282 | if (other.SingleDouble != 0D) { |
| 1283 | SingleDouble = other.SingleDouble; |
| 1284 | } |
| 1285 | if (other.SingleBool != false) { |
| 1286 | SingleBool = other.SingleBool; |
| 1287 | } |
| 1288 | if (other.SingleString.Length != 0) { |
| 1289 | SingleString = other.SingleString; |
| 1290 | } |
| 1291 | if (other.SingleBytes.Length != 0) { |
| 1292 | SingleBytes = other.SingleBytes; |
| 1293 | } |
| 1294 | if (other.singleNestedMessage_ != null) { |
| 1295 | if (singleNestedMessage_ == null) { |
| 1296 | singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 1297 | } |
| 1298 | SingleNestedMessage.MergeFrom(other.SingleNestedMessage); |
| 1299 | } |
| 1300 | if (other.singleForeignMessage_ != null) { |
| 1301 | if (singleForeignMessage_ == null) { |
| 1302 | singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage(); |
| 1303 | } |
| 1304 | SingleForeignMessage.MergeFrom(other.SingleForeignMessage); |
| 1305 | } |
| 1306 | if (other.singleImportMessage_ != null) { |
| 1307 | if (singleImportMessage_ == null) { |
| 1308 | singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage(); |
| 1309 | } |
| 1310 | SingleImportMessage.MergeFrom(other.SingleImportMessage); |
| 1311 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1312 | if (other.SingleNestedEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1313 | SingleNestedEnum = other.SingleNestedEnum; |
| 1314 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1315 | if (other.SingleForeignEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1316 | SingleForeignEnum = other.SingleForeignEnum; |
| 1317 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1318 | if (other.SingleImportEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1319 | SingleImportEnum = other.SingleImportEnum; |
| 1320 | } |
| 1321 | if (other.singlePublicImportMessage_ != null) { |
| 1322 | if (singlePublicImportMessage_ == null) { |
| 1323 | singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage(); |
| 1324 | } |
| 1325 | SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage); |
| 1326 | } |
| 1327 | repeatedInt32_.Add(other.repeatedInt32_); |
| 1328 | repeatedInt64_.Add(other.repeatedInt64_); |
| 1329 | repeatedUint32_.Add(other.repeatedUint32_); |
| 1330 | repeatedUint64_.Add(other.repeatedUint64_); |
| 1331 | repeatedSint32_.Add(other.repeatedSint32_); |
| 1332 | repeatedSint64_.Add(other.repeatedSint64_); |
| 1333 | repeatedFixed32_.Add(other.repeatedFixed32_); |
| 1334 | repeatedFixed64_.Add(other.repeatedFixed64_); |
| 1335 | repeatedSfixed32_.Add(other.repeatedSfixed32_); |
| 1336 | repeatedSfixed64_.Add(other.repeatedSfixed64_); |
| 1337 | repeatedFloat_.Add(other.repeatedFloat_); |
| 1338 | repeatedDouble_.Add(other.repeatedDouble_); |
| 1339 | repeatedBool_.Add(other.repeatedBool_); |
| 1340 | repeatedString_.Add(other.repeatedString_); |
| 1341 | repeatedBytes_.Add(other.repeatedBytes_); |
| 1342 | repeatedNestedMessage_.Add(other.repeatedNestedMessage_); |
| 1343 | repeatedForeignMessage_.Add(other.repeatedForeignMessage_); |
| 1344 | repeatedImportMessage_.Add(other.repeatedImportMessage_); |
| 1345 | repeatedNestedEnum_.Add(other.repeatedNestedEnum_); |
| 1346 | repeatedForeignEnum_.Add(other.repeatedForeignEnum_); |
| 1347 | repeatedImportEnum_.Add(other.repeatedImportEnum_); |
| 1348 | repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_); |
| 1349 | switch (other.OneofFieldCase) { |
| 1350 | case OneofFieldOneofCase.OneofUint32: |
| 1351 | OneofUint32 = other.OneofUint32; |
| 1352 | break; |
| 1353 | case OneofFieldOneofCase.OneofNestedMessage: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1354 | if (OneofNestedMessage == null) { |
| 1355 | OneofNestedMessage = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 1356 | } |
| 1357 | OneofNestedMessage.MergeFrom(other.OneofNestedMessage); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1358 | break; |
| 1359 | case OneofFieldOneofCase.OneofString: |
| 1360 | OneofString = other.OneofString; |
| 1361 | break; |
| 1362 | case OneofFieldOneofCase.OneofBytes: |
| 1363 | OneofBytes = other.OneofBytes; |
| 1364 | break; |
| 1365 | } |
| 1366 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1367 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1368 | } |
| 1369 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1370 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1371 | public void MergeFrom(pb::CodedInputStream input) { |
| 1372 | uint tag; |
| 1373 | while ((tag = input.ReadTag()) != 0) { |
| 1374 | switch(tag) { |
| 1375 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1376 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1377 | break; |
| 1378 | case 8: { |
| 1379 | SingleInt32 = input.ReadInt32(); |
| 1380 | break; |
| 1381 | } |
| 1382 | case 16: { |
| 1383 | SingleInt64 = input.ReadInt64(); |
| 1384 | break; |
| 1385 | } |
| 1386 | case 24: { |
| 1387 | SingleUint32 = input.ReadUInt32(); |
| 1388 | break; |
| 1389 | } |
| 1390 | case 32: { |
| 1391 | SingleUint64 = input.ReadUInt64(); |
| 1392 | break; |
| 1393 | } |
| 1394 | case 40: { |
| 1395 | SingleSint32 = input.ReadSInt32(); |
| 1396 | break; |
| 1397 | } |
| 1398 | case 48: { |
| 1399 | SingleSint64 = input.ReadSInt64(); |
| 1400 | break; |
| 1401 | } |
| 1402 | case 61: { |
| 1403 | SingleFixed32 = input.ReadFixed32(); |
| 1404 | break; |
| 1405 | } |
| 1406 | case 65: { |
| 1407 | SingleFixed64 = input.ReadFixed64(); |
| 1408 | break; |
| 1409 | } |
| 1410 | case 77: { |
| 1411 | SingleSfixed32 = input.ReadSFixed32(); |
| 1412 | break; |
| 1413 | } |
| 1414 | case 81: { |
| 1415 | SingleSfixed64 = input.ReadSFixed64(); |
| 1416 | break; |
| 1417 | } |
| 1418 | case 93: { |
| 1419 | SingleFloat = input.ReadFloat(); |
| 1420 | break; |
| 1421 | } |
| 1422 | case 97: { |
| 1423 | SingleDouble = input.ReadDouble(); |
| 1424 | break; |
| 1425 | } |
| 1426 | case 104: { |
| 1427 | SingleBool = input.ReadBool(); |
| 1428 | break; |
| 1429 | } |
| 1430 | case 114: { |
| 1431 | SingleString = input.ReadString(); |
| 1432 | break; |
| 1433 | } |
| 1434 | case 122: { |
| 1435 | SingleBytes = input.ReadBytes(); |
| 1436 | break; |
| 1437 | } |
| 1438 | case 146: { |
| 1439 | if (singleNestedMessage_ == null) { |
| 1440 | singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 1441 | } |
| 1442 | input.ReadMessage(singleNestedMessage_); |
| 1443 | break; |
| 1444 | } |
| 1445 | case 154: { |
| 1446 | if (singleForeignMessage_ == null) { |
| 1447 | singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage(); |
| 1448 | } |
| 1449 | input.ReadMessage(singleForeignMessage_); |
| 1450 | break; |
| 1451 | } |
| 1452 | case 162: { |
| 1453 | if (singleImportMessage_ == null) { |
| 1454 | singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage(); |
| 1455 | } |
| 1456 | input.ReadMessage(singleImportMessage_); |
| 1457 | break; |
| 1458 | } |
| 1459 | case 168: { |
| 1460 | singleNestedEnum_ = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum(); |
| 1461 | break; |
| 1462 | } |
| 1463 | case 176: { |
| 1464 | singleForeignEnum_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum(); |
| 1465 | break; |
| 1466 | } |
| 1467 | case 184: { |
| 1468 | singleImportEnum_ = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum(); |
| 1469 | break; |
| 1470 | } |
| 1471 | case 210: { |
| 1472 | if (singlePublicImportMessage_ == null) { |
| 1473 | singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage(); |
| 1474 | } |
| 1475 | input.ReadMessage(singlePublicImportMessage_); |
| 1476 | break; |
| 1477 | } |
| 1478 | case 250: |
| 1479 | case 248: { |
| 1480 | repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); |
| 1481 | break; |
| 1482 | } |
| 1483 | case 258: |
| 1484 | case 256: { |
| 1485 | repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec); |
| 1486 | break; |
| 1487 | } |
| 1488 | case 266: |
| 1489 | case 264: { |
| 1490 | repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec); |
| 1491 | break; |
| 1492 | } |
| 1493 | case 274: |
| 1494 | case 272: { |
| 1495 | repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec); |
| 1496 | break; |
| 1497 | } |
| 1498 | case 282: |
| 1499 | case 280: { |
| 1500 | repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec); |
| 1501 | break; |
| 1502 | } |
| 1503 | case 290: |
| 1504 | case 288: { |
| 1505 | repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec); |
| 1506 | break; |
| 1507 | } |
| 1508 | case 298: |
| 1509 | case 301: { |
| 1510 | repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec); |
| 1511 | break; |
| 1512 | } |
| 1513 | case 306: |
| 1514 | case 305: { |
| 1515 | repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec); |
| 1516 | break; |
| 1517 | } |
| 1518 | case 314: |
| 1519 | case 317: { |
| 1520 | repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec); |
| 1521 | break; |
| 1522 | } |
| 1523 | case 322: |
| 1524 | case 321: { |
| 1525 | repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec); |
| 1526 | break; |
| 1527 | } |
| 1528 | case 330: |
| 1529 | case 333: { |
| 1530 | repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec); |
| 1531 | break; |
| 1532 | } |
| 1533 | case 338: |
| 1534 | case 337: { |
| 1535 | repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec); |
| 1536 | break; |
| 1537 | } |
| 1538 | case 346: |
| 1539 | case 344: { |
| 1540 | repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec); |
| 1541 | break; |
| 1542 | } |
| 1543 | case 354: { |
| 1544 | repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec); |
| 1545 | break; |
| 1546 | } |
| 1547 | case 362: { |
| 1548 | repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec); |
| 1549 | break; |
| 1550 | } |
| 1551 | case 386: { |
| 1552 | repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec); |
| 1553 | break; |
| 1554 | } |
| 1555 | case 394: { |
| 1556 | repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec); |
| 1557 | break; |
| 1558 | } |
| 1559 | case 402: { |
| 1560 | repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec); |
| 1561 | break; |
| 1562 | } |
| 1563 | case 410: |
| 1564 | case 408: { |
| 1565 | repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec); |
| 1566 | break; |
| 1567 | } |
| 1568 | case 418: |
| 1569 | case 416: { |
| 1570 | repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec); |
| 1571 | break; |
| 1572 | } |
| 1573 | case 426: |
| 1574 | case 424: { |
| 1575 | repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec); |
| 1576 | break; |
| 1577 | } |
| 1578 | case 434: { |
| 1579 | repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeatedPublicImportMessage_codec); |
| 1580 | break; |
| 1581 | } |
| 1582 | case 888: { |
| 1583 | OneofUint32 = input.ReadUInt32(); |
| 1584 | break; |
| 1585 | } |
| 1586 | case 898: { |
| 1587 | global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 1588 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1589 | subBuilder.MergeFrom(OneofNestedMessage); |
| 1590 | } |
| 1591 | input.ReadMessage(subBuilder); |
| 1592 | OneofNestedMessage = subBuilder; |
| 1593 | break; |
| 1594 | } |
| 1595 | case 906: { |
| 1596 | OneofString = input.ReadString(); |
| 1597 | break; |
| 1598 | } |
| 1599 | case 914: { |
| 1600 | OneofBytes = input.ReadBytes(); |
| 1601 | break; |
| 1602 | } |
| 1603 | } |
| 1604 | } |
| 1605 | } |
| 1606 | |
| 1607 | #region Nested types |
| 1608 | /// <summary>Container for nested types declared in the TestAllTypes message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1609 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1610 | public static partial class Types { |
| 1611 | public enum NestedEnum { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1612 | [pbr::OriginalName("NESTED_ENUM_UNSPECIFIED")] Unspecified = 0, |
| 1613 | [pbr::OriginalName("FOO")] Foo = 1, |
| 1614 | [pbr::OriginalName("BAR")] Bar = 2, |
| 1615 | [pbr::OriginalName("BAZ")] Baz = 3, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1616 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1617 | /// Intentionally negative. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1618 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1619 | [pbr::OriginalName("NEG")] Neg = -1, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1620 | } |
| 1621 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1622 | public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { |
| 1623 | private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1624 | private pb::UnknownFieldSet _unknownFields; |
| 1625 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1626 | public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } |
| 1627 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1628 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1629 | public static pbr::MessageDescriptor Descriptor { |
| 1630 | get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; } |
| 1631 | } |
| 1632 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1633 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1634 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1635 | get { return Descriptor; } |
| 1636 | } |
| 1637 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1638 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1639 | public NestedMessage() { |
| 1640 | OnConstruction(); |
| 1641 | } |
| 1642 | |
| 1643 | partial void OnConstruction(); |
| 1644 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1645 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1646 | public NestedMessage(NestedMessage other) : this() { |
| 1647 | bb_ = other.bb_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1648 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1649 | } |
| 1650 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1651 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1652 | public NestedMessage Clone() { |
| 1653 | return new NestedMessage(this); |
| 1654 | } |
| 1655 | |
| 1656 | /// <summary>Field number for the "bb" field.</summary> |
| 1657 | public const int BbFieldNumber = 1; |
| 1658 | private int bb_; |
| 1659 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1660 | /// The field name "b" fails to compile in proto1 because it conflicts with |
| 1661 | /// a local variable named "b" in one of the generated methods. Doh. |
| 1662 | /// This file needs to compile in proto1 to test backwards-compatibility. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1663 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1664 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1665 | public int Bb { |
| 1666 | get { return bb_; } |
| 1667 | set { |
| 1668 | bb_ = value; |
| 1669 | } |
| 1670 | } |
| 1671 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1672 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1673 | public override bool Equals(object other) { |
| 1674 | return Equals(other as NestedMessage); |
| 1675 | } |
| 1676 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1677 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1678 | public bool Equals(NestedMessage other) { |
| 1679 | if (ReferenceEquals(other, null)) { |
| 1680 | return false; |
| 1681 | } |
| 1682 | if (ReferenceEquals(other, this)) { |
| 1683 | return true; |
| 1684 | } |
| 1685 | if (Bb != other.Bb) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1686 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1687 | } |
| 1688 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1689 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1690 | public override int GetHashCode() { |
| 1691 | int hash = 1; |
| 1692 | if (Bb != 0) hash ^= Bb.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1693 | if (_unknownFields != null) { |
| 1694 | hash ^= _unknownFields.GetHashCode(); |
| 1695 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1696 | return hash; |
| 1697 | } |
| 1698 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1699 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1700 | public override string ToString() { |
| 1701 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1702 | } |
| 1703 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1704 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1705 | public void WriteTo(pb::CodedOutputStream output) { |
| 1706 | if (Bb != 0) { |
| 1707 | output.WriteRawTag(8); |
| 1708 | output.WriteInt32(Bb); |
| 1709 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1710 | if (_unknownFields != null) { |
| 1711 | _unknownFields.WriteTo(output); |
| 1712 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1713 | } |
| 1714 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1715 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1716 | public int CalculateSize() { |
| 1717 | int size = 0; |
| 1718 | if (Bb != 0) { |
| 1719 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 1720 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1721 | if (_unknownFields != null) { |
| 1722 | size += _unknownFields.CalculateSize(); |
| 1723 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1724 | return size; |
| 1725 | } |
| 1726 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1727 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1728 | public void MergeFrom(NestedMessage other) { |
| 1729 | if (other == null) { |
| 1730 | return; |
| 1731 | } |
| 1732 | if (other.Bb != 0) { |
| 1733 | Bb = other.Bb; |
| 1734 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1735 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1736 | } |
| 1737 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1738 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1739 | public void MergeFrom(pb::CodedInputStream input) { |
| 1740 | uint tag; |
| 1741 | while ((tag = input.ReadTag()) != 0) { |
| 1742 | switch(tag) { |
| 1743 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1744 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1745 | break; |
| 1746 | case 8: { |
| 1747 | Bb = input.ReadInt32(); |
| 1748 | break; |
| 1749 | } |
| 1750 | } |
| 1751 | } |
| 1752 | } |
| 1753 | |
| 1754 | } |
| 1755 | |
| 1756 | } |
| 1757 | #endregion |
| 1758 | |
| 1759 | } |
| 1760 | |
| 1761 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1762 | /// This proto includes a recusively nested message. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1763 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1764 | public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> { |
| 1765 | private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1766 | private pb::UnknownFieldSet _unknownFields; |
| 1767 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1768 | public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _parser; } } |
| 1769 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1770 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1771 | public static pbr::MessageDescriptor Descriptor { |
| 1772 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[1]; } |
| 1773 | } |
| 1774 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1775 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1776 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1777 | get { return Descriptor; } |
| 1778 | } |
| 1779 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1780 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1781 | public NestedTestAllTypes() { |
| 1782 | OnConstruction(); |
| 1783 | } |
| 1784 | |
| 1785 | partial void OnConstruction(); |
| 1786 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1787 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1788 | public NestedTestAllTypes(NestedTestAllTypes other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1789 | child_ = other.child_ != null ? other.child_.Clone() : null; |
| 1790 | payload_ = other.payload_ != null ? other.payload_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1791 | repeatedChild_ = other.repeatedChild_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1792 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1793 | } |
| 1794 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1795 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1796 | public NestedTestAllTypes Clone() { |
| 1797 | return new NestedTestAllTypes(this); |
| 1798 | } |
| 1799 | |
| 1800 | /// <summary>Field number for the "child" field.</summary> |
| 1801 | public const int ChildFieldNumber = 1; |
| 1802 | private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1803 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1804 | public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child { |
| 1805 | get { return child_; } |
| 1806 | set { |
| 1807 | child_ = value; |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | /// <summary>Field number for the "payload" field.</summary> |
| 1812 | public const int PayloadFieldNumber = 2; |
| 1813 | private global::Google.Protobuf.TestProtos.TestAllTypes payload_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1814 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1815 | public global::Google.Protobuf.TestProtos.TestAllTypes Payload { |
| 1816 | get { return payload_; } |
| 1817 | set { |
| 1818 | payload_ = value; |
| 1819 | } |
| 1820 | } |
| 1821 | |
| 1822 | /// <summary>Field number for the "repeated_child" field.</summary> |
| 1823 | public const int RepeatedChildFieldNumber = 3; |
| 1824 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.NestedTestAllTypes> _repeated_repeatedChild_codec |
| 1825 | = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser); |
| 1826 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1827 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1828 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> RepeatedChild { |
| 1829 | get { return repeatedChild_; } |
| 1830 | } |
| 1831 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1832 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1833 | public override bool Equals(object other) { |
| 1834 | return Equals(other as NestedTestAllTypes); |
| 1835 | } |
| 1836 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1837 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1838 | public bool Equals(NestedTestAllTypes other) { |
| 1839 | if (ReferenceEquals(other, null)) { |
| 1840 | return false; |
| 1841 | } |
| 1842 | if (ReferenceEquals(other, this)) { |
| 1843 | return true; |
| 1844 | } |
| 1845 | if (!object.Equals(Child, other.Child)) return false; |
| 1846 | if (!object.Equals(Payload, other.Payload)) return false; |
| 1847 | if(!repeatedChild_.Equals(other.repeatedChild_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1848 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1849 | } |
| 1850 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1851 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1852 | public override int GetHashCode() { |
| 1853 | int hash = 1; |
| 1854 | if (child_ != null) hash ^= Child.GetHashCode(); |
| 1855 | if (payload_ != null) hash ^= Payload.GetHashCode(); |
| 1856 | hash ^= repeatedChild_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1857 | if (_unknownFields != null) { |
| 1858 | hash ^= _unknownFields.GetHashCode(); |
| 1859 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1860 | return hash; |
| 1861 | } |
| 1862 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1863 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1864 | public override string ToString() { |
| 1865 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1866 | } |
| 1867 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1869 | public void WriteTo(pb::CodedOutputStream output) { |
| 1870 | if (child_ != null) { |
| 1871 | output.WriteRawTag(10); |
| 1872 | output.WriteMessage(Child); |
| 1873 | } |
| 1874 | if (payload_ != null) { |
| 1875 | output.WriteRawTag(18); |
| 1876 | output.WriteMessage(Payload); |
| 1877 | } |
| 1878 | repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1879 | if (_unknownFields != null) { |
| 1880 | _unknownFields.WriteTo(output); |
| 1881 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1882 | } |
| 1883 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1884 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1885 | public int CalculateSize() { |
| 1886 | int size = 0; |
| 1887 | if (child_ != null) { |
| 1888 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child); |
| 1889 | } |
| 1890 | if (payload_ != null) { |
| 1891 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload); |
| 1892 | } |
| 1893 | size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1894 | if (_unknownFields != null) { |
| 1895 | size += _unknownFields.CalculateSize(); |
| 1896 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1897 | return size; |
| 1898 | } |
| 1899 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1900 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1901 | public void MergeFrom(NestedTestAllTypes other) { |
| 1902 | if (other == null) { |
| 1903 | return; |
| 1904 | } |
| 1905 | if (other.child_ != null) { |
| 1906 | if (child_ == null) { |
| 1907 | child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes(); |
| 1908 | } |
| 1909 | Child.MergeFrom(other.Child); |
| 1910 | } |
| 1911 | if (other.payload_ != null) { |
| 1912 | if (payload_ == null) { |
| 1913 | payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 1914 | } |
| 1915 | Payload.MergeFrom(other.Payload); |
| 1916 | } |
| 1917 | repeatedChild_.Add(other.repeatedChild_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1918 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1919 | } |
| 1920 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1921 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1922 | public void MergeFrom(pb::CodedInputStream input) { |
| 1923 | uint tag; |
| 1924 | while ((tag = input.ReadTag()) != 0) { |
| 1925 | switch(tag) { |
| 1926 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1927 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1928 | break; |
| 1929 | case 10: { |
| 1930 | if (child_ == null) { |
| 1931 | child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes(); |
| 1932 | } |
| 1933 | input.ReadMessage(child_); |
| 1934 | break; |
| 1935 | } |
| 1936 | case 18: { |
| 1937 | if (payload_ == null) { |
| 1938 | payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 1939 | } |
| 1940 | input.ReadMessage(payload_); |
| 1941 | break; |
| 1942 | } |
| 1943 | case 26: { |
| 1944 | repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec); |
| 1945 | break; |
| 1946 | } |
| 1947 | } |
| 1948 | } |
| 1949 | } |
| 1950 | |
| 1951 | } |
| 1952 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1953 | public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecatedFields> { |
| 1954 | private static readonly pb::MessageParser<TestDeprecatedFields> _parser = new pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1955 | private pb::UnknownFieldSet _unknownFields; |
| 1956 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1957 | public static pb::MessageParser<TestDeprecatedFields> Parser { get { return _parser; } } |
| 1958 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1959 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1960 | public static pbr::MessageDescriptor Descriptor { |
| 1961 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[2]; } |
| 1962 | } |
| 1963 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1964 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1965 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1966 | get { return Descriptor; } |
| 1967 | } |
| 1968 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1969 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1970 | public TestDeprecatedFields() { |
| 1971 | OnConstruction(); |
| 1972 | } |
| 1973 | |
| 1974 | partial void OnConstruction(); |
| 1975 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1976 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1977 | public TestDeprecatedFields(TestDeprecatedFields other) : this() { |
| 1978 | deprecatedInt32_ = other.deprecatedInt32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1979 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1980 | } |
| 1981 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1982 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1983 | public TestDeprecatedFields Clone() { |
| 1984 | return new TestDeprecatedFields(this); |
| 1985 | } |
| 1986 | |
| 1987 | /// <summary>Field number for the "deprecated_int32" field.</summary> |
| 1988 | public const int DeprecatedInt32FieldNumber = 1; |
| 1989 | private int deprecatedInt32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1990 | [global::System.ObsoleteAttribute] |
| 1991 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1992 | public int DeprecatedInt32 { |
| 1993 | get { return deprecatedInt32_; } |
| 1994 | set { |
| 1995 | deprecatedInt32_ = value; |
| 1996 | } |
| 1997 | } |
| 1998 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1999 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2000 | public override bool Equals(object other) { |
| 2001 | return Equals(other as TestDeprecatedFields); |
| 2002 | } |
| 2003 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2004 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2005 | public bool Equals(TestDeprecatedFields other) { |
| 2006 | if (ReferenceEquals(other, null)) { |
| 2007 | return false; |
| 2008 | } |
| 2009 | if (ReferenceEquals(other, this)) { |
| 2010 | return true; |
| 2011 | } |
| 2012 | if (DeprecatedInt32 != other.DeprecatedInt32) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2013 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2014 | } |
| 2015 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2016 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2017 | public override int GetHashCode() { |
| 2018 | int hash = 1; |
| 2019 | if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2020 | if (_unknownFields != null) { |
| 2021 | hash ^= _unknownFields.GetHashCode(); |
| 2022 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2023 | return hash; |
| 2024 | } |
| 2025 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2026 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2027 | public override string ToString() { |
| 2028 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2029 | } |
| 2030 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2031 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2032 | public void WriteTo(pb::CodedOutputStream output) { |
| 2033 | if (DeprecatedInt32 != 0) { |
| 2034 | output.WriteRawTag(8); |
| 2035 | output.WriteInt32(DeprecatedInt32); |
| 2036 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2037 | if (_unknownFields != null) { |
| 2038 | _unknownFields.WriteTo(output); |
| 2039 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2040 | } |
| 2041 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2042 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2043 | public int CalculateSize() { |
| 2044 | int size = 0; |
| 2045 | if (DeprecatedInt32 != 0) { |
| 2046 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32); |
| 2047 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2048 | if (_unknownFields != null) { |
| 2049 | size += _unknownFields.CalculateSize(); |
| 2050 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2051 | return size; |
| 2052 | } |
| 2053 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2054 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2055 | public void MergeFrom(TestDeprecatedFields other) { |
| 2056 | if (other == null) { |
| 2057 | return; |
| 2058 | } |
| 2059 | if (other.DeprecatedInt32 != 0) { |
| 2060 | DeprecatedInt32 = other.DeprecatedInt32; |
| 2061 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2062 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2063 | } |
| 2064 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2065 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2066 | public void MergeFrom(pb::CodedInputStream input) { |
| 2067 | uint tag; |
| 2068 | while ((tag = input.ReadTag()) != 0) { |
| 2069 | switch(tag) { |
| 2070 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2071 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2072 | break; |
| 2073 | case 8: { |
| 2074 | DeprecatedInt32 = input.ReadInt32(); |
| 2075 | break; |
| 2076 | } |
| 2077 | } |
| 2078 | } |
| 2079 | } |
| 2080 | |
| 2081 | } |
| 2082 | |
| 2083 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2084 | /// Define these after TestAllTypes to make sure the compiler can handle |
| 2085 | /// that. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2086 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2087 | public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> { |
| 2088 | private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2089 | private pb::UnknownFieldSet _unknownFields; |
| 2090 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2091 | public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } } |
| 2092 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2093 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2094 | public static pbr::MessageDescriptor Descriptor { |
| 2095 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[3]; } |
| 2096 | } |
| 2097 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2098 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2099 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2100 | get { return Descriptor; } |
| 2101 | } |
| 2102 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2103 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2104 | public ForeignMessage() { |
| 2105 | OnConstruction(); |
| 2106 | } |
| 2107 | |
| 2108 | partial void OnConstruction(); |
| 2109 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2110 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2111 | public ForeignMessage(ForeignMessage other) : this() { |
| 2112 | c_ = other.c_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2113 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2114 | } |
| 2115 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2116 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2117 | public ForeignMessage Clone() { |
| 2118 | return new ForeignMessage(this); |
| 2119 | } |
| 2120 | |
| 2121 | /// <summary>Field number for the "c" field.</summary> |
| 2122 | public const int CFieldNumber = 1; |
| 2123 | private int c_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2124 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2125 | public int C { |
| 2126 | get { return c_; } |
| 2127 | set { |
| 2128 | c_ = value; |
| 2129 | } |
| 2130 | } |
| 2131 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2132 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2133 | public override bool Equals(object other) { |
| 2134 | return Equals(other as ForeignMessage); |
| 2135 | } |
| 2136 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2137 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2138 | public bool Equals(ForeignMessage other) { |
| 2139 | if (ReferenceEquals(other, null)) { |
| 2140 | return false; |
| 2141 | } |
| 2142 | if (ReferenceEquals(other, this)) { |
| 2143 | return true; |
| 2144 | } |
| 2145 | if (C != other.C) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2146 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2147 | } |
| 2148 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2149 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2150 | public override int GetHashCode() { |
| 2151 | int hash = 1; |
| 2152 | if (C != 0) hash ^= C.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2153 | if (_unknownFields != null) { |
| 2154 | hash ^= _unknownFields.GetHashCode(); |
| 2155 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2156 | return hash; |
| 2157 | } |
| 2158 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2159 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2160 | public override string ToString() { |
| 2161 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2162 | } |
| 2163 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2165 | public void WriteTo(pb::CodedOutputStream output) { |
| 2166 | if (C != 0) { |
| 2167 | output.WriteRawTag(8); |
| 2168 | output.WriteInt32(C); |
| 2169 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2170 | if (_unknownFields != null) { |
| 2171 | _unknownFields.WriteTo(output); |
| 2172 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2173 | } |
| 2174 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2175 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2176 | public int CalculateSize() { |
| 2177 | int size = 0; |
| 2178 | if (C != 0) { |
| 2179 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(C); |
| 2180 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2181 | if (_unknownFields != null) { |
| 2182 | size += _unknownFields.CalculateSize(); |
| 2183 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2184 | return size; |
| 2185 | } |
| 2186 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2187 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2188 | public void MergeFrom(ForeignMessage other) { |
| 2189 | if (other == null) { |
| 2190 | return; |
| 2191 | } |
| 2192 | if (other.C != 0) { |
| 2193 | C = other.C; |
| 2194 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2195 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2196 | } |
| 2197 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2198 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2199 | public void MergeFrom(pb::CodedInputStream input) { |
| 2200 | uint tag; |
| 2201 | while ((tag = input.ReadTag()) != 0) { |
| 2202 | switch(tag) { |
| 2203 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2204 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2205 | break; |
| 2206 | case 8: { |
| 2207 | C = input.ReadInt32(); |
| 2208 | break; |
| 2209 | } |
| 2210 | } |
| 2211 | } |
| 2212 | } |
| 2213 | |
| 2214 | } |
| 2215 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2216 | public sealed partial class TestReservedFields : pb::IMessage<TestReservedFields> { |
| 2217 | private static readonly pb::MessageParser<TestReservedFields> _parser = new pb::MessageParser<TestReservedFields>(() => new TestReservedFields()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2218 | private pb::UnknownFieldSet _unknownFields; |
| 2219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2220 | public static pb::MessageParser<TestReservedFields> Parser { get { return _parser; } } |
| 2221 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2222 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2223 | public static pbr::MessageDescriptor Descriptor { |
| 2224 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[4]; } |
| 2225 | } |
| 2226 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2227 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2228 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2229 | get { return Descriptor; } |
| 2230 | } |
| 2231 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2232 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2233 | public TestReservedFields() { |
| 2234 | OnConstruction(); |
| 2235 | } |
| 2236 | |
| 2237 | partial void OnConstruction(); |
| 2238 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2239 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2240 | public TestReservedFields(TestReservedFields other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2241 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2242 | } |
| 2243 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2245 | public TestReservedFields Clone() { |
| 2246 | return new TestReservedFields(this); |
| 2247 | } |
| 2248 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2249 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2250 | public override bool Equals(object other) { |
| 2251 | return Equals(other as TestReservedFields); |
| 2252 | } |
| 2253 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2254 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2255 | public bool Equals(TestReservedFields other) { |
| 2256 | if (ReferenceEquals(other, null)) { |
| 2257 | return false; |
| 2258 | } |
| 2259 | if (ReferenceEquals(other, this)) { |
| 2260 | return true; |
| 2261 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2262 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2263 | } |
| 2264 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2265 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2266 | public override int GetHashCode() { |
| 2267 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2268 | if (_unknownFields != null) { |
| 2269 | hash ^= _unknownFields.GetHashCode(); |
| 2270 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2271 | return hash; |
| 2272 | } |
| 2273 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2274 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2275 | public override string ToString() { |
| 2276 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2277 | } |
| 2278 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2279 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2280 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2281 | if (_unknownFields != null) { |
| 2282 | _unknownFields.WriteTo(output); |
| 2283 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2284 | } |
| 2285 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2286 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2287 | public int CalculateSize() { |
| 2288 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2289 | if (_unknownFields != null) { |
| 2290 | size += _unknownFields.CalculateSize(); |
| 2291 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2292 | return size; |
| 2293 | } |
| 2294 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2295 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2296 | public void MergeFrom(TestReservedFields other) { |
| 2297 | if (other == null) { |
| 2298 | return; |
| 2299 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2300 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2301 | } |
| 2302 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2304 | public void MergeFrom(pb::CodedInputStream input) { |
| 2305 | uint tag; |
| 2306 | while ((tag = input.ReadTag()) != 0) { |
| 2307 | switch(tag) { |
| 2308 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2309 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2310 | break; |
| 2311 | } |
| 2312 | } |
| 2313 | } |
| 2314 | |
| 2315 | } |
| 2316 | |
| 2317 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2318 | /// Test that we can use NestedMessage from outside TestAllTypes. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2319 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2320 | public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested> { |
| 2321 | private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2322 | private pb::UnknownFieldSet _unknownFields; |
| 2323 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2324 | public static pb::MessageParser<TestForeignNested> Parser { get { return _parser; } } |
| 2325 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2326 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2327 | public static pbr::MessageDescriptor Descriptor { |
| 2328 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[5]; } |
| 2329 | } |
| 2330 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2331 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2332 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2333 | get { return Descriptor; } |
| 2334 | } |
| 2335 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2336 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2337 | public TestForeignNested() { |
| 2338 | OnConstruction(); |
| 2339 | } |
| 2340 | |
| 2341 | partial void OnConstruction(); |
| 2342 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2343 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2344 | public TestForeignNested(TestForeignNested other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2345 | foreignNested_ = other.foreignNested_ != null ? other.foreignNested_.Clone() : null; |
| 2346 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2347 | } |
| 2348 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2349 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2350 | public TestForeignNested Clone() { |
| 2351 | return new TestForeignNested(this); |
| 2352 | } |
| 2353 | |
| 2354 | /// <summary>Field number for the "foreign_nested" field.</summary> |
| 2355 | public const int ForeignNestedFieldNumber = 1; |
| 2356 | private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2357 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2358 | public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested { |
| 2359 | get { return foreignNested_; } |
| 2360 | set { |
| 2361 | foreignNested_ = value; |
| 2362 | } |
| 2363 | } |
| 2364 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2365 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2366 | public override bool Equals(object other) { |
| 2367 | return Equals(other as TestForeignNested); |
| 2368 | } |
| 2369 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2370 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2371 | public bool Equals(TestForeignNested other) { |
| 2372 | if (ReferenceEquals(other, null)) { |
| 2373 | return false; |
| 2374 | } |
| 2375 | if (ReferenceEquals(other, this)) { |
| 2376 | return true; |
| 2377 | } |
| 2378 | if (!object.Equals(ForeignNested, other.ForeignNested)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2379 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2380 | } |
| 2381 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2382 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2383 | public override int GetHashCode() { |
| 2384 | int hash = 1; |
| 2385 | if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2386 | if (_unknownFields != null) { |
| 2387 | hash ^= _unknownFields.GetHashCode(); |
| 2388 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2389 | return hash; |
| 2390 | } |
| 2391 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2392 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2393 | public override string ToString() { |
| 2394 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2395 | } |
| 2396 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2397 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2398 | public void WriteTo(pb::CodedOutputStream output) { |
| 2399 | if (foreignNested_ != null) { |
| 2400 | output.WriteRawTag(10); |
| 2401 | output.WriteMessage(ForeignNested); |
| 2402 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2403 | if (_unknownFields != null) { |
| 2404 | _unknownFields.WriteTo(output); |
| 2405 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2406 | } |
| 2407 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2408 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2409 | public int CalculateSize() { |
| 2410 | int size = 0; |
| 2411 | if (foreignNested_ != null) { |
| 2412 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested); |
| 2413 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2414 | if (_unknownFields != null) { |
| 2415 | size += _unknownFields.CalculateSize(); |
| 2416 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2417 | return size; |
| 2418 | } |
| 2419 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2420 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2421 | public void MergeFrom(TestForeignNested other) { |
| 2422 | if (other == null) { |
| 2423 | return; |
| 2424 | } |
| 2425 | if (other.foreignNested_ != null) { |
| 2426 | if (foreignNested_ == null) { |
| 2427 | foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 2428 | } |
| 2429 | ForeignNested.MergeFrom(other.ForeignNested); |
| 2430 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2431 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2432 | } |
| 2433 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2434 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2435 | public void MergeFrom(pb::CodedInputStream input) { |
| 2436 | uint tag; |
| 2437 | while ((tag = input.ReadTag()) != 0) { |
| 2438 | switch(tag) { |
| 2439 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2440 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2441 | break; |
| 2442 | case 10: { |
| 2443 | if (foreignNested_ == null) { |
| 2444 | foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage(); |
| 2445 | } |
| 2446 | input.ReadMessage(foreignNested_); |
| 2447 | break; |
| 2448 | } |
| 2449 | } |
| 2450 | } |
| 2451 | } |
| 2452 | |
| 2453 | } |
| 2454 | |
| 2455 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2456 | /// Test that really large tag numbers don't break anything. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2457 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2458 | public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber> { |
| 2459 | private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2460 | private pb::UnknownFieldSet _unknownFields; |
| 2461 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2462 | public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { return _parser; } } |
| 2463 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2464 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2465 | public static pbr::MessageDescriptor Descriptor { |
| 2466 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[6]; } |
| 2467 | } |
| 2468 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2469 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2470 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2471 | get { return Descriptor; } |
| 2472 | } |
| 2473 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2474 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2475 | public TestReallyLargeTagNumber() { |
| 2476 | OnConstruction(); |
| 2477 | } |
| 2478 | |
| 2479 | partial void OnConstruction(); |
| 2480 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2481 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2482 | public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() { |
| 2483 | a_ = other.a_; |
| 2484 | bb_ = other.bb_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2485 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2486 | } |
| 2487 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2488 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2489 | public TestReallyLargeTagNumber Clone() { |
| 2490 | return new TestReallyLargeTagNumber(this); |
| 2491 | } |
| 2492 | |
| 2493 | /// <summary>Field number for the "a" field.</summary> |
| 2494 | public const int AFieldNumber = 1; |
| 2495 | private int a_; |
| 2496 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2497 | /// The largest possible tag number is 2^28 - 1, since the wire format uses |
| 2498 | /// three bits to communicate wire type. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2499 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2500 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2501 | public int A { |
| 2502 | get { return a_; } |
| 2503 | set { |
| 2504 | a_ = value; |
| 2505 | } |
| 2506 | } |
| 2507 | |
| 2508 | /// <summary>Field number for the "bb" field.</summary> |
| 2509 | public const int BbFieldNumber = 268435455; |
| 2510 | private int bb_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2511 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2512 | public int Bb { |
| 2513 | get { return bb_; } |
| 2514 | set { |
| 2515 | bb_ = value; |
| 2516 | } |
| 2517 | } |
| 2518 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2519 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2520 | public override bool Equals(object other) { |
| 2521 | return Equals(other as TestReallyLargeTagNumber); |
| 2522 | } |
| 2523 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2524 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2525 | public bool Equals(TestReallyLargeTagNumber other) { |
| 2526 | if (ReferenceEquals(other, null)) { |
| 2527 | return false; |
| 2528 | } |
| 2529 | if (ReferenceEquals(other, this)) { |
| 2530 | return true; |
| 2531 | } |
| 2532 | if (A != other.A) return false; |
| 2533 | if (Bb != other.Bb) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2534 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2535 | } |
| 2536 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2537 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2538 | public override int GetHashCode() { |
| 2539 | int hash = 1; |
| 2540 | if (A != 0) hash ^= A.GetHashCode(); |
| 2541 | if (Bb != 0) hash ^= Bb.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2542 | if (_unknownFields != null) { |
| 2543 | hash ^= _unknownFields.GetHashCode(); |
| 2544 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2545 | return hash; |
| 2546 | } |
| 2547 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2548 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2549 | public override string ToString() { |
| 2550 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2551 | } |
| 2552 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2553 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2554 | public void WriteTo(pb::CodedOutputStream output) { |
| 2555 | if (A != 0) { |
| 2556 | output.WriteRawTag(8); |
| 2557 | output.WriteInt32(A); |
| 2558 | } |
| 2559 | if (Bb != 0) { |
| 2560 | output.WriteRawTag(248, 255, 255, 255, 7); |
| 2561 | output.WriteInt32(Bb); |
| 2562 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2563 | if (_unknownFields != null) { |
| 2564 | _unknownFields.WriteTo(output); |
| 2565 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2566 | } |
| 2567 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2568 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2569 | public int CalculateSize() { |
| 2570 | int size = 0; |
| 2571 | if (A != 0) { |
| 2572 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(A); |
| 2573 | } |
| 2574 | if (Bb != 0) { |
| 2575 | size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 2576 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2577 | if (_unknownFields != null) { |
| 2578 | size += _unknownFields.CalculateSize(); |
| 2579 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2580 | return size; |
| 2581 | } |
| 2582 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2583 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2584 | public void MergeFrom(TestReallyLargeTagNumber other) { |
| 2585 | if (other == null) { |
| 2586 | return; |
| 2587 | } |
| 2588 | if (other.A != 0) { |
| 2589 | A = other.A; |
| 2590 | } |
| 2591 | if (other.Bb != 0) { |
| 2592 | Bb = other.Bb; |
| 2593 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2594 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2595 | } |
| 2596 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2597 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2598 | public void MergeFrom(pb::CodedInputStream input) { |
| 2599 | uint tag; |
| 2600 | while ((tag = input.ReadTag()) != 0) { |
| 2601 | switch(tag) { |
| 2602 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2603 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2604 | break; |
| 2605 | case 8: { |
| 2606 | A = input.ReadInt32(); |
| 2607 | break; |
| 2608 | } |
| 2609 | case 2147483640: { |
| 2610 | Bb = input.ReadInt32(); |
| 2611 | break; |
| 2612 | } |
| 2613 | } |
| 2614 | } |
| 2615 | } |
| 2616 | |
| 2617 | } |
| 2618 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2619 | public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveMessage> { |
| 2620 | private static readonly pb::MessageParser<TestRecursiveMessage> _parser = new pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2621 | private pb::UnknownFieldSet _unknownFields; |
| 2622 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2623 | public static pb::MessageParser<TestRecursiveMessage> Parser { get { return _parser; } } |
| 2624 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2625 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2626 | public static pbr::MessageDescriptor Descriptor { |
| 2627 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[7]; } |
| 2628 | } |
| 2629 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2630 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2631 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2632 | get { return Descriptor; } |
| 2633 | } |
| 2634 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2635 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2636 | public TestRecursiveMessage() { |
| 2637 | OnConstruction(); |
| 2638 | } |
| 2639 | |
| 2640 | partial void OnConstruction(); |
| 2641 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2642 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2643 | public TestRecursiveMessage(TestRecursiveMessage other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2644 | a_ = other.a_ != null ? other.a_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2645 | i_ = other.i_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2646 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2647 | } |
| 2648 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2649 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2650 | public TestRecursiveMessage Clone() { |
| 2651 | return new TestRecursiveMessage(this); |
| 2652 | } |
| 2653 | |
| 2654 | /// <summary>Field number for the "a" field.</summary> |
| 2655 | public const int AFieldNumber = 1; |
| 2656 | private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2657 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2658 | public global::Google.Protobuf.TestProtos.TestRecursiveMessage A { |
| 2659 | get { return a_; } |
| 2660 | set { |
| 2661 | a_ = value; |
| 2662 | } |
| 2663 | } |
| 2664 | |
| 2665 | /// <summary>Field number for the "i" field.</summary> |
| 2666 | public const int IFieldNumber = 2; |
| 2667 | private int i_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2668 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2669 | public int I { |
| 2670 | get { return i_; } |
| 2671 | set { |
| 2672 | i_ = value; |
| 2673 | } |
| 2674 | } |
| 2675 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2676 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2677 | public override bool Equals(object other) { |
| 2678 | return Equals(other as TestRecursiveMessage); |
| 2679 | } |
| 2680 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2681 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2682 | public bool Equals(TestRecursiveMessage other) { |
| 2683 | if (ReferenceEquals(other, null)) { |
| 2684 | return false; |
| 2685 | } |
| 2686 | if (ReferenceEquals(other, this)) { |
| 2687 | return true; |
| 2688 | } |
| 2689 | if (!object.Equals(A, other.A)) return false; |
| 2690 | if (I != other.I) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2691 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2692 | } |
| 2693 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2694 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2695 | public override int GetHashCode() { |
| 2696 | int hash = 1; |
| 2697 | if (a_ != null) hash ^= A.GetHashCode(); |
| 2698 | if (I != 0) hash ^= I.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2699 | if (_unknownFields != null) { |
| 2700 | hash ^= _unknownFields.GetHashCode(); |
| 2701 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2702 | return hash; |
| 2703 | } |
| 2704 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2705 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2706 | public override string ToString() { |
| 2707 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2708 | } |
| 2709 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2710 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2711 | public void WriteTo(pb::CodedOutputStream output) { |
| 2712 | if (a_ != null) { |
| 2713 | output.WriteRawTag(10); |
| 2714 | output.WriteMessage(A); |
| 2715 | } |
| 2716 | if (I != 0) { |
| 2717 | output.WriteRawTag(16); |
| 2718 | output.WriteInt32(I); |
| 2719 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2720 | if (_unknownFields != null) { |
| 2721 | _unknownFields.WriteTo(output); |
| 2722 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2723 | } |
| 2724 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2725 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2726 | public int CalculateSize() { |
| 2727 | int size = 0; |
| 2728 | if (a_ != null) { |
| 2729 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(A); |
| 2730 | } |
| 2731 | if (I != 0) { |
| 2732 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(I); |
| 2733 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2734 | if (_unknownFields != null) { |
| 2735 | size += _unknownFields.CalculateSize(); |
| 2736 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2737 | return size; |
| 2738 | } |
| 2739 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2740 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2741 | public void MergeFrom(TestRecursiveMessage other) { |
| 2742 | if (other == null) { |
| 2743 | return; |
| 2744 | } |
| 2745 | if (other.a_ != null) { |
| 2746 | if (a_ == null) { |
| 2747 | a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage(); |
| 2748 | } |
| 2749 | A.MergeFrom(other.A); |
| 2750 | } |
| 2751 | if (other.I != 0) { |
| 2752 | I = other.I; |
| 2753 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2754 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2755 | } |
| 2756 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2757 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2758 | public void MergeFrom(pb::CodedInputStream input) { |
| 2759 | uint tag; |
| 2760 | while ((tag = input.ReadTag()) != 0) { |
| 2761 | switch(tag) { |
| 2762 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2763 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2764 | break; |
| 2765 | case 10: { |
| 2766 | if (a_ == null) { |
| 2767 | a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage(); |
| 2768 | } |
| 2769 | input.ReadMessage(a_); |
| 2770 | break; |
| 2771 | } |
| 2772 | case 16: { |
| 2773 | I = input.ReadInt32(); |
| 2774 | break; |
| 2775 | } |
| 2776 | } |
| 2777 | } |
| 2778 | } |
| 2779 | |
| 2780 | } |
| 2781 | |
| 2782 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2783 | /// Test that mutual recursion works. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2784 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2785 | public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA> { |
| 2786 | private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2787 | private pb::UnknownFieldSet _unknownFields; |
| 2788 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2789 | public static pb::MessageParser<TestMutualRecursionA> Parser { get { return _parser; } } |
| 2790 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2791 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2792 | public static pbr::MessageDescriptor Descriptor { |
| 2793 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[8]; } |
| 2794 | } |
| 2795 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2796 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2797 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2798 | get { return Descriptor; } |
| 2799 | } |
| 2800 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2801 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2802 | public TestMutualRecursionA() { |
| 2803 | OnConstruction(); |
| 2804 | } |
| 2805 | |
| 2806 | partial void OnConstruction(); |
| 2807 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2808 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2809 | public TestMutualRecursionA(TestMutualRecursionA other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2810 | bb_ = other.bb_ != null ? other.bb_.Clone() : null; |
| 2811 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2812 | } |
| 2813 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2814 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2815 | public TestMutualRecursionA Clone() { |
| 2816 | return new TestMutualRecursionA(this); |
| 2817 | } |
| 2818 | |
| 2819 | /// <summary>Field number for the "bb" field.</summary> |
| 2820 | public const int BbFieldNumber = 1; |
| 2821 | private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2822 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2823 | public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb { |
| 2824 | get { return bb_; } |
| 2825 | set { |
| 2826 | bb_ = value; |
| 2827 | } |
| 2828 | } |
| 2829 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2830 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2831 | public override bool Equals(object other) { |
| 2832 | return Equals(other as TestMutualRecursionA); |
| 2833 | } |
| 2834 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2835 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2836 | public bool Equals(TestMutualRecursionA other) { |
| 2837 | if (ReferenceEquals(other, null)) { |
| 2838 | return false; |
| 2839 | } |
| 2840 | if (ReferenceEquals(other, this)) { |
| 2841 | return true; |
| 2842 | } |
| 2843 | if (!object.Equals(Bb, other.Bb)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2844 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2845 | } |
| 2846 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2847 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2848 | public override int GetHashCode() { |
| 2849 | int hash = 1; |
| 2850 | if (bb_ != null) hash ^= Bb.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2851 | if (_unknownFields != null) { |
| 2852 | hash ^= _unknownFields.GetHashCode(); |
| 2853 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2854 | return hash; |
| 2855 | } |
| 2856 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2857 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2858 | public override string ToString() { |
| 2859 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2860 | } |
| 2861 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2862 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2863 | public void WriteTo(pb::CodedOutputStream output) { |
| 2864 | if (bb_ != null) { |
| 2865 | output.WriteRawTag(10); |
| 2866 | output.WriteMessage(Bb); |
| 2867 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2868 | if (_unknownFields != null) { |
| 2869 | _unknownFields.WriteTo(output); |
| 2870 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2871 | } |
| 2872 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2873 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2874 | public int CalculateSize() { |
| 2875 | int size = 0; |
| 2876 | if (bb_ != null) { |
| 2877 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb); |
| 2878 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2879 | if (_unknownFields != null) { |
| 2880 | size += _unknownFields.CalculateSize(); |
| 2881 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2882 | return size; |
| 2883 | } |
| 2884 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2885 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2886 | public void MergeFrom(TestMutualRecursionA other) { |
| 2887 | if (other == null) { |
| 2888 | return; |
| 2889 | } |
| 2890 | if (other.bb_ != null) { |
| 2891 | if (bb_ == null) { |
| 2892 | bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB(); |
| 2893 | } |
| 2894 | Bb.MergeFrom(other.Bb); |
| 2895 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2896 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2897 | } |
| 2898 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2899 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2900 | public void MergeFrom(pb::CodedInputStream input) { |
| 2901 | uint tag; |
| 2902 | while ((tag = input.ReadTag()) != 0) { |
| 2903 | switch(tag) { |
| 2904 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2905 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2906 | break; |
| 2907 | case 10: { |
| 2908 | if (bb_ == null) { |
| 2909 | bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB(); |
| 2910 | } |
| 2911 | input.ReadMessage(bb_); |
| 2912 | break; |
| 2913 | } |
| 2914 | } |
| 2915 | } |
| 2916 | } |
| 2917 | |
| 2918 | } |
| 2919 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2920 | public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecursionB> { |
| 2921 | private static readonly pb::MessageParser<TestMutualRecursionB> _parser = new pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2922 | private pb::UnknownFieldSet _unknownFields; |
| 2923 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2924 | public static pb::MessageParser<TestMutualRecursionB> Parser { get { return _parser; } } |
| 2925 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2926 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2927 | public static pbr::MessageDescriptor Descriptor { |
| 2928 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[9]; } |
| 2929 | } |
| 2930 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2931 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2932 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2933 | get { return Descriptor; } |
| 2934 | } |
| 2935 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2936 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2937 | public TestMutualRecursionB() { |
| 2938 | OnConstruction(); |
| 2939 | } |
| 2940 | |
| 2941 | partial void OnConstruction(); |
| 2942 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2943 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2944 | public TestMutualRecursionB(TestMutualRecursionB other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2945 | a_ = other.a_ != null ? other.a_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2946 | optionalInt32_ = other.optionalInt32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2947 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2948 | } |
| 2949 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2950 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2951 | public TestMutualRecursionB Clone() { |
| 2952 | return new TestMutualRecursionB(this); |
| 2953 | } |
| 2954 | |
| 2955 | /// <summary>Field number for the "a" field.</summary> |
| 2956 | public const int AFieldNumber = 1; |
| 2957 | private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2959 | public global::Google.Protobuf.TestProtos.TestMutualRecursionA A { |
| 2960 | get { return a_; } |
| 2961 | set { |
| 2962 | a_ = value; |
| 2963 | } |
| 2964 | } |
| 2965 | |
| 2966 | /// <summary>Field number for the "optional_int32" field.</summary> |
| 2967 | public const int OptionalInt32FieldNumber = 2; |
| 2968 | private int optionalInt32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2969 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2970 | public int OptionalInt32 { |
| 2971 | get { return optionalInt32_; } |
| 2972 | set { |
| 2973 | optionalInt32_ = value; |
| 2974 | } |
| 2975 | } |
| 2976 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2977 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2978 | public override bool Equals(object other) { |
| 2979 | return Equals(other as TestMutualRecursionB); |
| 2980 | } |
| 2981 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2982 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2983 | public bool Equals(TestMutualRecursionB other) { |
| 2984 | if (ReferenceEquals(other, null)) { |
| 2985 | return false; |
| 2986 | } |
| 2987 | if (ReferenceEquals(other, this)) { |
| 2988 | return true; |
| 2989 | } |
| 2990 | if (!object.Equals(A, other.A)) return false; |
| 2991 | if (OptionalInt32 != other.OptionalInt32) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2992 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2993 | } |
| 2994 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2995 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2996 | public override int GetHashCode() { |
| 2997 | int hash = 1; |
| 2998 | if (a_ != null) hash ^= A.GetHashCode(); |
| 2999 | if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3000 | if (_unknownFields != null) { |
| 3001 | hash ^= _unknownFields.GetHashCode(); |
| 3002 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3003 | return hash; |
| 3004 | } |
| 3005 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3006 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3007 | public override string ToString() { |
| 3008 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3009 | } |
| 3010 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3011 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3012 | public void WriteTo(pb::CodedOutputStream output) { |
| 3013 | if (a_ != null) { |
| 3014 | output.WriteRawTag(10); |
| 3015 | output.WriteMessage(A); |
| 3016 | } |
| 3017 | if (OptionalInt32 != 0) { |
| 3018 | output.WriteRawTag(16); |
| 3019 | output.WriteInt32(OptionalInt32); |
| 3020 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3021 | if (_unknownFields != null) { |
| 3022 | _unknownFields.WriteTo(output); |
| 3023 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3024 | } |
| 3025 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3026 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3027 | public int CalculateSize() { |
| 3028 | int size = 0; |
| 3029 | if (a_ != null) { |
| 3030 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(A); |
| 3031 | } |
| 3032 | if (OptionalInt32 != 0) { |
| 3033 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); |
| 3034 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3035 | if (_unknownFields != null) { |
| 3036 | size += _unknownFields.CalculateSize(); |
| 3037 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3038 | return size; |
| 3039 | } |
| 3040 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3041 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3042 | public void MergeFrom(TestMutualRecursionB other) { |
| 3043 | if (other == null) { |
| 3044 | return; |
| 3045 | } |
| 3046 | if (other.a_ != null) { |
| 3047 | if (a_ == null) { |
| 3048 | a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA(); |
| 3049 | } |
| 3050 | A.MergeFrom(other.A); |
| 3051 | } |
| 3052 | if (other.OptionalInt32 != 0) { |
| 3053 | OptionalInt32 = other.OptionalInt32; |
| 3054 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3055 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3056 | } |
| 3057 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3058 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3059 | public void MergeFrom(pb::CodedInputStream input) { |
| 3060 | uint tag; |
| 3061 | while ((tag = input.ReadTag()) != 0) { |
| 3062 | switch(tag) { |
| 3063 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3064 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3065 | break; |
| 3066 | case 10: { |
| 3067 | if (a_ == null) { |
| 3068 | a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA(); |
| 3069 | } |
| 3070 | input.ReadMessage(a_); |
| 3071 | break; |
| 3072 | } |
| 3073 | case 16: { |
| 3074 | OptionalInt32 = input.ReadInt32(); |
| 3075 | break; |
| 3076 | } |
| 3077 | } |
| 3078 | } |
| 3079 | } |
| 3080 | |
| 3081 | } |
| 3082 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3083 | public sealed partial class TestEnumAllowAlias : pb::IMessage<TestEnumAllowAlias> { |
| 3084 | private static readonly pb::MessageParser<TestEnumAllowAlias> _parser = new pb::MessageParser<TestEnumAllowAlias>(() => new TestEnumAllowAlias()); |
| 3085 | private pb::UnknownFieldSet _unknownFields; |
| 3086 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3087 | public static pb::MessageParser<TestEnumAllowAlias> Parser { get { return _parser; } } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3088 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3089 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3090 | public static pbr::MessageDescriptor Descriptor { |
| 3091 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[10]; } |
| 3092 | } |
| 3093 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3094 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3095 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3096 | get { return Descriptor; } |
| 3097 | } |
| 3098 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3099 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3100 | public TestEnumAllowAlias() { |
| 3101 | OnConstruction(); |
| 3102 | } |
| 3103 | |
| 3104 | partial void OnConstruction(); |
| 3105 | |
| 3106 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3107 | public TestEnumAllowAlias(TestEnumAllowAlias other) : this() { |
| 3108 | value_ = other.value_; |
| 3109 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 3110 | } |
| 3111 | |
| 3112 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3113 | public TestEnumAllowAlias Clone() { |
| 3114 | return new TestEnumAllowAlias(this); |
| 3115 | } |
| 3116 | |
| 3117 | /// <summary>Field number for the "value" field.</summary> |
| 3118 | public const int ValueFieldNumber = 1; |
| 3119 | private global::Google.Protobuf.TestProtos.TestEnumWithDupValue value_ = 0; |
| 3120 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3121 | public global::Google.Protobuf.TestProtos.TestEnumWithDupValue Value { |
| 3122 | get { return value_; } |
| 3123 | set { |
| 3124 | value_ = value; |
| 3125 | } |
| 3126 | } |
| 3127 | |
| 3128 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3129 | public override bool Equals(object other) { |
| 3130 | return Equals(other as TestEnumAllowAlias); |
| 3131 | } |
| 3132 | |
| 3133 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3134 | public bool Equals(TestEnumAllowAlias other) { |
| 3135 | if (ReferenceEquals(other, null)) { |
| 3136 | return false; |
| 3137 | } |
| 3138 | if (ReferenceEquals(other, this)) { |
| 3139 | return true; |
| 3140 | } |
| 3141 | if (Value != other.Value) return false; |
| 3142 | return Equals(_unknownFields, other._unknownFields); |
| 3143 | } |
| 3144 | |
| 3145 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3146 | public override int GetHashCode() { |
| 3147 | int hash = 1; |
| 3148 | if (Value != 0) hash ^= Value.GetHashCode(); |
| 3149 | if (_unknownFields != null) { |
| 3150 | hash ^= _unknownFields.GetHashCode(); |
| 3151 | } |
| 3152 | return hash; |
| 3153 | } |
| 3154 | |
| 3155 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3156 | public override string ToString() { |
| 3157 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3158 | } |
| 3159 | |
| 3160 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3161 | public void WriteTo(pb::CodedOutputStream output) { |
| 3162 | if (Value != 0) { |
| 3163 | output.WriteRawTag(8); |
| 3164 | output.WriteEnum((int) Value); |
| 3165 | } |
| 3166 | if (_unknownFields != null) { |
| 3167 | _unknownFields.WriteTo(output); |
| 3168 | } |
| 3169 | } |
| 3170 | |
| 3171 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3172 | public int CalculateSize() { |
| 3173 | int size = 0; |
| 3174 | if (Value != 0) { |
| 3175 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); |
| 3176 | } |
| 3177 | if (_unknownFields != null) { |
| 3178 | size += _unknownFields.CalculateSize(); |
| 3179 | } |
| 3180 | return size; |
| 3181 | } |
| 3182 | |
| 3183 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3184 | public void MergeFrom(TestEnumAllowAlias other) { |
| 3185 | if (other == null) { |
| 3186 | return; |
| 3187 | } |
| 3188 | if (other.Value != 0) { |
| 3189 | Value = other.Value; |
| 3190 | } |
| 3191 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 3192 | } |
| 3193 | |
| 3194 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3195 | public void MergeFrom(pb::CodedInputStream input) { |
| 3196 | uint tag; |
| 3197 | while ((tag = input.ReadTag()) != 0) { |
| 3198 | switch(tag) { |
| 3199 | default: |
| 3200 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 3201 | break; |
| 3202 | case 8: { |
| 3203 | value_ = (global::Google.Protobuf.TestProtos.TestEnumWithDupValue) input.ReadEnum(); |
| 3204 | break; |
| 3205 | } |
| 3206 | } |
| 3207 | } |
| 3208 | } |
| 3209 | |
| 3210 | } |
| 3211 | |
| 3212 | /// <summary> |
| 3213 | /// Test message with CamelCase field names. This violates Protocol Buffer |
| 3214 | /// standard style. |
| 3215 | /// </summary> |
| 3216 | public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames> { |
| 3217 | private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames()); |
| 3218 | private pb::UnknownFieldSet _unknownFields; |
| 3219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3220 | public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { return _parser; } } |
| 3221 | |
| 3222 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3223 | public static pbr::MessageDescriptor Descriptor { |
| 3224 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[11]; } |
| 3225 | } |
| 3226 | |
| 3227 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3228 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3229 | get { return Descriptor; } |
| 3230 | } |
| 3231 | |
| 3232 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3233 | public TestCamelCaseFieldNames() { |
| 3234 | OnConstruction(); |
| 3235 | } |
| 3236 | |
| 3237 | partial void OnConstruction(); |
| 3238 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3239 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3240 | public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() { |
| 3241 | primitiveField_ = other.primitiveField_; |
| 3242 | stringField_ = other.stringField_; |
| 3243 | enumField_ = other.enumField_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3244 | messageField_ = other.messageField_ != null ? other.messageField_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3245 | repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone(); |
| 3246 | repeatedStringField_ = other.repeatedStringField_.Clone(); |
| 3247 | repeatedEnumField_ = other.repeatedEnumField_.Clone(); |
| 3248 | repeatedMessageField_ = other.repeatedMessageField_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3249 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3250 | } |
| 3251 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3253 | public TestCamelCaseFieldNames Clone() { |
| 3254 | return new TestCamelCaseFieldNames(this); |
| 3255 | } |
| 3256 | |
| 3257 | /// <summary>Field number for the "PrimitiveField" field.</summary> |
| 3258 | public const int PrimitiveFieldFieldNumber = 1; |
| 3259 | private int primitiveField_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3260 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3261 | public int PrimitiveField { |
| 3262 | get { return primitiveField_; } |
| 3263 | set { |
| 3264 | primitiveField_ = value; |
| 3265 | } |
| 3266 | } |
| 3267 | |
| 3268 | /// <summary>Field number for the "StringField" field.</summary> |
| 3269 | public const int StringFieldFieldNumber = 2; |
| 3270 | private string stringField_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3271 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3272 | public string StringField { |
| 3273 | get { return stringField_; } |
| 3274 | set { |
| 3275 | stringField_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3276 | } |
| 3277 | } |
| 3278 | |
| 3279 | /// <summary>Field number for the "EnumField" field.</summary> |
| 3280 | public const int EnumFieldFieldNumber = 3; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3281 | private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = 0; |
| 3282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3283 | public global::Google.Protobuf.TestProtos.ForeignEnum EnumField { |
| 3284 | get { return enumField_; } |
| 3285 | set { |
| 3286 | enumField_ = value; |
| 3287 | } |
| 3288 | } |
| 3289 | |
| 3290 | /// <summary>Field number for the "MessageField" field.</summary> |
| 3291 | public const int MessageFieldFieldNumber = 4; |
| 3292 | private global::Google.Protobuf.TestProtos.ForeignMessage messageField_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3293 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3294 | public global::Google.Protobuf.TestProtos.ForeignMessage MessageField { |
| 3295 | get { return messageField_; } |
| 3296 | set { |
| 3297 | messageField_ = value; |
| 3298 | } |
| 3299 | } |
| 3300 | |
| 3301 | /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary> |
| 3302 | public const int RepeatedPrimitiveFieldFieldNumber = 7; |
| 3303 | private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField_codec |
| 3304 | = pb::FieldCodec.ForInt32(58); |
| 3305 | private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3306 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3307 | public pbc::RepeatedField<int> RepeatedPrimitiveField { |
| 3308 | get { return repeatedPrimitiveField_; } |
| 3309 | } |
| 3310 | |
| 3311 | /// <summary>Field number for the "RepeatedStringField" field.</summary> |
| 3312 | public const int RepeatedStringFieldFieldNumber = 8; |
| 3313 | private static readonly pb::FieldCodec<string> _repeated_repeatedStringField_codec |
| 3314 | = pb::FieldCodec.ForString(66); |
| 3315 | private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::RepeatedField<string>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3316 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3317 | public pbc::RepeatedField<string> RepeatedStringField { |
| 3318 | get { return repeatedStringField_; } |
| 3319 | } |
| 3320 | |
| 3321 | /// <summary>Field number for the "RepeatedEnumField" field.</summary> |
| 3322 | public const int RepeatedEnumFieldFieldNumber = 9; |
| 3323 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedEnumField_codec |
| 3324 | = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x); |
| 3325 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3326 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3327 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedEnumField { |
| 3328 | get { return repeatedEnumField_; } |
| 3329 | } |
| 3330 | |
| 3331 | /// <summary>Field number for the "RepeatedMessageField" field.</summary> |
| 3332 | public const int RepeatedMessageFieldFieldNumber = 10; |
| 3333 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedMessageField_codec |
| 3334 | = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.ForeignMessage.Parser); |
| 3335 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3336 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3337 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedMessageField { |
| 3338 | get { return repeatedMessageField_; } |
| 3339 | } |
| 3340 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3341 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3342 | public override bool Equals(object other) { |
| 3343 | return Equals(other as TestCamelCaseFieldNames); |
| 3344 | } |
| 3345 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3346 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3347 | public bool Equals(TestCamelCaseFieldNames other) { |
| 3348 | if (ReferenceEquals(other, null)) { |
| 3349 | return false; |
| 3350 | } |
| 3351 | if (ReferenceEquals(other, this)) { |
| 3352 | return true; |
| 3353 | } |
| 3354 | if (PrimitiveField != other.PrimitiveField) return false; |
| 3355 | if (StringField != other.StringField) return false; |
| 3356 | if (EnumField != other.EnumField) return false; |
| 3357 | if (!object.Equals(MessageField, other.MessageField)) return false; |
| 3358 | if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false; |
| 3359 | if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false; |
| 3360 | if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false; |
| 3361 | if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3362 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3363 | } |
| 3364 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3365 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3366 | public override int GetHashCode() { |
| 3367 | int hash = 1; |
| 3368 | if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode(); |
| 3369 | if (StringField.Length != 0) hash ^= StringField.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3370 | if (EnumField != 0) hash ^= EnumField.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3371 | if (messageField_ != null) hash ^= MessageField.GetHashCode(); |
| 3372 | hash ^= repeatedPrimitiveField_.GetHashCode(); |
| 3373 | hash ^= repeatedStringField_.GetHashCode(); |
| 3374 | hash ^= repeatedEnumField_.GetHashCode(); |
| 3375 | hash ^= repeatedMessageField_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3376 | if (_unknownFields != null) { |
| 3377 | hash ^= _unknownFields.GetHashCode(); |
| 3378 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3379 | return hash; |
| 3380 | } |
| 3381 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3382 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3383 | public override string ToString() { |
| 3384 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3385 | } |
| 3386 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3387 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3388 | public void WriteTo(pb::CodedOutputStream output) { |
| 3389 | if (PrimitiveField != 0) { |
| 3390 | output.WriteRawTag(8); |
| 3391 | output.WriteInt32(PrimitiveField); |
| 3392 | } |
| 3393 | if (StringField.Length != 0) { |
| 3394 | output.WriteRawTag(18); |
| 3395 | output.WriteString(StringField); |
| 3396 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3397 | if (EnumField != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3398 | output.WriteRawTag(24); |
| 3399 | output.WriteEnum((int) EnumField); |
| 3400 | } |
| 3401 | if (messageField_ != null) { |
| 3402 | output.WriteRawTag(34); |
| 3403 | output.WriteMessage(MessageField); |
| 3404 | } |
| 3405 | repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec); |
| 3406 | repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec); |
| 3407 | repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec); |
| 3408 | repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3409 | if (_unknownFields != null) { |
| 3410 | _unknownFields.WriteTo(output); |
| 3411 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3412 | } |
| 3413 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3414 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3415 | public int CalculateSize() { |
| 3416 | int size = 0; |
| 3417 | if (PrimitiveField != 0) { |
| 3418 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField); |
| 3419 | } |
| 3420 | if (StringField.Length != 0) { |
| 3421 | size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField); |
| 3422 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3423 | if (EnumField != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3424 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField); |
| 3425 | } |
| 3426 | if (messageField_ != null) { |
| 3427 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField); |
| 3428 | } |
| 3429 | size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec); |
| 3430 | size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec); |
| 3431 | size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec); |
| 3432 | size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3433 | if (_unknownFields != null) { |
| 3434 | size += _unknownFields.CalculateSize(); |
| 3435 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3436 | return size; |
| 3437 | } |
| 3438 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3439 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3440 | public void MergeFrom(TestCamelCaseFieldNames other) { |
| 3441 | if (other == null) { |
| 3442 | return; |
| 3443 | } |
| 3444 | if (other.PrimitiveField != 0) { |
| 3445 | PrimitiveField = other.PrimitiveField; |
| 3446 | } |
| 3447 | if (other.StringField.Length != 0) { |
| 3448 | StringField = other.StringField; |
| 3449 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3450 | if (other.EnumField != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3451 | EnumField = other.EnumField; |
| 3452 | } |
| 3453 | if (other.messageField_ != null) { |
| 3454 | if (messageField_ == null) { |
| 3455 | messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage(); |
| 3456 | } |
| 3457 | MessageField.MergeFrom(other.MessageField); |
| 3458 | } |
| 3459 | repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_); |
| 3460 | repeatedStringField_.Add(other.repeatedStringField_); |
| 3461 | repeatedEnumField_.Add(other.repeatedEnumField_); |
| 3462 | repeatedMessageField_.Add(other.repeatedMessageField_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3463 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3464 | } |
| 3465 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3466 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3467 | public void MergeFrom(pb::CodedInputStream input) { |
| 3468 | uint tag; |
| 3469 | while ((tag = input.ReadTag()) != 0) { |
| 3470 | switch(tag) { |
| 3471 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3472 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3473 | break; |
| 3474 | case 8: { |
| 3475 | PrimitiveField = input.ReadInt32(); |
| 3476 | break; |
| 3477 | } |
| 3478 | case 18: { |
| 3479 | StringField = input.ReadString(); |
| 3480 | break; |
| 3481 | } |
| 3482 | case 24: { |
| 3483 | enumField_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum(); |
| 3484 | break; |
| 3485 | } |
| 3486 | case 34: { |
| 3487 | if (messageField_ == null) { |
| 3488 | messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage(); |
| 3489 | } |
| 3490 | input.ReadMessage(messageField_); |
| 3491 | break; |
| 3492 | } |
| 3493 | case 58: |
| 3494 | case 56: { |
| 3495 | repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec); |
| 3496 | break; |
| 3497 | } |
| 3498 | case 66: { |
| 3499 | repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec); |
| 3500 | break; |
| 3501 | } |
| 3502 | case 74: |
| 3503 | case 72: { |
| 3504 | repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec); |
| 3505 | break; |
| 3506 | } |
| 3507 | case 82: { |
| 3508 | repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec); |
| 3509 | break; |
| 3510 | } |
| 3511 | } |
| 3512 | } |
| 3513 | } |
| 3514 | |
| 3515 | } |
| 3516 | |
| 3517 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3518 | /// We list fields out of order, to ensure that we're using field number and not |
| 3519 | /// field index to determine serialization order. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3520 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3521 | public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderings> { |
| 3522 | private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3523 | private pb::UnknownFieldSet _unknownFields; |
| 3524 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3525 | public static pb::MessageParser<TestFieldOrderings> Parser { get { return _parser; } } |
| 3526 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3527 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3528 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3529 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[12]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3530 | } |
| 3531 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3532 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3533 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3534 | get { return Descriptor; } |
| 3535 | } |
| 3536 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3537 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3538 | public TestFieldOrderings() { |
| 3539 | OnConstruction(); |
| 3540 | } |
| 3541 | |
| 3542 | partial void OnConstruction(); |
| 3543 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3544 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3545 | public TestFieldOrderings(TestFieldOrderings other) : this() { |
| 3546 | myString_ = other.myString_; |
| 3547 | myInt_ = other.myInt_; |
| 3548 | myFloat_ = other.myFloat_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3549 | singleNestedMessage_ = other.singleNestedMessage_ != null ? other.singleNestedMessage_.Clone() : null; |
| 3550 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3551 | } |
| 3552 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3553 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3554 | public TestFieldOrderings Clone() { |
| 3555 | return new TestFieldOrderings(this); |
| 3556 | } |
| 3557 | |
| 3558 | /// <summary>Field number for the "my_string" field.</summary> |
| 3559 | public const int MyStringFieldNumber = 11; |
| 3560 | private string myString_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3561 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3562 | public string MyString { |
| 3563 | get { return myString_; } |
| 3564 | set { |
| 3565 | myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3566 | } |
| 3567 | } |
| 3568 | |
| 3569 | /// <summary>Field number for the "my_int" field.</summary> |
| 3570 | public const int MyIntFieldNumber = 1; |
| 3571 | private long myInt_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3572 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3573 | public long MyInt { |
| 3574 | get { return myInt_; } |
| 3575 | set { |
| 3576 | myInt_ = value; |
| 3577 | } |
| 3578 | } |
| 3579 | |
| 3580 | /// <summary>Field number for the "my_float" field.</summary> |
| 3581 | public const int MyFloatFieldNumber = 101; |
| 3582 | private float myFloat_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3583 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3584 | public float MyFloat { |
| 3585 | get { return myFloat_; } |
| 3586 | set { |
| 3587 | myFloat_ = value; |
| 3588 | } |
| 3589 | } |
| 3590 | |
| 3591 | /// <summary>Field number for the "single_nested_message" field.</summary> |
| 3592 | public const int SingleNestedMessageFieldNumber = 200; |
| 3593 | private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage singleNestedMessage_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3594 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3595 | public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage SingleNestedMessage { |
| 3596 | get { return singleNestedMessage_; } |
| 3597 | set { |
| 3598 | singleNestedMessage_ = value; |
| 3599 | } |
| 3600 | } |
| 3601 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3602 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3603 | public override bool Equals(object other) { |
| 3604 | return Equals(other as TestFieldOrderings); |
| 3605 | } |
| 3606 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3607 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3608 | public bool Equals(TestFieldOrderings other) { |
| 3609 | if (ReferenceEquals(other, null)) { |
| 3610 | return false; |
| 3611 | } |
| 3612 | if (ReferenceEquals(other, this)) { |
| 3613 | return true; |
| 3614 | } |
| 3615 | if (MyString != other.MyString) return false; |
| 3616 | if (MyInt != other.MyInt) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3617 | if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MyFloat, other.MyFloat)) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3618 | if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3619 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3620 | } |
| 3621 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3622 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3623 | public override int GetHashCode() { |
| 3624 | int hash = 1; |
| 3625 | if (MyString.Length != 0) hash ^= MyString.GetHashCode(); |
| 3626 | if (MyInt != 0L) hash ^= MyInt.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3627 | if (MyFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3628 | if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3629 | if (_unknownFields != null) { |
| 3630 | hash ^= _unknownFields.GetHashCode(); |
| 3631 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3632 | return hash; |
| 3633 | } |
| 3634 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3635 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3636 | public override string ToString() { |
| 3637 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3638 | } |
| 3639 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3640 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3641 | public void WriteTo(pb::CodedOutputStream output) { |
| 3642 | if (MyInt != 0L) { |
| 3643 | output.WriteRawTag(8); |
| 3644 | output.WriteInt64(MyInt); |
| 3645 | } |
| 3646 | if (MyString.Length != 0) { |
| 3647 | output.WriteRawTag(90); |
| 3648 | output.WriteString(MyString); |
| 3649 | } |
| 3650 | if (MyFloat != 0F) { |
| 3651 | output.WriteRawTag(173, 6); |
| 3652 | output.WriteFloat(MyFloat); |
| 3653 | } |
| 3654 | if (singleNestedMessage_ != null) { |
| 3655 | output.WriteRawTag(194, 12); |
| 3656 | output.WriteMessage(SingleNestedMessage); |
| 3657 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3658 | if (_unknownFields != null) { |
| 3659 | _unknownFields.WriteTo(output); |
| 3660 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3661 | } |
| 3662 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3663 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3664 | public int CalculateSize() { |
| 3665 | int size = 0; |
| 3666 | if (MyString.Length != 0) { |
| 3667 | size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString); |
| 3668 | } |
| 3669 | if (MyInt != 0L) { |
| 3670 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt); |
| 3671 | } |
| 3672 | if (MyFloat != 0F) { |
| 3673 | size += 2 + 4; |
| 3674 | } |
| 3675 | if (singleNestedMessage_ != null) { |
| 3676 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage); |
| 3677 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3678 | if (_unknownFields != null) { |
| 3679 | size += _unknownFields.CalculateSize(); |
| 3680 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3681 | return size; |
| 3682 | } |
| 3683 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3684 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3685 | public void MergeFrom(TestFieldOrderings other) { |
| 3686 | if (other == null) { |
| 3687 | return; |
| 3688 | } |
| 3689 | if (other.MyString.Length != 0) { |
| 3690 | MyString = other.MyString; |
| 3691 | } |
| 3692 | if (other.MyInt != 0L) { |
| 3693 | MyInt = other.MyInt; |
| 3694 | } |
| 3695 | if (other.MyFloat != 0F) { |
| 3696 | MyFloat = other.MyFloat; |
| 3697 | } |
| 3698 | if (other.singleNestedMessage_ != null) { |
| 3699 | if (singleNestedMessage_ == null) { |
| 3700 | singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage(); |
| 3701 | } |
| 3702 | SingleNestedMessage.MergeFrom(other.SingleNestedMessage); |
| 3703 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3704 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3705 | } |
| 3706 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3707 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3708 | public void MergeFrom(pb::CodedInputStream input) { |
| 3709 | uint tag; |
| 3710 | while ((tag = input.ReadTag()) != 0) { |
| 3711 | switch(tag) { |
| 3712 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3713 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3714 | break; |
| 3715 | case 8: { |
| 3716 | MyInt = input.ReadInt64(); |
| 3717 | break; |
| 3718 | } |
| 3719 | case 90: { |
| 3720 | MyString = input.ReadString(); |
| 3721 | break; |
| 3722 | } |
| 3723 | case 813: { |
| 3724 | MyFloat = input.ReadFloat(); |
| 3725 | break; |
| 3726 | } |
| 3727 | case 1602: { |
| 3728 | if (singleNestedMessage_ == null) { |
| 3729 | singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage(); |
| 3730 | } |
| 3731 | input.ReadMessage(singleNestedMessage_); |
| 3732 | break; |
| 3733 | } |
| 3734 | } |
| 3735 | } |
| 3736 | } |
| 3737 | |
| 3738 | #region Nested types |
| 3739 | /// <summary>Container for nested types declared in the TestFieldOrderings message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3740 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3741 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3742 | public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { |
| 3743 | private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3744 | private pb::UnknownFieldSet _unknownFields; |
| 3745 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3746 | public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } |
| 3747 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3748 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3749 | public static pbr::MessageDescriptor Descriptor { |
| 3750 | get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; } |
| 3751 | } |
| 3752 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3753 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3754 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3755 | get { return Descriptor; } |
| 3756 | } |
| 3757 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3758 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3759 | public NestedMessage() { |
| 3760 | OnConstruction(); |
| 3761 | } |
| 3762 | |
| 3763 | partial void OnConstruction(); |
| 3764 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3765 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3766 | public NestedMessage(NestedMessage other) : this() { |
| 3767 | oo_ = other.oo_; |
| 3768 | bb_ = other.bb_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3769 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3770 | } |
| 3771 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3772 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3773 | public NestedMessage Clone() { |
| 3774 | return new NestedMessage(this); |
| 3775 | } |
| 3776 | |
| 3777 | /// <summary>Field number for the "oo" field.</summary> |
| 3778 | public const int OoFieldNumber = 2; |
| 3779 | private long oo_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3780 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3781 | public long Oo { |
| 3782 | get { return oo_; } |
| 3783 | set { |
| 3784 | oo_ = value; |
| 3785 | } |
| 3786 | } |
| 3787 | |
| 3788 | /// <summary>Field number for the "bb" field.</summary> |
| 3789 | public const int BbFieldNumber = 1; |
| 3790 | private int bb_; |
| 3791 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3792 | /// The field name "b" fails to compile in proto1 because it conflicts with |
| 3793 | /// a local variable named "b" in one of the generated methods. Doh. |
| 3794 | /// This file needs to compile in proto1 to test backwards-compatibility. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3795 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3796 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3797 | public int Bb { |
| 3798 | get { return bb_; } |
| 3799 | set { |
| 3800 | bb_ = value; |
| 3801 | } |
| 3802 | } |
| 3803 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3804 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3805 | public override bool Equals(object other) { |
| 3806 | return Equals(other as NestedMessage); |
| 3807 | } |
| 3808 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3809 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3810 | public bool Equals(NestedMessage other) { |
| 3811 | if (ReferenceEquals(other, null)) { |
| 3812 | return false; |
| 3813 | } |
| 3814 | if (ReferenceEquals(other, this)) { |
| 3815 | return true; |
| 3816 | } |
| 3817 | if (Oo != other.Oo) return false; |
| 3818 | if (Bb != other.Bb) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3819 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3820 | } |
| 3821 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3822 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3823 | public override int GetHashCode() { |
| 3824 | int hash = 1; |
| 3825 | if (Oo != 0L) hash ^= Oo.GetHashCode(); |
| 3826 | if (Bb != 0) hash ^= Bb.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3827 | if (_unknownFields != null) { |
| 3828 | hash ^= _unknownFields.GetHashCode(); |
| 3829 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3830 | return hash; |
| 3831 | } |
| 3832 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3833 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3834 | public override string ToString() { |
| 3835 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3836 | } |
| 3837 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3838 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3839 | public void WriteTo(pb::CodedOutputStream output) { |
| 3840 | if (Bb != 0) { |
| 3841 | output.WriteRawTag(8); |
| 3842 | output.WriteInt32(Bb); |
| 3843 | } |
| 3844 | if (Oo != 0L) { |
| 3845 | output.WriteRawTag(16); |
| 3846 | output.WriteInt64(Oo); |
| 3847 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3848 | if (_unknownFields != null) { |
| 3849 | _unknownFields.WriteTo(output); |
| 3850 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3851 | } |
| 3852 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3853 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3854 | public int CalculateSize() { |
| 3855 | int size = 0; |
| 3856 | if (Oo != 0L) { |
| 3857 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo); |
| 3858 | } |
| 3859 | if (Bb != 0) { |
| 3860 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 3861 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3862 | if (_unknownFields != null) { |
| 3863 | size += _unknownFields.CalculateSize(); |
| 3864 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3865 | return size; |
| 3866 | } |
| 3867 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3869 | public void MergeFrom(NestedMessage other) { |
| 3870 | if (other == null) { |
| 3871 | return; |
| 3872 | } |
| 3873 | if (other.Oo != 0L) { |
| 3874 | Oo = other.Oo; |
| 3875 | } |
| 3876 | if (other.Bb != 0) { |
| 3877 | Bb = other.Bb; |
| 3878 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3879 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3880 | } |
| 3881 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3882 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3883 | public void MergeFrom(pb::CodedInputStream input) { |
| 3884 | uint tag; |
| 3885 | while ((tag = input.ReadTag()) != 0) { |
| 3886 | switch(tag) { |
| 3887 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3888 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3889 | break; |
| 3890 | case 8: { |
| 3891 | Bb = input.ReadInt32(); |
| 3892 | break; |
| 3893 | } |
| 3894 | case 16: { |
| 3895 | Oo = input.ReadInt64(); |
| 3896 | break; |
| 3897 | } |
| 3898 | } |
| 3899 | } |
| 3900 | } |
| 3901 | |
| 3902 | } |
| 3903 | |
| 3904 | } |
| 3905 | #endregion |
| 3906 | |
| 3907 | } |
| 3908 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3909 | public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage> { |
| 3910 | private static readonly pb::MessageParser<SparseEnumMessage> _parser = new pb::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3911 | private pb::UnknownFieldSet _unknownFields; |
| 3912 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3913 | public static pb::MessageParser<SparseEnumMessage> Parser { get { return _parser; } } |
| 3914 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3915 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3916 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3917 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[13]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3918 | } |
| 3919 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3920 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3921 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3922 | get { return Descriptor; } |
| 3923 | } |
| 3924 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3925 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3926 | public SparseEnumMessage() { |
| 3927 | OnConstruction(); |
| 3928 | } |
| 3929 | |
| 3930 | partial void OnConstruction(); |
| 3931 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3932 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3933 | public SparseEnumMessage(SparseEnumMessage other) : this() { |
| 3934 | sparseEnum_ = other.sparseEnum_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3935 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3936 | } |
| 3937 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3938 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3939 | public SparseEnumMessage Clone() { |
| 3940 | return new SparseEnumMessage(this); |
| 3941 | } |
| 3942 | |
| 3943 | /// <summary>Field number for the "sparse_enum" field.</summary> |
| 3944 | public const int SparseEnumFieldNumber = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3945 | private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = 0; |
| 3946 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3947 | public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum { |
| 3948 | get { return sparseEnum_; } |
| 3949 | set { |
| 3950 | sparseEnum_ = value; |
| 3951 | } |
| 3952 | } |
| 3953 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3954 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3955 | public override bool Equals(object other) { |
| 3956 | return Equals(other as SparseEnumMessage); |
| 3957 | } |
| 3958 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3959 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3960 | public bool Equals(SparseEnumMessage other) { |
| 3961 | if (ReferenceEquals(other, null)) { |
| 3962 | return false; |
| 3963 | } |
| 3964 | if (ReferenceEquals(other, this)) { |
| 3965 | return true; |
| 3966 | } |
| 3967 | if (SparseEnum != other.SparseEnum) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3968 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3969 | } |
| 3970 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3971 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3972 | public override int GetHashCode() { |
| 3973 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3974 | if (SparseEnum != 0) hash ^= SparseEnum.GetHashCode(); |
| 3975 | if (_unknownFields != null) { |
| 3976 | hash ^= _unknownFields.GetHashCode(); |
| 3977 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3978 | return hash; |
| 3979 | } |
| 3980 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3981 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3982 | public override string ToString() { |
| 3983 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3984 | } |
| 3985 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3986 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3987 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3988 | if (SparseEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3989 | output.WriteRawTag(8); |
| 3990 | output.WriteEnum((int) SparseEnum); |
| 3991 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3992 | if (_unknownFields != null) { |
| 3993 | _unknownFields.WriteTo(output); |
| 3994 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3995 | } |
| 3996 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3997 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3998 | public int CalculateSize() { |
| 3999 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4000 | if (SparseEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4001 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum); |
| 4002 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4003 | if (_unknownFields != null) { |
| 4004 | size += _unknownFields.CalculateSize(); |
| 4005 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4006 | return size; |
| 4007 | } |
| 4008 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4009 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4010 | public void MergeFrom(SparseEnumMessage other) { |
| 4011 | if (other == null) { |
| 4012 | return; |
| 4013 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4014 | if (other.SparseEnum != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4015 | SparseEnum = other.SparseEnum; |
| 4016 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4017 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4018 | } |
| 4019 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4020 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4021 | public void MergeFrom(pb::CodedInputStream input) { |
| 4022 | uint tag; |
| 4023 | while ((tag = input.ReadTag()) != 0) { |
| 4024 | switch(tag) { |
| 4025 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4026 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4027 | break; |
| 4028 | case 8: { |
| 4029 | sparseEnum_ = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum(); |
| 4030 | break; |
| 4031 | } |
| 4032 | } |
| 4033 | } |
| 4034 | } |
| 4035 | |
| 4036 | } |
| 4037 | |
| 4038 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4039 | /// Test String and Bytes: string is for valid UTF-8 strings |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4040 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4041 | public sealed partial class OneString : pb::IMessage<OneString> { |
| 4042 | private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4043 | private pb::UnknownFieldSet _unknownFields; |
| 4044 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4045 | public static pb::MessageParser<OneString> Parser { get { return _parser; } } |
| 4046 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4047 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4048 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4049 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[14]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4050 | } |
| 4051 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4052 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4053 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4054 | get { return Descriptor; } |
| 4055 | } |
| 4056 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4057 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4058 | public OneString() { |
| 4059 | OnConstruction(); |
| 4060 | } |
| 4061 | |
| 4062 | partial void OnConstruction(); |
| 4063 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4064 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4065 | public OneString(OneString other) : this() { |
| 4066 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4067 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4068 | } |
| 4069 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4070 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4071 | public OneString Clone() { |
| 4072 | return new OneString(this); |
| 4073 | } |
| 4074 | |
| 4075 | /// <summary>Field number for the "data" field.</summary> |
| 4076 | public const int DataFieldNumber = 1; |
| 4077 | private string data_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4078 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4079 | public string Data { |
| 4080 | get { return data_; } |
| 4081 | set { |
| 4082 | data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 4083 | } |
| 4084 | } |
| 4085 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4086 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4087 | public override bool Equals(object other) { |
| 4088 | return Equals(other as OneString); |
| 4089 | } |
| 4090 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4091 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4092 | public bool Equals(OneString other) { |
| 4093 | if (ReferenceEquals(other, null)) { |
| 4094 | return false; |
| 4095 | } |
| 4096 | if (ReferenceEquals(other, this)) { |
| 4097 | return true; |
| 4098 | } |
| 4099 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4100 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4101 | } |
| 4102 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4103 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4104 | public override int GetHashCode() { |
| 4105 | int hash = 1; |
| 4106 | if (Data.Length != 0) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4107 | if (_unknownFields != null) { |
| 4108 | hash ^= _unknownFields.GetHashCode(); |
| 4109 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4110 | return hash; |
| 4111 | } |
| 4112 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4113 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4114 | public override string ToString() { |
| 4115 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4116 | } |
| 4117 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4118 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4119 | public void WriteTo(pb::CodedOutputStream output) { |
| 4120 | if (Data.Length != 0) { |
| 4121 | output.WriteRawTag(10); |
| 4122 | output.WriteString(Data); |
| 4123 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4124 | if (_unknownFields != null) { |
| 4125 | _unknownFields.WriteTo(output); |
| 4126 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4127 | } |
| 4128 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4130 | public int CalculateSize() { |
| 4131 | int size = 0; |
| 4132 | if (Data.Length != 0) { |
| 4133 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Data); |
| 4134 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4135 | if (_unknownFields != null) { |
| 4136 | size += _unknownFields.CalculateSize(); |
| 4137 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4138 | return size; |
| 4139 | } |
| 4140 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4142 | public void MergeFrom(OneString other) { |
| 4143 | if (other == null) { |
| 4144 | return; |
| 4145 | } |
| 4146 | if (other.Data.Length != 0) { |
| 4147 | Data = other.Data; |
| 4148 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4149 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4150 | } |
| 4151 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4152 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4153 | public void MergeFrom(pb::CodedInputStream input) { |
| 4154 | uint tag; |
| 4155 | while ((tag = input.ReadTag()) != 0) { |
| 4156 | switch(tag) { |
| 4157 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4158 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4159 | break; |
| 4160 | case 10: { |
| 4161 | Data = input.ReadString(); |
| 4162 | break; |
| 4163 | } |
| 4164 | } |
| 4165 | } |
| 4166 | } |
| 4167 | |
| 4168 | } |
| 4169 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4170 | public sealed partial class MoreString : pb::IMessage<MoreString> { |
| 4171 | private static readonly pb::MessageParser<MoreString> _parser = new pb::MessageParser<MoreString>(() => new MoreString()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4172 | private pb::UnknownFieldSet _unknownFields; |
| 4173 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4174 | public static pb::MessageParser<MoreString> Parser { get { return _parser; } } |
| 4175 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4176 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4177 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4178 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[15]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4179 | } |
| 4180 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4181 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4182 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4183 | get { return Descriptor; } |
| 4184 | } |
| 4185 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4186 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4187 | public MoreString() { |
| 4188 | OnConstruction(); |
| 4189 | } |
| 4190 | |
| 4191 | partial void OnConstruction(); |
| 4192 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4193 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4194 | public MoreString(MoreString other) : this() { |
| 4195 | data_ = other.data_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4196 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4197 | } |
| 4198 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4199 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4200 | public MoreString Clone() { |
| 4201 | return new MoreString(this); |
| 4202 | } |
| 4203 | |
| 4204 | /// <summary>Field number for the "data" field.</summary> |
| 4205 | public const int DataFieldNumber = 1; |
| 4206 | private static readonly pb::FieldCodec<string> _repeated_data_codec |
| 4207 | = pb::FieldCodec.ForString(10); |
| 4208 | private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<string>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4209 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4210 | public pbc::RepeatedField<string> Data { |
| 4211 | get { return data_; } |
| 4212 | } |
| 4213 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4214 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4215 | public override bool Equals(object other) { |
| 4216 | return Equals(other as MoreString); |
| 4217 | } |
| 4218 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4220 | public bool Equals(MoreString other) { |
| 4221 | if (ReferenceEquals(other, null)) { |
| 4222 | return false; |
| 4223 | } |
| 4224 | if (ReferenceEquals(other, this)) { |
| 4225 | return true; |
| 4226 | } |
| 4227 | if(!data_.Equals(other.data_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4228 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4229 | } |
| 4230 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4231 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4232 | public override int GetHashCode() { |
| 4233 | int hash = 1; |
| 4234 | hash ^= data_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4235 | if (_unknownFields != null) { |
| 4236 | hash ^= _unknownFields.GetHashCode(); |
| 4237 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4238 | return hash; |
| 4239 | } |
| 4240 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4241 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4242 | public override string ToString() { |
| 4243 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4244 | } |
| 4245 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4246 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4247 | public void WriteTo(pb::CodedOutputStream output) { |
| 4248 | data_.WriteTo(output, _repeated_data_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4249 | if (_unknownFields != null) { |
| 4250 | _unknownFields.WriteTo(output); |
| 4251 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4252 | } |
| 4253 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4254 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4255 | public int CalculateSize() { |
| 4256 | int size = 0; |
| 4257 | size += data_.CalculateSize(_repeated_data_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4258 | if (_unknownFields != null) { |
| 4259 | size += _unknownFields.CalculateSize(); |
| 4260 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4261 | return size; |
| 4262 | } |
| 4263 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4264 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4265 | public void MergeFrom(MoreString other) { |
| 4266 | if (other == null) { |
| 4267 | return; |
| 4268 | } |
| 4269 | data_.Add(other.data_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4270 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4271 | } |
| 4272 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4273 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4274 | public void MergeFrom(pb::CodedInputStream input) { |
| 4275 | uint tag; |
| 4276 | while ((tag = input.ReadTag()) != 0) { |
| 4277 | switch(tag) { |
| 4278 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4279 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4280 | break; |
| 4281 | case 10: { |
| 4282 | data_.AddEntriesFrom(input, _repeated_data_codec); |
| 4283 | break; |
| 4284 | } |
| 4285 | } |
| 4286 | } |
| 4287 | } |
| 4288 | |
| 4289 | } |
| 4290 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4291 | public sealed partial class OneBytes : pb::IMessage<OneBytes> { |
| 4292 | private static readonly pb::MessageParser<OneBytes> _parser = new pb::MessageParser<OneBytes>(() => new OneBytes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4293 | private pb::UnknownFieldSet _unknownFields; |
| 4294 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4295 | public static pb::MessageParser<OneBytes> Parser { get { return _parser; } } |
| 4296 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4297 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4298 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4299 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[16]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4300 | } |
| 4301 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4302 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4303 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4304 | get { return Descriptor; } |
| 4305 | } |
| 4306 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4307 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4308 | public OneBytes() { |
| 4309 | OnConstruction(); |
| 4310 | } |
| 4311 | |
| 4312 | partial void OnConstruction(); |
| 4313 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4314 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4315 | public OneBytes(OneBytes other) : this() { |
| 4316 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4317 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4318 | } |
| 4319 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4320 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4321 | public OneBytes Clone() { |
| 4322 | return new OneBytes(this); |
| 4323 | } |
| 4324 | |
| 4325 | /// <summary>Field number for the "data" field.</summary> |
| 4326 | public const int DataFieldNumber = 1; |
| 4327 | private pb::ByteString data_ = pb::ByteString.Empty; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4328 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4329 | public pb::ByteString Data { |
| 4330 | get { return data_; } |
| 4331 | set { |
| 4332 | data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 4333 | } |
| 4334 | } |
| 4335 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4336 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4337 | public override bool Equals(object other) { |
| 4338 | return Equals(other as OneBytes); |
| 4339 | } |
| 4340 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4341 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4342 | public bool Equals(OneBytes other) { |
| 4343 | if (ReferenceEquals(other, null)) { |
| 4344 | return false; |
| 4345 | } |
| 4346 | if (ReferenceEquals(other, this)) { |
| 4347 | return true; |
| 4348 | } |
| 4349 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4350 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4351 | } |
| 4352 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4353 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4354 | public override int GetHashCode() { |
| 4355 | int hash = 1; |
| 4356 | if (Data.Length != 0) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4357 | if (_unknownFields != null) { |
| 4358 | hash ^= _unknownFields.GetHashCode(); |
| 4359 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4360 | return hash; |
| 4361 | } |
| 4362 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4363 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4364 | public override string ToString() { |
| 4365 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4366 | } |
| 4367 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4368 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4369 | public void WriteTo(pb::CodedOutputStream output) { |
| 4370 | if (Data.Length != 0) { |
| 4371 | output.WriteRawTag(10); |
| 4372 | output.WriteBytes(Data); |
| 4373 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4374 | if (_unknownFields != null) { |
| 4375 | _unknownFields.WriteTo(output); |
| 4376 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4377 | } |
| 4378 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4379 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4380 | public int CalculateSize() { |
| 4381 | int size = 0; |
| 4382 | if (Data.Length != 0) { |
| 4383 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); |
| 4384 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4385 | if (_unknownFields != null) { |
| 4386 | size += _unknownFields.CalculateSize(); |
| 4387 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4388 | return size; |
| 4389 | } |
| 4390 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4391 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4392 | public void MergeFrom(OneBytes other) { |
| 4393 | if (other == null) { |
| 4394 | return; |
| 4395 | } |
| 4396 | if (other.Data.Length != 0) { |
| 4397 | Data = other.Data; |
| 4398 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4399 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4400 | } |
| 4401 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4402 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4403 | public void MergeFrom(pb::CodedInputStream input) { |
| 4404 | uint tag; |
| 4405 | while ((tag = input.ReadTag()) != 0) { |
| 4406 | switch(tag) { |
| 4407 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4408 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4409 | break; |
| 4410 | case 10: { |
| 4411 | Data = input.ReadBytes(); |
| 4412 | break; |
| 4413 | } |
| 4414 | } |
| 4415 | } |
| 4416 | } |
| 4417 | |
| 4418 | } |
| 4419 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4420 | public sealed partial class MoreBytes : pb::IMessage<MoreBytes> { |
| 4421 | private static readonly pb::MessageParser<MoreBytes> _parser = new pb::MessageParser<MoreBytes>(() => new MoreBytes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4422 | private pb::UnknownFieldSet _unknownFields; |
| 4423 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4424 | public static pb::MessageParser<MoreBytes> Parser { get { return _parser; } } |
| 4425 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4426 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4427 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4428 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[17]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4429 | } |
| 4430 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4431 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4432 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4433 | get { return Descriptor; } |
| 4434 | } |
| 4435 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4436 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4437 | public MoreBytes() { |
| 4438 | OnConstruction(); |
| 4439 | } |
| 4440 | |
| 4441 | partial void OnConstruction(); |
| 4442 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4443 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4444 | public MoreBytes(MoreBytes other) : this() { |
| 4445 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4446 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4447 | } |
| 4448 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4449 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4450 | public MoreBytes Clone() { |
| 4451 | return new MoreBytes(this); |
| 4452 | } |
| 4453 | |
| 4454 | /// <summary>Field number for the "data" field.</summary> |
| 4455 | public const int DataFieldNumber = 1; |
| 4456 | private pb::ByteString data_ = pb::ByteString.Empty; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4457 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4458 | public pb::ByteString Data { |
| 4459 | get { return data_; } |
| 4460 | set { |
| 4461 | data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 4462 | } |
| 4463 | } |
| 4464 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4465 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4466 | public override bool Equals(object other) { |
| 4467 | return Equals(other as MoreBytes); |
| 4468 | } |
| 4469 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4470 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4471 | public bool Equals(MoreBytes other) { |
| 4472 | if (ReferenceEquals(other, null)) { |
| 4473 | return false; |
| 4474 | } |
| 4475 | if (ReferenceEquals(other, this)) { |
| 4476 | return true; |
| 4477 | } |
| 4478 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4479 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4480 | } |
| 4481 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4482 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4483 | public override int GetHashCode() { |
| 4484 | int hash = 1; |
| 4485 | if (Data.Length != 0) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4486 | if (_unknownFields != null) { |
| 4487 | hash ^= _unknownFields.GetHashCode(); |
| 4488 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4489 | return hash; |
| 4490 | } |
| 4491 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4492 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4493 | public override string ToString() { |
| 4494 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4495 | } |
| 4496 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4497 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4498 | public void WriteTo(pb::CodedOutputStream output) { |
| 4499 | if (Data.Length != 0) { |
| 4500 | output.WriteRawTag(10); |
| 4501 | output.WriteBytes(Data); |
| 4502 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4503 | if (_unknownFields != null) { |
| 4504 | _unknownFields.WriteTo(output); |
| 4505 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4506 | } |
| 4507 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4508 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4509 | public int CalculateSize() { |
| 4510 | int size = 0; |
| 4511 | if (Data.Length != 0) { |
| 4512 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); |
| 4513 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4514 | if (_unknownFields != null) { |
| 4515 | size += _unknownFields.CalculateSize(); |
| 4516 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4517 | return size; |
| 4518 | } |
| 4519 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4520 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4521 | public void MergeFrom(MoreBytes other) { |
| 4522 | if (other == null) { |
| 4523 | return; |
| 4524 | } |
| 4525 | if (other.Data.Length != 0) { |
| 4526 | Data = other.Data; |
| 4527 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4528 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4529 | } |
| 4530 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4531 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4532 | public void MergeFrom(pb::CodedInputStream input) { |
| 4533 | uint tag; |
| 4534 | while ((tag = input.ReadTag()) != 0) { |
| 4535 | switch(tag) { |
| 4536 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4537 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4538 | break; |
| 4539 | case 10: { |
| 4540 | Data = input.ReadBytes(); |
| 4541 | break; |
| 4542 | } |
| 4543 | } |
| 4544 | } |
| 4545 | } |
| 4546 | |
| 4547 | } |
| 4548 | |
| 4549 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4550 | /// Test int32, uint32, int64, uint64, and bool are all compatible |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4551 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4552 | public sealed partial class Int32Message : pb::IMessage<Int32Message> { |
| 4553 | private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4554 | private pb::UnknownFieldSet _unknownFields; |
| 4555 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4556 | public static pb::MessageParser<Int32Message> Parser { get { return _parser; } } |
| 4557 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4558 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4559 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4560 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[18]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4561 | } |
| 4562 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4563 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4564 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4565 | get { return Descriptor; } |
| 4566 | } |
| 4567 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4568 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4569 | public Int32Message() { |
| 4570 | OnConstruction(); |
| 4571 | } |
| 4572 | |
| 4573 | partial void OnConstruction(); |
| 4574 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4575 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4576 | public Int32Message(Int32Message other) : this() { |
| 4577 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4578 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4579 | } |
| 4580 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4581 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4582 | public Int32Message Clone() { |
| 4583 | return new Int32Message(this); |
| 4584 | } |
| 4585 | |
| 4586 | /// <summary>Field number for the "data" field.</summary> |
| 4587 | public const int DataFieldNumber = 1; |
| 4588 | private int data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4589 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4590 | public int Data { |
| 4591 | get { return data_; } |
| 4592 | set { |
| 4593 | data_ = value; |
| 4594 | } |
| 4595 | } |
| 4596 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4597 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4598 | public override bool Equals(object other) { |
| 4599 | return Equals(other as Int32Message); |
| 4600 | } |
| 4601 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4602 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4603 | public bool Equals(Int32Message other) { |
| 4604 | if (ReferenceEquals(other, null)) { |
| 4605 | return false; |
| 4606 | } |
| 4607 | if (ReferenceEquals(other, this)) { |
| 4608 | return true; |
| 4609 | } |
| 4610 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4611 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4612 | } |
| 4613 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4614 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4615 | public override int GetHashCode() { |
| 4616 | int hash = 1; |
| 4617 | if (Data != 0) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4618 | if (_unknownFields != null) { |
| 4619 | hash ^= _unknownFields.GetHashCode(); |
| 4620 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4621 | return hash; |
| 4622 | } |
| 4623 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4624 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4625 | public override string ToString() { |
| 4626 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4627 | } |
| 4628 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4629 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4630 | public void WriteTo(pb::CodedOutputStream output) { |
| 4631 | if (Data != 0) { |
| 4632 | output.WriteRawTag(8); |
| 4633 | output.WriteInt32(Data); |
| 4634 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4635 | if (_unknownFields != null) { |
| 4636 | _unknownFields.WriteTo(output); |
| 4637 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4638 | } |
| 4639 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4640 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4641 | public int CalculateSize() { |
| 4642 | int size = 0; |
| 4643 | if (Data != 0) { |
| 4644 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data); |
| 4645 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4646 | if (_unknownFields != null) { |
| 4647 | size += _unknownFields.CalculateSize(); |
| 4648 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4649 | return size; |
| 4650 | } |
| 4651 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4652 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4653 | public void MergeFrom(Int32Message other) { |
| 4654 | if (other == null) { |
| 4655 | return; |
| 4656 | } |
| 4657 | if (other.Data != 0) { |
| 4658 | Data = other.Data; |
| 4659 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4660 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4661 | } |
| 4662 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4663 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4664 | public void MergeFrom(pb::CodedInputStream input) { |
| 4665 | uint tag; |
| 4666 | while ((tag = input.ReadTag()) != 0) { |
| 4667 | switch(tag) { |
| 4668 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4669 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4670 | break; |
| 4671 | case 8: { |
| 4672 | Data = input.ReadInt32(); |
| 4673 | break; |
| 4674 | } |
| 4675 | } |
| 4676 | } |
| 4677 | } |
| 4678 | |
| 4679 | } |
| 4680 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4681 | public sealed partial class Uint32Message : pb::IMessage<Uint32Message> { |
| 4682 | private static readonly pb::MessageParser<Uint32Message> _parser = new pb::MessageParser<Uint32Message>(() => new Uint32Message()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4683 | private pb::UnknownFieldSet _unknownFields; |
| 4684 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4685 | public static pb::MessageParser<Uint32Message> Parser { get { return _parser; } } |
| 4686 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4687 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4688 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4689 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[19]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4690 | } |
| 4691 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4692 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4693 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4694 | get { return Descriptor; } |
| 4695 | } |
| 4696 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4697 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4698 | public Uint32Message() { |
| 4699 | OnConstruction(); |
| 4700 | } |
| 4701 | |
| 4702 | partial void OnConstruction(); |
| 4703 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4704 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4705 | public Uint32Message(Uint32Message other) : this() { |
| 4706 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4707 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4708 | } |
| 4709 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4710 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4711 | public Uint32Message Clone() { |
| 4712 | return new Uint32Message(this); |
| 4713 | } |
| 4714 | |
| 4715 | /// <summary>Field number for the "data" field.</summary> |
| 4716 | public const int DataFieldNumber = 1; |
| 4717 | private uint data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4718 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4719 | public uint Data { |
| 4720 | get { return data_; } |
| 4721 | set { |
| 4722 | data_ = value; |
| 4723 | } |
| 4724 | } |
| 4725 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4726 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4727 | public override bool Equals(object other) { |
| 4728 | return Equals(other as Uint32Message); |
| 4729 | } |
| 4730 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4731 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4732 | public bool Equals(Uint32Message other) { |
| 4733 | if (ReferenceEquals(other, null)) { |
| 4734 | return false; |
| 4735 | } |
| 4736 | if (ReferenceEquals(other, this)) { |
| 4737 | return true; |
| 4738 | } |
| 4739 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4740 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4741 | } |
| 4742 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4743 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4744 | public override int GetHashCode() { |
| 4745 | int hash = 1; |
| 4746 | if (Data != 0) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4747 | if (_unknownFields != null) { |
| 4748 | hash ^= _unknownFields.GetHashCode(); |
| 4749 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4750 | return hash; |
| 4751 | } |
| 4752 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4753 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4754 | public override string ToString() { |
| 4755 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4756 | } |
| 4757 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4758 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4759 | public void WriteTo(pb::CodedOutputStream output) { |
| 4760 | if (Data != 0) { |
| 4761 | output.WriteRawTag(8); |
| 4762 | output.WriteUInt32(Data); |
| 4763 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4764 | if (_unknownFields != null) { |
| 4765 | _unknownFields.WriteTo(output); |
| 4766 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4767 | } |
| 4768 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4769 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4770 | public int CalculateSize() { |
| 4771 | int size = 0; |
| 4772 | if (Data != 0) { |
| 4773 | size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data); |
| 4774 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4775 | if (_unknownFields != null) { |
| 4776 | size += _unknownFields.CalculateSize(); |
| 4777 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4778 | return size; |
| 4779 | } |
| 4780 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4781 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4782 | public void MergeFrom(Uint32Message other) { |
| 4783 | if (other == null) { |
| 4784 | return; |
| 4785 | } |
| 4786 | if (other.Data != 0) { |
| 4787 | Data = other.Data; |
| 4788 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4789 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4790 | } |
| 4791 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4792 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4793 | public void MergeFrom(pb::CodedInputStream input) { |
| 4794 | uint tag; |
| 4795 | while ((tag = input.ReadTag()) != 0) { |
| 4796 | switch(tag) { |
| 4797 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4798 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4799 | break; |
| 4800 | case 8: { |
| 4801 | Data = input.ReadUInt32(); |
| 4802 | break; |
| 4803 | } |
| 4804 | } |
| 4805 | } |
| 4806 | } |
| 4807 | |
| 4808 | } |
| 4809 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4810 | public sealed partial class Int64Message : pb::IMessage<Int64Message> { |
| 4811 | private static readonly pb::MessageParser<Int64Message> _parser = new pb::MessageParser<Int64Message>(() => new Int64Message()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4812 | private pb::UnknownFieldSet _unknownFields; |
| 4813 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4814 | public static pb::MessageParser<Int64Message> Parser { get { return _parser; } } |
| 4815 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4816 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4817 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4818 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[20]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4819 | } |
| 4820 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4821 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4822 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4823 | get { return Descriptor; } |
| 4824 | } |
| 4825 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4826 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4827 | public Int64Message() { |
| 4828 | OnConstruction(); |
| 4829 | } |
| 4830 | |
| 4831 | partial void OnConstruction(); |
| 4832 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4833 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4834 | public Int64Message(Int64Message other) : this() { |
| 4835 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4836 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4837 | } |
| 4838 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4839 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4840 | public Int64Message Clone() { |
| 4841 | return new Int64Message(this); |
| 4842 | } |
| 4843 | |
| 4844 | /// <summary>Field number for the "data" field.</summary> |
| 4845 | public const int DataFieldNumber = 1; |
| 4846 | private long data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4847 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4848 | public long Data { |
| 4849 | get { return data_; } |
| 4850 | set { |
| 4851 | data_ = value; |
| 4852 | } |
| 4853 | } |
| 4854 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4855 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4856 | public override bool Equals(object other) { |
| 4857 | return Equals(other as Int64Message); |
| 4858 | } |
| 4859 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4860 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4861 | public bool Equals(Int64Message other) { |
| 4862 | if (ReferenceEquals(other, null)) { |
| 4863 | return false; |
| 4864 | } |
| 4865 | if (ReferenceEquals(other, this)) { |
| 4866 | return true; |
| 4867 | } |
| 4868 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4869 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4870 | } |
| 4871 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4872 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4873 | public override int GetHashCode() { |
| 4874 | int hash = 1; |
| 4875 | if (Data != 0L) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4876 | if (_unknownFields != null) { |
| 4877 | hash ^= _unknownFields.GetHashCode(); |
| 4878 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4879 | return hash; |
| 4880 | } |
| 4881 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4882 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4883 | public override string ToString() { |
| 4884 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4885 | } |
| 4886 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4887 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4888 | public void WriteTo(pb::CodedOutputStream output) { |
| 4889 | if (Data != 0L) { |
| 4890 | output.WriteRawTag(8); |
| 4891 | output.WriteInt64(Data); |
| 4892 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4893 | if (_unknownFields != null) { |
| 4894 | _unknownFields.WriteTo(output); |
| 4895 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4896 | } |
| 4897 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4898 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4899 | public int CalculateSize() { |
| 4900 | int size = 0; |
| 4901 | if (Data != 0L) { |
| 4902 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data); |
| 4903 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4904 | if (_unknownFields != null) { |
| 4905 | size += _unknownFields.CalculateSize(); |
| 4906 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4907 | return size; |
| 4908 | } |
| 4909 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4910 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4911 | public void MergeFrom(Int64Message other) { |
| 4912 | if (other == null) { |
| 4913 | return; |
| 4914 | } |
| 4915 | if (other.Data != 0L) { |
| 4916 | Data = other.Data; |
| 4917 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4918 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4919 | } |
| 4920 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4921 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4922 | public void MergeFrom(pb::CodedInputStream input) { |
| 4923 | uint tag; |
| 4924 | while ((tag = input.ReadTag()) != 0) { |
| 4925 | switch(tag) { |
| 4926 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4927 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4928 | break; |
| 4929 | case 8: { |
| 4930 | Data = input.ReadInt64(); |
| 4931 | break; |
| 4932 | } |
| 4933 | } |
| 4934 | } |
| 4935 | } |
| 4936 | |
| 4937 | } |
| 4938 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4939 | public sealed partial class Uint64Message : pb::IMessage<Uint64Message> { |
| 4940 | private static readonly pb::MessageParser<Uint64Message> _parser = new pb::MessageParser<Uint64Message>(() => new Uint64Message()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4941 | private pb::UnknownFieldSet _unknownFields; |
| 4942 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4943 | public static pb::MessageParser<Uint64Message> Parser { get { return _parser; } } |
| 4944 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4945 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4946 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4947 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[21]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4948 | } |
| 4949 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4950 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4951 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4952 | get { return Descriptor; } |
| 4953 | } |
| 4954 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4955 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4956 | public Uint64Message() { |
| 4957 | OnConstruction(); |
| 4958 | } |
| 4959 | |
| 4960 | partial void OnConstruction(); |
| 4961 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4962 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4963 | public Uint64Message(Uint64Message other) : this() { |
| 4964 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4965 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4966 | } |
| 4967 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4968 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4969 | public Uint64Message Clone() { |
| 4970 | return new Uint64Message(this); |
| 4971 | } |
| 4972 | |
| 4973 | /// <summary>Field number for the "data" field.</summary> |
| 4974 | public const int DataFieldNumber = 1; |
| 4975 | private ulong data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4976 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4977 | public ulong Data { |
| 4978 | get { return data_; } |
| 4979 | set { |
| 4980 | data_ = value; |
| 4981 | } |
| 4982 | } |
| 4983 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4984 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4985 | public override bool Equals(object other) { |
| 4986 | return Equals(other as Uint64Message); |
| 4987 | } |
| 4988 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4989 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4990 | public bool Equals(Uint64Message other) { |
| 4991 | if (ReferenceEquals(other, null)) { |
| 4992 | return false; |
| 4993 | } |
| 4994 | if (ReferenceEquals(other, this)) { |
| 4995 | return true; |
| 4996 | } |
| 4997 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4998 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4999 | } |
| 5000 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5001 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5002 | public override int GetHashCode() { |
| 5003 | int hash = 1; |
| 5004 | if (Data != 0UL) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5005 | if (_unknownFields != null) { |
| 5006 | hash ^= _unknownFields.GetHashCode(); |
| 5007 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5008 | return hash; |
| 5009 | } |
| 5010 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5011 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5012 | public override string ToString() { |
| 5013 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5014 | } |
| 5015 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5016 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5017 | public void WriteTo(pb::CodedOutputStream output) { |
| 5018 | if (Data != 0UL) { |
| 5019 | output.WriteRawTag(8); |
| 5020 | output.WriteUInt64(Data); |
| 5021 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5022 | if (_unknownFields != null) { |
| 5023 | _unknownFields.WriteTo(output); |
| 5024 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5025 | } |
| 5026 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5027 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5028 | public int CalculateSize() { |
| 5029 | int size = 0; |
| 5030 | if (Data != 0UL) { |
| 5031 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data); |
| 5032 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5033 | if (_unknownFields != null) { |
| 5034 | size += _unknownFields.CalculateSize(); |
| 5035 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5036 | return size; |
| 5037 | } |
| 5038 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5039 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5040 | public void MergeFrom(Uint64Message other) { |
| 5041 | if (other == null) { |
| 5042 | return; |
| 5043 | } |
| 5044 | if (other.Data != 0UL) { |
| 5045 | Data = other.Data; |
| 5046 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5047 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5048 | } |
| 5049 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5050 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5051 | public void MergeFrom(pb::CodedInputStream input) { |
| 5052 | uint tag; |
| 5053 | while ((tag = input.ReadTag()) != 0) { |
| 5054 | switch(tag) { |
| 5055 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5056 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5057 | break; |
| 5058 | case 8: { |
| 5059 | Data = input.ReadUInt64(); |
| 5060 | break; |
| 5061 | } |
| 5062 | } |
| 5063 | } |
| 5064 | } |
| 5065 | |
| 5066 | } |
| 5067 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5068 | public sealed partial class BoolMessage : pb::IMessage<BoolMessage> { |
| 5069 | private static readonly pb::MessageParser<BoolMessage> _parser = new pb::MessageParser<BoolMessage>(() => new BoolMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5070 | private pb::UnknownFieldSet _unknownFields; |
| 5071 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5072 | public static pb::MessageParser<BoolMessage> Parser { get { return _parser; } } |
| 5073 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5074 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5075 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5076 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[22]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5077 | } |
| 5078 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5079 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5080 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5081 | get { return Descriptor; } |
| 5082 | } |
| 5083 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5084 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5085 | public BoolMessage() { |
| 5086 | OnConstruction(); |
| 5087 | } |
| 5088 | |
| 5089 | partial void OnConstruction(); |
| 5090 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5091 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5092 | public BoolMessage(BoolMessage other) : this() { |
| 5093 | data_ = other.data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5094 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5095 | } |
| 5096 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5097 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5098 | public BoolMessage Clone() { |
| 5099 | return new BoolMessage(this); |
| 5100 | } |
| 5101 | |
| 5102 | /// <summary>Field number for the "data" field.</summary> |
| 5103 | public const int DataFieldNumber = 1; |
| 5104 | private bool data_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5105 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5106 | public bool Data { |
| 5107 | get { return data_; } |
| 5108 | set { |
| 5109 | data_ = value; |
| 5110 | } |
| 5111 | } |
| 5112 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5113 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5114 | public override bool Equals(object other) { |
| 5115 | return Equals(other as BoolMessage); |
| 5116 | } |
| 5117 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5118 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5119 | public bool Equals(BoolMessage other) { |
| 5120 | if (ReferenceEquals(other, null)) { |
| 5121 | return false; |
| 5122 | } |
| 5123 | if (ReferenceEquals(other, this)) { |
| 5124 | return true; |
| 5125 | } |
| 5126 | if (Data != other.Data) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5127 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5128 | } |
| 5129 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5131 | public override int GetHashCode() { |
| 5132 | int hash = 1; |
| 5133 | if (Data != false) hash ^= Data.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5134 | if (_unknownFields != null) { |
| 5135 | hash ^= _unknownFields.GetHashCode(); |
| 5136 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5137 | return hash; |
| 5138 | } |
| 5139 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5140 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5141 | public override string ToString() { |
| 5142 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5143 | } |
| 5144 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5145 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5146 | public void WriteTo(pb::CodedOutputStream output) { |
| 5147 | if (Data != false) { |
| 5148 | output.WriteRawTag(8); |
| 5149 | output.WriteBool(Data); |
| 5150 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5151 | if (_unknownFields != null) { |
| 5152 | _unknownFields.WriteTo(output); |
| 5153 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5154 | } |
| 5155 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5156 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5157 | public int CalculateSize() { |
| 5158 | int size = 0; |
| 5159 | if (Data != false) { |
| 5160 | size += 1 + 1; |
| 5161 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5162 | if (_unknownFields != null) { |
| 5163 | size += _unknownFields.CalculateSize(); |
| 5164 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5165 | return size; |
| 5166 | } |
| 5167 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5168 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5169 | public void MergeFrom(BoolMessage other) { |
| 5170 | if (other == null) { |
| 5171 | return; |
| 5172 | } |
| 5173 | if (other.Data != false) { |
| 5174 | Data = other.Data; |
| 5175 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5176 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5177 | } |
| 5178 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5180 | public void MergeFrom(pb::CodedInputStream input) { |
| 5181 | uint tag; |
| 5182 | while ((tag = input.ReadTag()) != 0) { |
| 5183 | switch(tag) { |
| 5184 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5185 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5186 | break; |
| 5187 | case 8: { |
| 5188 | Data = input.ReadBool(); |
| 5189 | break; |
| 5190 | } |
| 5191 | } |
| 5192 | } |
| 5193 | } |
| 5194 | |
| 5195 | } |
| 5196 | |
| 5197 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5198 | /// Test oneofs. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5199 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5200 | public sealed partial class TestOneof : pb::IMessage<TestOneof> { |
| 5201 | private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5202 | private pb::UnknownFieldSet _unknownFields; |
| 5203 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5204 | public static pb::MessageParser<TestOneof> Parser { get { return _parser; } } |
| 5205 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5207 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5208 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[23]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5209 | } |
| 5210 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5211 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5212 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5213 | get { return Descriptor; } |
| 5214 | } |
| 5215 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5216 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5217 | public TestOneof() { |
| 5218 | OnConstruction(); |
| 5219 | } |
| 5220 | |
| 5221 | partial void OnConstruction(); |
| 5222 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5223 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5224 | public TestOneof(TestOneof other) : this() { |
| 5225 | switch (other.FooCase) { |
| 5226 | case FooOneofCase.FooInt: |
| 5227 | FooInt = other.FooInt; |
| 5228 | break; |
| 5229 | case FooOneofCase.FooString: |
| 5230 | FooString = other.FooString; |
| 5231 | break; |
| 5232 | case FooOneofCase.FooMessage: |
| 5233 | FooMessage = other.FooMessage.Clone(); |
| 5234 | break; |
| 5235 | } |
| 5236 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5237 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5238 | } |
| 5239 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5240 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5241 | public TestOneof Clone() { |
| 5242 | return new TestOneof(this); |
| 5243 | } |
| 5244 | |
| 5245 | /// <summary>Field number for the "foo_int" field.</summary> |
| 5246 | public const int FooIntFieldNumber = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5247 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5248 | public int FooInt { |
| 5249 | get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; } |
| 5250 | set { |
| 5251 | foo_ = value; |
| 5252 | fooCase_ = FooOneofCase.FooInt; |
| 5253 | } |
| 5254 | } |
| 5255 | |
| 5256 | /// <summary>Field number for the "foo_string" field.</summary> |
| 5257 | public const int FooStringFieldNumber = 2; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5258 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5259 | public string FooString { |
| 5260 | get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; } |
| 5261 | set { |
| 5262 | foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 5263 | fooCase_ = FooOneofCase.FooString; |
| 5264 | } |
| 5265 | } |
| 5266 | |
| 5267 | /// <summary>Field number for the "foo_message" field.</summary> |
| 5268 | public const int FooMessageFieldNumber = 3; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5269 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5270 | public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage { |
| 5271 | get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes) foo_ : null; } |
| 5272 | set { |
| 5273 | foo_ = value; |
| 5274 | fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage; |
| 5275 | } |
| 5276 | } |
| 5277 | |
| 5278 | private object foo_; |
| 5279 | /// <summary>Enum of possible cases for the "foo" oneof.</summary> |
| 5280 | public enum FooOneofCase { |
| 5281 | None = 0, |
| 5282 | FooInt = 1, |
| 5283 | FooString = 2, |
| 5284 | FooMessage = 3, |
| 5285 | } |
| 5286 | private FooOneofCase fooCase_ = FooOneofCase.None; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5287 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5288 | public FooOneofCase FooCase { |
| 5289 | get { return fooCase_; } |
| 5290 | } |
| 5291 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5292 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5293 | public void ClearFoo() { |
| 5294 | fooCase_ = FooOneofCase.None; |
| 5295 | foo_ = null; |
| 5296 | } |
| 5297 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5298 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5299 | public override bool Equals(object other) { |
| 5300 | return Equals(other as TestOneof); |
| 5301 | } |
| 5302 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5304 | public bool Equals(TestOneof other) { |
| 5305 | if (ReferenceEquals(other, null)) { |
| 5306 | return false; |
| 5307 | } |
| 5308 | if (ReferenceEquals(other, this)) { |
| 5309 | return true; |
| 5310 | } |
| 5311 | if (FooInt != other.FooInt) return false; |
| 5312 | if (FooString != other.FooString) return false; |
| 5313 | if (!object.Equals(FooMessage, other.FooMessage)) return false; |
| 5314 | if (FooCase != other.FooCase) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5315 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5316 | } |
| 5317 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5318 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5319 | public override int GetHashCode() { |
| 5320 | int hash = 1; |
| 5321 | if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode(); |
| 5322 | if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode(); |
| 5323 | if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode(); |
| 5324 | hash ^= (int) fooCase_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5325 | if (_unknownFields != null) { |
| 5326 | hash ^= _unknownFields.GetHashCode(); |
| 5327 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5328 | return hash; |
| 5329 | } |
| 5330 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5331 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5332 | public override string ToString() { |
| 5333 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5334 | } |
| 5335 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5336 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5337 | public void WriteTo(pb::CodedOutputStream output) { |
| 5338 | if (fooCase_ == FooOneofCase.FooInt) { |
| 5339 | output.WriteRawTag(8); |
| 5340 | output.WriteInt32(FooInt); |
| 5341 | } |
| 5342 | if (fooCase_ == FooOneofCase.FooString) { |
| 5343 | output.WriteRawTag(18); |
| 5344 | output.WriteString(FooString); |
| 5345 | } |
| 5346 | if (fooCase_ == FooOneofCase.FooMessage) { |
| 5347 | output.WriteRawTag(26); |
| 5348 | output.WriteMessage(FooMessage); |
| 5349 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5350 | if (_unknownFields != null) { |
| 5351 | _unknownFields.WriteTo(output); |
| 5352 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5353 | } |
| 5354 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5355 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5356 | public int CalculateSize() { |
| 5357 | int size = 0; |
| 5358 | if (fooCase_ == FooOneofCase.FooInt) { |
| 5359 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt); |
| 5360 | } |
| 5361 | if (fooCase_ == FooOneofCase.FooString) { |
| 5362 | size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString); |
| 5363 | } |
| 5364 | if (fooCase_ == FooOneofCase.FooMessage) { |
| 5365 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage); |
| 5366 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5367 | if (_unknownFields != null) { |
| 5368 | size += _unknownFields.CalculateSize(); |
| 5369 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5370 | return size; |
| 5371 | } |
| 5372 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5373 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5374 | public void MergeFrom(TestOneof other) { |
| 5375 | if (other == null) { |
| 5376 | return; |
| 5377 | } |
| 5378 | switch (other.FooCase) { |
| 5379 | case FooOneofCase.FooInt: |
| 5380 | FooInt = other.FooInt; |
| 5381 | break; |
| 5382 | case FooOneofCase.FooString: |
| 5383 | FooString = other.FooString; |
| 5384 | break; |
| 5385 | case FooOneofCase.FooMessage: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5386 | if (FooMessage == null) { |
| 5387 | FooMessage = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 5388 | } |
| 5389 | FooMessage.MergeFrom(other.FooMessage); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5390 | break; |
| 5391 | } |
| 5392 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5393 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5394 | } |
| 5395 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5396 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5397 | public void MergeFrom(pb::CodedInputStream input) { |
| 5398 | uint tag; |
| 5399 | while ((tag = input.ReadTag()) != 0) { |
| 5400 | switch(tag) { |
| 5401 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5402 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5403 | break; |
| 5404 | case 8: { |
| 5405 | FooInt = input.ReadInt32(); |
| 5406 | break; |
| 5407 | } |
| 5408 | case 18: { |
| 5409 | FooString = input.ReadString(); |
| 5410 | break; |
| 5411 | } |
| 5412 | case 26: { |
| 5413 | global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 5414 | if (fooCase_ == FooOneofCase.FooMessage) { |
| 5415 | subBuilder.MergeFrom(FooMessage); |
| 5416 | } |
| 5417 | input.ReadMessage(subBuilder); |
| 5418 | FooMessage = subBuilder; |
| 5419 | break; |
| 5420 | } |
| 5421 | } |
| 5422 | } |
| 5423 | } |
| 5424 | |
| 5425 | } |
| 5426 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5427 | public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes> { |
| 5428 | private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb::MessageParser<TestPackedTypes>(() => new TestPackedTypes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5429 | private pb::UnknownFieldSet _unknownFields; |
| 5430 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5431 | public static pb::MessageParser<TestPackedTypes> Parser { get { return _parser; } } |
| 5432 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5433 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5434 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5435 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[24]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5436 | } |
| 5437 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5438 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5439 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5440 | get { return Descriptor; } |
| 5441 | } |
| 5442 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5443 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5444 | public TestPackedTypes() { |
| 5445 | OnConstruction(); |
| 5446 | } |
| 5447 | |
| 5448 | partial void OnConstruction(); |
| 5449 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5450 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5451 | public TestPackedTypes(TestPackedTypes other) : this() { |
| 5452 | packedInt32_ = other.packedInt32_.Clone(); |
| 5453 | packedInt64_ = other.packedInt64_.Clone(); |
| 5454 | packedUint32_ = other.packedUint32_.Clone(); |
| 5455 | packedUint64_ = other.packedUint64_.Clone(); |
| 5456 | packedSint32_ = other.packedSint32_.Clone(); |
| 5457 | packedSint64_ = other.packedSint64_.Clone(); |
| 5458 | packedFixed32_ = other.packedFixed32_.Clone(); |
| 5459 | packedFixed64_ = other.packedFixed64_.Clone(); |
| 5460 | packedSfixed32_ = other.packedSfixed32_.Clone(); |
| 5461 | packedSfixed64_ = other.packedSfixed64_.Clone(); |
| 5462 | packedFloat_ = other.packedFloat_.Clone(); |
| 5463 | packedDouble_ = other.packedDouble_.Clone(); |
| 5464 | packedBool_ = other.packedBool_.Clone(); |
| 5465 | packedEnum_ = other.packedEnum_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5466 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5467 | } |
| 5468 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5469 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5470 | public TestPackedTypes Clone() { |
| 5471 | return new TestPackedTypes(this); |
| 5472 | } |
| 5473 | |
| 5474 | /// <summary>Field number for the "packed_int32" field.</summary> |
| 5475 | public const int PackedInt32FieldNumber = 90; |
| 5476 | private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec |
| 5477 | = pb::FieldCodec.ForInt32(722); |
| 5478 | private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5479 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5480 | public pbc::RepeatedField<int> PackedInt32 { |
| 5481 | get { return packedInt32_; } |
| 5482 | } |
| 5483 | |
| 5484 | /// <summary>Field number for the "packed_int64" field.</summary> |
| 5485 | public const int PackedInt64FieldNumber = 91; |
| 5486 | private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec |
| 5487 | = pb::FieldCodec.ForInt64(730); |
| 5488 | private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5489 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5490 | public pbc::RepeatedField<long> PackedInt64 { |
| 5491 | get { return packedInt64_; } |
| 5492 | } |
| 5493 | |
| 5494 | /// <summary>Field number for the "packed_uint32" field.</summary> |
| 5495 | public const int PackedUint32FieldNumber = 92; |
| 5496 | private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec |
| 5497 | = pb::FieldCodec.ForUInt32(738); |
| 5498 | private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5499 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5500 | public pbc::RepeatedField<uint> PackedUint32 { |
| 5501 | get { return packedUint32_; } |
| 5502 | } |
| 5503 | |
| 5504 | /// <summary>Field number for the "packed_uint64" field.</summary> |
| 5505 | public const int PackedUint64FieldNumber = 93; |
| 5506 | private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec |
| 5507 | = pb::FieldCodec.ForUInt64(746); |
| 5508 | private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5509 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5510 | public pbc::RepeatedField<ulong> PackedUint64 { |
| 5511 | get { return packedUint64_; } |
| 5512 | } |
| 5513 | |
| 5514 | /// <summary>Field number for the "packed_sint32" field.</summary> |
| 5515 | public const int PackedSint32FieldNumber = 94; |
| 5516 | private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec |
| 5517 | = pb::FieldCodec.ForSInt32(754); |
| 5518 | private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5519 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5520 | public pbc::RepeatedField<int> PackedSint32 { |
| 5521 | get { return packedSint32_; } |
| 5522 | } |
| 5523 | |
| 5524 | /// <summary>Field number for the "packed_sint64" field.</summary> |
| 5525 | public const int PackedSint64FieldNumber = 95; |
| 5526 | private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec |
| 5527 | = pb::FieldCodec.ForSInt64(762); |
| 5528 | private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5529 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5530 | public pbc::RepeatedField<long> PackedSint64 { |
| 5531 | get { return packedSint64_; } |
| 5532 | } |
| 5533 | |
| 5534 | /// <summary>Field number for the "packed_fixed32" field.</summary> |
| 5535 | public const int PackedFixed32FieldNumber = 96; |
| 5536 | private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec |
| 5537 | = pb::FieldCodec.ForFixed32(770); |
| 5538 | private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5539 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5540 | public pbc::RepeatedField<uint> PackedFixed32 { |
| 5541 | get { return packedFixed32_; } |
| 5542 | } |
| 5543 | |
| 5544 | /// <summary>Field number for the "packed_fixed64" field.</summary> |
| 5545 | public const int PackedFixed64FieldNumber = 97; |
| 5546 | private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec |
| 5547 | = pb::FieldCodec.ForFixed64(778); |
| 5548 | private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5549 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5550 | public pbc::RepeatedField<ulong> PackedFixed64 { |
| 5551 | get { return packedFixed64_; } |
| 5552 | } |
| 5553 | |
| 5554 | /// <summary>Field number for the "packed_sfixed32" field.</summary> |
| 5555 | public const int PackedSfixed32FieldNumber = 98; |
| 5556 | private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec |
| 5557 | = pb::FieldCodec.ForSFixed32(786); |
| 5558 | private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5559 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5560 | public pbc::RepeatedField<int> PackedSfixed32 { |
| 5561 | get { return packedSfixed32_; } |
| 5562 | } |
| 5563 | |
| 5564 | /// <summary>Field number for the "packed_sfixed64" field.</summary> |
| 5565 | public const int PackedSfixed64FieldNumber = 99; |
| 5566 | private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec |
| 5567 | = pb::FieldCodec.ForSFixed64(794); |
| 5568 | private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5569 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5570 | public pbc::RepeatedField<long> PackedSfixed64 { |
| 5571 | get { return packedSfixed64_; } |
| 5572 | } |
| 5573 | |
| 5574 | /// <summary>Field number for the "packed_float" field.</summary> |
| 5575 | public const int PackedFloatFieldNumber = 100; |
| 5576 | private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec |
| 5577 | = pb::FieldCodec.ForFloat(802); |
| 5578 | private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedField<float>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5579 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5580 | public pbc::RepeatedField<float> PackedFloat { |
| 5581 | get { return packedFloat_; } |
| 5582 | } |
| 5583 | |
| 5584 | /// <summary>Field number for the "packed_double" field.</summary> |
| 5585 | public const int PackedDoubleFieldNumber = 101; |
| 5586 | private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec |
| 5587 | = pb::FieldCodec.ForDouble(810); |
| 5588 | private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::RepeatedField<double>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5589 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5590 | public pbc::RepeatedField<double> PackedDouble { |
| 5591 | get { return packedDouble_; } |
| 5592 | } |
| 5593 | |
| 5594 | /// <summary>Field number for the "packed_bool" field.</summary> |
| 5595 | public const int PackedBoolFieldNumber = 102; |
| 5596 | private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec |
| 5597 | = pb::FieldCodec.ForBool(818); |
| 5598 | private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedField<bool>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5599 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5600 | public pbc::RepeatedField<bool> PackedBool { |
| 5601 | get { return packedBool_; } |
| 5602 | } |
| 5603 | |
| 5604 | /// <summary>Field number for the "packed_enum" field.</summary> |
| 5605 | public const int PackedEnumFieldNumber = 103; |
| 5606 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_packedEnum_codec |
| 5607 | = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x); |
| 5608 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5609 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5610 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> PackedEnum { |
| 5611 | get { return packedEnum_; } |
| 5612 | } |
| 5613 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5614 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5615 | public override bool Equals(object other) { |
| 5616 | return Equals(other as TestPackedTypes); |
| 5617 | } |
| 5618 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5619 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5620 | public bool Equals(TestPackedTypes other) { |
| 5621 | if (ReferenceEquals(other, null)) { |
| 5622 | return false; |
| 5623 | } |
| 5624 | if (ReferenceEquals(other, this)) { |
| 5625 | return true; |
| 5626 | } |
| 5627 | if(!packedInt32_.Equals(other.packedInt32_)) return false; |
| 5628 | if(!packedInt64_.Equals(other.packedInt64_)) return false; |
| 5629 | if(!packedUint32_.Equals(other.packedUint32_)) return false; |
| 5630 | if(!packedUint64_.Equals(other.packedUint64_)) return false; |
| 5631 | if(!packedSint32_.Equals(other.packedSint32_)) return false; |
| 5632 | if(!packedSint64_.Equals(other.packedSint64_)) return false; |
| 5633 | if(!packedFixed32_.Equals(other.packedFixed32_)) return false; |
| 5634 | if(!packedFixed64_.Equals(other.packedFixed64_)) return false; |
| 5635 | if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false; |
| 5636 | if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false; |
| 5637 | if(!packedFloat_.Equals(other.packedFloat_)) return false; |
| 5638 | if(!packedDouble_.Equals(other.packedDouble_)) return false; |
| 5639 | if(!packedBool_.Equals(other.packedBool_)) return false; |
| 5640 | if(!packedEnum_.Equals(other.packedEnum_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5641 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5642 | } |
| 5643 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5644 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5645 | public override int GetHashCode() { |
| 5646 | int hash = 1; |
| 5647 | hash ^= packedInt32_.GetHashCode(); |
| 5648 | hash ^= packedInt64_.GetHashCode(); |
| 5649 | hash ^= packedUint32_.GetHashCode(); |
| 5650 | hash ^= packedUint64_.GetHashCode(); |
| 5651 | hash ^= packedSint32_.GetHashCode(); |
| 5652 | hash ^= packedSint64_.GetHashCode(); |
| 5653 | hash ^= packedFixed32_.GetHashCode(); |
| 5654 | hash ^= packedFixed64_.GetHashCode(); |
| 5655 | hash ^= packedSfixed32_.GetHashCode(); |
| 5656 | hash ^= packedSfixed64_.GetHashCode(); |
| 5657 | hash ^= packedFloat_.GetHashCode(); |
| 5658 | hash ^= packedDouble_.GetHashCode(); |
| 5659 | hash ^= packedBool_.GetHashCode(); |
| 5660 | hash ^= packedEnum_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5661 | if (_unknownFields != null) { |
| 5662 | hash ^= _unknownFields.GetHashCode(); |
| 5663 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5664 | return hash; |
| 5665 | } |
| 5666 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5667 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5668 | public override string ToString() { |
| 5669 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5670 | } |
| 5671 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5672 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5673 | public void WriteTo(pb::CodedOutputStream output) { |
| 5674 | packedInt32_.WriteTo(output, _repeated_packedInt32_codec); |
| 5675 | packedInt64_.WriteTo(output, _repeated_packedInt64_codec); |
| 5676 | packedUint32_.WriteTo(output, _repeated_packedUint32_codec); |
| 5677 | packedUint64_.WriteTo(output, _repeated_packedUint64_codec); |
| 5678 | packedSint32_.WriteTo(output, _repeated_packedSint32_codec); |
| 5679 | packedSint64_.WriteTo(output, _repeated_packedSint64_codec); |
| 5680 | packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec); |
| 5681 | packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec); |
| 5682 | packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec); |
| 5683 | packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec); |
| 5684 | packedFloat_.WriteTo(output, _repeated_packedFloat_codec); |
| 5685 | packedDouble_.WriteTo(output, _repeated_packedDouble_codec); |
| 5686 | packedBool_.WriteTo(output, _repeated_packedBool_codec); |
| 5687 | packedEnum_.WriteTo(output, _repeated_packedEnum_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5688 | if (_unknownFields != null) { |
| 5689 | _unknownFields.WriteTo(output); |
| 5690 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5691 | } |
| 5692 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5693 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5694 | public int CalculateSize() { |
| 5695 | int size = 0; |
| 5696 | size += packedInt32_.CalculateSize(_repeated_packedInt32_codec); |
| 5697 | size += packedInt64_.CalculateSize(_repeated_packedInt64_codec); |
| 5698 | size += packedUint32_.CalculateSize(_repeated_packedUint32_codec); |
| 5699 | size += packedUint64_.CalculateSize(_repeated_packedUint64_codec); |
| 5700 | size += packedSint32_.CalculateSize(_repeated_packedSint32_codec); |
| 5701 | size += packedSint64_.CalculateSize(_repeated_packedSint64_codec); |
| 5702 | size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec); |
| 5703 | size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec); |
| 5704 | size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec); |
| 5705 | size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec); |
| 5706 | size += packedFloat_.CalculateSize(_repeated_packedFloat_codec); |
| 5707 | size += packedDouble_.CalculateSize(_repeated_packedDouble_codec); |
| 5708 | size += packedBool_.CalculateSize(_repeated_packedBool_codec); |
| 5709 | size += packedEnum_.CalculateSize(_repeated_packedEnum_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5710 | if (_unknownFields != null) { |
| 5711 | size += _unknownFields.CalculateSize(); |
| 5712 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5713 | return size; |
| 5714 | } |
| 5715 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5716 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5717 | public void MergeFrom(TestPackedTypes other) { |
| 5718 | if (other == null) { |
| 5719 | return; |
| 5720 | } |
| 5721 | packedInt32_.Add(other.packedInt32_); |
| 5722 | packedInt64_.Add(other.packedInt64_); |
| 5723 | packedUint32_.Add(other.packedUint32_); |
| 5724 | packedUint64_.Add(other.packedUint64_); |
| 5725 | packedSint32_.Add(other.packedSint32_); |
| 5726 | packedSint64_.Add(other.packedSint64_); |
| 5727 | packedFixed32_.Add(other.packedFixed32_); |
| 5728 | packedFixed64_.Add(other.packedFixed64_); |
| 5729 | packedSfixed32_.Add(other.packedSfixed32_); |
| 5730 | packedSfixed64_.Add(other.packedSfixed64_); |
| 5731 | packedFloat_.Add(other.packedFloat_); |
| 5732 | packedDouble_.Add(other.packedDouble_); |
| 5733 | packedBool_.Add(other.packedBool_); |
| 5734 | packedEnum_.Add(other.packedEnum_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5735 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5736 | } |
| 5737 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5738 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5739 | public void MergeFrom(pb::CodedInputStream input) { |
| 5740 | uint tag; |
| 5741 | while ((tag = input.ReadTag()) != 0) { |
| 5742 | switch(tag) { |
| 5743 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5744 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5745 | break; |
| 5746 | case 722: |
| 5747 | case 720: { |
| 5748 | packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec); |
| 5749 | break; |
| 5750 | } |
| 5751 | case 730: |
| 5752 | case 728: { |
| 5753 | packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec); |
| 5754 | break; |
| 5755 | } |
| 5756 | case 738: |
| 5757 | case 736: { |
| 5758 | packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec); |
| 5759 | break; |
| 5760 | } |
| 5761 | case 746: |
| 5762 | case 744: { |
| 5763 | packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec); |
| 5764 | break; |
| 5765 | } |
| 5766 | case 754: |
| 5767 | case 752: { |
| 5768 | packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec); |
| 5769 | break; |
| 5770 | } |
| 5771 | case 762: |
| 5772 | case 760: { |
| 5773 | packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec); |
| 5774 | break; |
| 5775 | } |
| 5776 | case 770: |
| 5777 | case 773: { |
| 5778 | packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec); |
| 5779 | break; |
| 5780 | } |
| 5781 | case 778: |
| 5782 | case 777: { |
| 5783 | packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec); |
| 5784 | break; |
| 5785 | } |
| 5786 | case 786: |
| 5787 | case 789: { |
| 5788 | packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec); |
| 5789 | break; |
| 5790 | } |
| 5791 | case 794: |
| 5792 | case 793: { |
| 5793 | packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec); |
| 5794 | break; |
| 5795 | } |
| 5796 | case 802: |
| 5797 | case 805: { |
| 5798 | packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec); |
| 5799 | break; |
| 5800 | } |
| 5801 | case 810: |
| 5802 | case 809: { |
| 5803 | packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec); |
| 5804 | break; |
| 5805 | } |
| 5806 | case 818: |
| 5807 | case 816: { |
| 5808 | packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec); |
| 5809 | break; |
| 5810 | } |
| 5811 | case 826: |
| 5812 | case 824: { |
| 5813 | packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec); |
| 5814 | break; |
| 5815 | } |
| 5816 | } |
| 5817 | } |
| 5818 | } |
| 5819 | |
| 5820 | } |
| 5821 | |
| 5822 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5823 | /// A message with the same fields as TestPackedTypes, but without packing. Used |
| 5824 | /// to test packed <-> unpacked wire compatibility. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5825 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5826 | public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes> { |
| 5827 | private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5828 | private pb::UnknownFieldSet _unknownFields; |
| 5829 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5830 | public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _parser; } } |
| 5831 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5832 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5833 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5834 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[25]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5835 | } |
| 5836 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5837 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5838 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5839 | get { return Descriptor; } |
| 5840 | } |
| 5841 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5842 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5843 | public TestUnpackedTypes() { |
| 5844 | OnConstruction(); |
| 5845 | } |
| 5846 | |
| 5847 | partial void OnConstruction(); |
| 5848 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5849 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5850 | public TestUnpackedTypes(TestUnpackedTypes other) : this() { |
| 5851 | unpackedInt32_ = other.unpackedInt32_.Clone(); |
| 5852 | unpackedInt64_ = other.unpackedInt64_.Clone(); |
| 5853 | unpackedUint32_ = other.unpackedUint32_.Clone(); |
| 5854 | unpackedUint64_ = other.unpackedUint64_.Clone(); |
| 5855 | unpackedSint32_ = other.unpackedSint32_.Clone(); |
| 5856 | unpackedSint64_ = other.unpackedSint64_.Clone(); |
| 5857 | unpackedFixed32_ = other.unpackedFixed32_.Clone(); |
| 5858 | unpackedFixed64_ = other.unpackedFixed64_.Clone(); |
| 5859 | unpackedSfixed32_ = other.unpackedSfixed32_.Clone(); |
| 5860 | unpackedSfixed64_ = other.unpackedSfixed64_.Clone(); |
| 5861 | unpackedFloat_ = other.unpackedFloat_.Clone(); |
| 5862 | unpackedDouble_ = other.unpackedDouble_.Clone(); |
| 5863 | unpackedBool_ = other.unpackedBool_.Clone(); |
| 5864 | unpackedEnum_ = other.unpackedEnum_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5865 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5866 | } |
| 5867 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5869 | public TestUnpackedTypes Clone() { |
| 5870 | return new TestUnpackedTypes(this); |
| 5871 | } |
| 5872 | |
| 5873 | /// <summary>Field number for the "unpacked_int32" field.</summary> |
| 5874 | public const int UnpackedInt32FieldNumber = 90; |
| 5875 | private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec |
| 5876 | = pb::FieldCodec.ForInt32(720); |
| 5877 | private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5878 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5879 | public pbc::RepeatedField<int> UnpackedInt32 { |
| 5880 | get { return unpackedInt32_; } |
| 5881 | } |
| 5882 | |
| 5883 | /// <summary>Field number for the "unpacked_int64" field.</summary> |
| 5884 | public const int UnpackedInt64FieldNumber = 91; |
| 5885 | private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec |
| 5886 | = pb::FieldCodec.ForInt64(728); |
| 5887 | private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5888 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5889 | public pbc::RepeatedField<long> UnpackedInt64 { |
| 5890 | get { return unpackedInt64_; } |
| 5891 | } |
| 5892 | |
| 5893 | /// <summary>Field number for the "unpacked_uint32" field.</summary> |
| 5894 | public const int UnpackedUint32FieldNumber = 92; |
| 5895 | private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec |
| 5896 | = pb::FieldCodec.ForUInt32(736); |
| 5897 | private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5898 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5899 | public pbc::RepeatedField<uint> UnpackedUint32 { |
| 5900 | get { return unpackedUint32_; } |
| 5901 | } |
| 5902 | |
| 5903 | /// <summary>Field number for the "unpacked_uint64" field.</summary> |
| 5904 | public const int UnpackedUint64FieldNumber = 93; |
| 5905 | private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec |
| 5906 | = pb::FieldCodec.ForUInt64(744); |
| 5907 | private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5908 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5909 | public pbc::RepeatedField<ulong> UnpackedUint64 { |
| 5910 | get { return unpackedUint64_; } |
| 5911 | } |
| 5912 | |
| 5913 | /// <summary>Field number for the "unpacked_sint32" field.</summary> |
| 5914 | public const int UnpackedSint32FieldNumber = 94; |
| 5915 | private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec |
| 5916 | = pb::FieldCodec.ForSInt32(752); |
| 5917 | private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5918 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5919 | public pbc::RepeatedField<int> UnpackedSint32 { |
| 5920 | get { return unpackedSint32_; } |
| 5921 | } |
| 5922 | |
| 5923 | /// <summary>Field number for the "unpacked_sint64" field.</summary> |
| 5924 | public const int UnpackedSint64FieldNumber = 95; |
| 5925 | private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec |
| 5926 | = pb::FieldCodec.ForSInt64(760); |
| 5927 | private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5928 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5929 | public pbc::RepeatedField<long> UnpackedSint64 { |
| 5930 | get { return unpackedSint64_; } |
| 5931 | } |
| 5932 | |
| 5933 | /// <summary>Field number for the "unpacked_fixed32" field.</summary> |
| 5934 | public const int UnpackedFixed32FieldNumber = 96; |
| 5935 | private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec |
| 5936 | = pb::FieldCodec.ForFixed32(773); |
| 5937 | private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::RepeatedField<uint>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5938 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5939 | public pbc::RepeatedField<uint> UnpackedFixed32 { |
| 5940 | get { return unpackedFixed32_; } |
| 5941 | } |
| 5942 | |
| 5943 | /// <summary>Field number for the "unpacked_fixed64" field.</summary> |
| 5944 | public const int UnpackedFixed64FieldNumber = 97; |
| 5945 | private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_codec |
| 5946 | = pb::FieldCodec.ForFixed64(777); |
| 5947 | private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5948 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5949 | public pbc::RepeatedField<ulong> UnpackedFixed64 { |
| 5950 | get { return unpackedFixed64_; } |
| 5951 | } |
| 5952 | |
| 5953 | /// <summary>Field number for the "unpacked_sfixed32" field.</summary> |
| 5954 | public const int UnpackedSfixed32FieldNumber = 98; |
| 5955 | private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec |
| 5956 | = pb::FieldCodec.ForSFixed32(789); |
| 5957 | private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5959 | public pbc::RepeatedField<int> UnpackedSfixed32 { |
| 5960 | get { return unpackedSfixed32_; } |
| 5961 | } |
| 5962 | |
| 5963 | /// <summary>Field number for the "unpacked_sfixed64" field.</summary> |
| 5964 | public const int UnpackedSfixed64FieldNumber = 99; |
| 5965 | private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_codec |
| 5966 | = pb::FieldCodec.ForSFixed64(793); |
| 5967 | private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5968 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5969 | public pbc::RepeatedField<long> UnpackedSfixed64 { |
| 5970 | get { return unpackedSfixed64_; } |
| 5971 | } |
| 5972 | |
| 5973 | /// <summary>Field number for the "unpacked_float" field.</summary> |
| 5974 | public const int UnpackedFloatFieldNumber = 100; |
| 5975 | private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec |
| 5976 | = pb::FieldCodec.ForFloat(805); |
| 5977 | private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::RepeatedField<float>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5978 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5979 | public pbc::RepeatedField<float> UnpackedFloat { |
| 5980 | get { return unpackedFloat_; } |
| 5981 | } |
| 5982 | |
| 5983 | /// <summary>Field number for the "unpacked_double" field.</summary> |
| 5984 | public const int UnpackedDoubleFieldNumber = 101; |
| 5985 | private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_codec |
| 5986 | = pb::FieldCodec.ForDouble(809); |
| 5987 | private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::RepeatedField<double>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5988 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5989 | public pbc::RepeatedField<double> UnpackedDouble { |
| 5990 | get { return unpackedDouble_; } |
| 5991 | } |
| 5992 | |
| 5993 | /// <summary>Field number for the "unpacked_bool" field.</summary> |
| 5994 | public const int UnpackedBoolFieldNumber = 102; |
| 5995 | private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec |
| 5996 | = pb::FieldCodec.ForBool(816); |
| 5997 | private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedField<bool>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5998 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5999 | public pbc::RepeatedField<bool> UnpackedBool { |
| 6000 | get { return unpackedBool_; } |
| 6001 | } |
| 6002 | |
| 6003 | /// <summary>Field number for the "unpacked_enum" field.</summary> |
| 6004 | public const int UnpackedEnumFieldNumber = 103; |
| 6005 | private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_unpackedEnum_codec |
| 6006 | = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x); |
| 6007 | private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6008 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6009 | public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> UnpackedEnum { |
| 6010 | get { return unpackedEnum_; } |
| 6011 | } |
| 6012 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6013 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6014 | public override bool Equals(object other) { |
| 6015 | return Equals(other as TestUnpackedTypes); |
| 6016 | } |
| 6017 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6018 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6019 | public bool Equals(TestUnpackedTypes other) { |
| 6020 | if (ReferenceEquals(other, null)) { |
| 6021 | return false; |
| 6022 | } |
| 6023 | if (ReferenceEquals(other, this)) { |
| 6024 | return true; |
| 6025 | } |
| 6026 | if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false; |
| 6027 | if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false; |
| 6028 | if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false; |
| 6029 | if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false; |
| 6030 | if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false; |
| 6031 | if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false; |
| 6032 | if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false; |
| 6033 | if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false; |
| 6034 | if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false; |
| 6035 | if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false; |
| 6036 | if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false; |
| 6037 | if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false; |
| 6038 | if(!unpackedBool_.Equals(other.unpackedBool_)) return false; |
| 6039 | if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6040 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6041 | } |
| 6042 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6043 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6044 | public override int GetHashCode() { |
| 6045 | int hash = 1; |
| 6046 | hash ^= unpackedInt32_.GetHashCode(); |
| 6047 | hash ^= unpackedInt64_.GetHashCode(); |
| 6048 | hash ^= unpackedUint32_.GetHashCode(); |
| 6049 | hash ^= unpackedUint64_.GetHashCode(); |
| 6050 | hash ^= unpackedSint32_.GetHashCode(); |
| 6051 | hash ^= unpackedSint64_.GetHashCode(); |
| 6052 | hash ^= unpackedFixed32_.GetHashCode(); |
| 6053 | hash ^= unpackedFixed64_.GetHashCode(); |
| 6054 | hash ^= unpackedSfixed32_.GetHashCode(); |
| 6055 | hash ^= unpackedSfixed64_.GetHashCode(); |
| 6056 | hash ^= unpackedFloat_.GetHashCode(); |
| 6057 | hash ^= unpackedDouble_.GetHashCode(); |
| 6058 | hash ^= unpackedBool_.GetHashCode(); |
| 6059 | hash ^= unpackedEnum_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6060 | if (_unknownFields != null) { |
| 6061 | hash ^= _unknownFields.GetHashCode(); |
| 6062 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6063 | return hash; |
| 6064 | } |
| 6065 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6066 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6067 | public override string ToString() { |
| 6068 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6069 | } |
| 6070 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6071 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6072 | public void WriteTo(pb::CodedOutputStream output) { |
| 6073 | unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec); |
| 6074 | unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec); |
| 6075 | unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec); |
| 6076 | unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec); |
| 6077 | unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec); |
| 6078 | unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec); |
| 6079 | unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec); |
| 6080 | unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec); |
| 6081 | unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec); |
| 6082 | unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec); |
| 6083 | unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec); |
| 6084 | unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec); |
| 6085 | unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec); |
| 6086 | unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6087 | if (_unknownFields != null) { |
| 6088 | _unknownFields.WriteTo(output); |
| 6089 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6090 | } |
| 6091 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6092 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6093 | public int CalculateSize() { |
| 6094 | int size = 0; |
| 6095 | size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec); |
| 6096 | size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec); |
| 6097 | size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec); |
| 6098 | size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec); |
| 6099 | size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec); |
| 6100 | size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec); |
| 6101 | size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec); |
| 6102 | size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec); |
| 6103 | size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec); |
| 6104 | size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec); |
| 6105 | size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec); |
| 6106 | size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec); |
| 6107 | size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec); |
| 6108 | size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6109 | if (_unknownFields != null) { |
| 6110 | size += _unknownFields.CalculateSize(); |
| 6111 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6112 | return size; |
| 6113 | } |
| 6114 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6116 | public void MergeFrom(TestUnpackedTypes other) { |
| 6117 | if (other == null) { |
| 6118 | return; |
| 6119 | } |
| 6120 | unpackedInt32_.Add(other.unpackedInt32_); |
| 6121 | unpackedInt64_.Add(other.unpackedInt64_); |
| 6122 | unpackedUint32_.Add(other.unpackedUint32_); |
| 6123 | unpackedUint64_.Add(other.unpackedUint64_); |
| 6124 | unpackedSint32_.Add(other.unpackedSint32_); |
| 6125 | unpackedSint64_.Add(other.unpackedSint64_); |
| 6126 | unpackedFixed32_.Add(other.unpackedFixed32_); |
| 6127 | unpackedFixed64_.Add(other.unpackedFixed64_); |
| 6128 | unpackedSfixed32_.Add(other.unpackedSfixed32_); |
| 6129 | unpackedSfixed64_.Add(other.unpackedSfixed64_); |
| 6130 | unpackedFloat_.Add(other.unpackedFloat_); |
| 6131 | unpackedDouble_.Add(other.unpackedDouble_); |
| 6132 | unpackedBool_.Add(other.unpackedBool_); |
| 6133 | unpackedEnum_.Add(other.unpackedEnum_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6134 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6135 | } |
| 6136 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6137 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6138 | public void MergeFrom(pb::CodedInputStream input) { |
| 6139 | uint tag; |
| 6140 | while ((tag = input.ReadTag()) != 0) { |
| 6141 | switch(tag) { |
| 6142 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6143 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6144 | break; |
| 6145 | case 722: |
| 6146 | case 720: { |
| 6147 | unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec); |
| 6148 | break; |
| 6149 | } |
| 6150 | case 730: |
| 6151 | case 728: { |
| 6152 | unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec); |
| 6153 | break; |
| 6154 | } |
| 6155 | case 738: |
| 6156 | case 736: { |
| 6157 | unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec); |
| 6158 | break; |
| 6159 | } |
| 6160 | case 746: |
| 6161 | case 744: { |
| 6162 | unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec); |
| 6163 | break; |
| 6164 | } |
| 6165 | case 754: |
| 6166 | case 752: { |
| 6167 | unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec); |
| 6168 | break; |
| 6169 | } |
| 6170 | case 762: |
| 6171 | case 760: { |
| 6172 | unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec); |
| 6173 | break; |
| 6174 | } |
| 6175 | case 770: |
| 6176 | case 773: { |
| 6177 | unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec); |
| 6178 | break; |
| 6179 | } |
| 6180 | case 778: |
| 6181 | case 777: { |
| 6182 | unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec); |
| 6183 | break; |
| 6184 | } |
| 6185 | case 786: |
| 6186 | case 789: { |
| 6187 | unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec); |
| 6188 | break; |
| 6189 | } |
| 6190 | case 794: |
| 6191 | case 793: { |
| 6192 | unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec); |
| 6193 | break; |
| 6194 | } |
| 6195 | case 802: |
| 6196 | case 805: { |
| 6197 | unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec); |
| 6198 | break; |
| 6199 | } |
| 6200 | case 810: |
| 6201 | case 809: { |
| 6202 | unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec); |
| 6203 | break; |
| 6204 | } |
| 6205 | case 818: |
| 6206 | case 816: { |
| 6207 | unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec); |
| 6208 | break; |
| 6209 | } |
| 6210 | case 826: |
| 6211 | case 824: { |
| 6212 | unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec); |
| 6213 | break; |
| 6214 | } |
| 6215 | } |
| 6216 | } |
| 6217 | } |
| 6218 | |
| 6219 | } |
| 6220 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6221 | public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage<TestRepeatedScalarDifferentTagSizes> { |
| 6222 | private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSizes> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => new TestRepeatedScalarDifferentTagSizes()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6223 | private pb::UnknownFieldSet _unknownFields; |
| 6224 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6225 | public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser { get { return _parser; } } |
| 6226 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6227 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6228 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6229 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[26]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6230 | } |
| 6231 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6232 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6233 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6234 | get { return Descriptor; } |
| 6235 | } |
| 6236 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6237 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6238 | public TestRepeatedScalarDifferentTagSizes() { |
| 6239 | OnConstruction(); |
| 6240 | } |
| 6241 | |
| 6242 | partial void OnConstruction(); |
| 6243 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6245 | public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() { |
| 6246 | repeatedFixed32_ = other.repeatedFixed32_.Clone(); |
| 6247 | repeatedInt32_ = other.repeatedInt32_.Clone(); |
| 6248 | repeatedFixed64_ = other.repeatedFixed64_.Clone(); |
| 6249 | repeatedInt64_ = other.repeatedInt64_.Clone(); |
| 6250 | repeatedFloat_ = other.repeatedFloat_.Clone(); |
| 6251 | repeatedUint64_ = other.repeatedUint64_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6252 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6253 | } |
| 6254 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6255 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6256 | public TestRepeatedScalarDifferentTagSizes Clone() { |
| 6257 | return new TestRepeatedScalarDifferentTagSizes(this); |
| 6258 | } |
| 6259 | |
| 6260 | /// <summary>Field number for the "repeated_fixed32" field.</summary> |
| 6261 | public const int RepeatedFixed32FieldNumber = 12; |
| 6262 | private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec |
| 6263 | = pb::FieldCodec.ForFixed32(98); |
| 6264 | private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>(); |
| 6265 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6266 | /// Parsing repeated fixed size values used to fail. This message needs to be |
| 6267 | /// used in order to get a tag of the right size; all of the repeated fields |
| 6268 | /// in TestAllTypes didn't trigger the check. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6269 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6270 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6271 | public pbc::RepeatedField<uint> RepeatedFixed32 { |
| 6272 | get { return repeatedFixed32_; } |
| 6273 | } |
| 6274 | |
| 6275 | /// <summary>Field number for the "repeated_int32" field.</summary> |
| 6276 | public const int RepeatedInt32FieldNumber = 13; |
| 6277 | private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec |
| 6278 | = pb::FieldCodec.ForInt32(106); |
| 6279 | private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>(); |
| 6280 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6281 | /// Check for a varint type, just for good measure. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6282 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6283 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6284 | public pbc::RepeatedField<int> RepeatedInt32 { |
| 6285 | get { return repeatedInt32_; } |
| 6286 | } |
| 6287 | |
| 6288 | /// <summary>Field number for the "repeated_fixed64" field.</summary> |
| 6289 | public const int RepeatedFixed64FieldNumber = 2046; |
| 6290 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec |
| 6291 | = pb::FieldCodec.ForFixed64(16370); |
| 6292 | private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>(); |
| 6293 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6294 | /// These have two-byte tags. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6295 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6296 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6297 | public pbc::RepeatedField<ulong> RepeatedFixed64 { |
| 6298 | get { return repeatedFixed64_; } |
| 6299 | } |
| 6300 | |
| 6301 | /// <summary>Field number for the "repeated_int64" field.</summary> |
| 6302 | public const int RepeatedInt64FieldNumber = 2047; |
| 6303 | private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec |
| 6304 | = pb::FieldCodec.ForInt64(16378); |
| 6305 | private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6306 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6307 | public pbc::RepeatedField<long> RepeatedInt64 { |
| 6308 | get { return repeatedInt64_; } |
| 6309 | } |
| 6310 | |
| 6311 | /// <summary>Field number for the "repeated_float" field.</summary> |
| 6312 | public const int RepeatedFloatFieldNumber = 262142; |
| 6313 | private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec |
| 6314 | = pb::FieldCodec.ForFloat(2097138); |
| 6315 | private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>(); |
| 6316 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6317 | /// Three byte tags. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6318 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6319 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6320 | public pbc::RepeatedField<float> RepeatedFloat { |
| 6321 | get { return repeatedFloat_; } |
| 6322 | } |
| 6323 | |
| 6324 | /// <summary>Field number for the "repeated_uint64" field.</summary> |
| 6325 | public const int RepeatedUint64FieldNumber = 262143; |
| 6326 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec |
| 6327 | = pb::FieldCodec.ForUInt64(2097146); |
| 6328 | private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6329 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6330 | public pbc::RepeatedField<ulong> RepeatedUint64 { |
| 6331 | get { return repeatedUint64_; } |
| 6332 | } |
| 6333 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6334 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6335 | public override bool Equals(object other) { |
| 6336 | return Equals(other as TestRepeatedScalarDifferentTagSizes); |
| 6337 | } |
| 6338 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6339 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6340 | public bool Equals(TestRepeatedScalarDifferentTagSizes other) { |
| 6341 | if (ReferenceEquals(other, null)) { |
| 6342 | return false; |
| 6343 | } |
| 6344 | if (ReferenceEquals(other, this)) { |
| 6345 | return true; |
| 6346 | } |
| 6347 | if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false; |
| 6348 | if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; |
| 6349 | if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false; |
| 6350 | if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false; |
| 6351 | if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false; |
| 6352 | if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6353 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6354 | } |
| 6355 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6356 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6357 | public override int GetHashCode() { |
| 6358 | int hash = 1; |
| 6359 | hash ^= repeatedFixed32_.GetHashCode(); |
| 6360 | hash ^= repeatedInt32_.GetHashCode(); |
| 6361 | hash ^= repeatedFixed64_.GetHashCode(); |
| 6362 | hash ^= repeatedInt64_.GetHashCode(); |
| 6363 | hash ^= repeatedFloat_.GetHashCode(); |
| 6364 | hash ^= repeatedUint64_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6365 | if (_unknownFields != null) { |
| 6366 | hash ^= _unknownFields.GetHashCode(); |
| 6367 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6368 | return hash; |
| 6369 | } |
| 6370 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6371 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6372 | public override string ToString() { |
| 6373 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6374 | } |
| 6375 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6376 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6377 | public void WriteTo(pb::CodedOutputStream output) { |
| 6378 | repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec); |
| 6379 | repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); |
| 6380 | repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec); |
| 6381 | repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec); |
| 6382 | repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec); |
| 6383 | repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6384 | if (_unknownFields != null) { |
| 6385 | _unknownFields.WriteTo(output); |
| 6386 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6387 | } |
| 6388 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6389 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6390 | public int CalculateSize() { |
| 6391 | int size = 0; |
| 6392 | size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec); |
| 6393 | size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); |
| 6394 | size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec); |
| 6395 | size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec); |
| 6396 | size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec); |
| 6397 | size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6398 | if (_unknownFields != null) { |
| 6399 | size += _unknownFields.CalculateSize(); |
| 6400 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6401 | return size; |
| 6402 | } |
| 6403 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6404 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6405 | public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) { |
| 6406 | if (other == null) { |
| 6407 | return; |
| 6408 | } |
| 6409 | repeatedFixed32_.Add(other.repeatedFixed32_); |
| 6410 | repeatedInt32_.Add(other.repeatedInt32_); |
| 6411 | repeatedFixed64_.Add(other.repeatedFixed64_); |
| 6412 | repeatedInt64_.Add(other.repeatedInt64_); |
| 6413 | repeatedFloat_.Add(other.repeatedFloat_); |
| 6414 | repeatedUint64_.Add(other.repeatedUint64_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6415 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6416 | } |
| 6417 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6418 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6419 | public void MergeFrom(pb::CodedInputStream input) { |
| 6420 | uint tag; |
| 6421 | while ((tag = input.ReadTag()) != 0) { |
| 6422 | switch(tag) { |
| 6423 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6424 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6425 | break; |
| 6426 | case 98: |
| 6427 | case 101: { |
| 6428 | repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec); |
| 6429 | break; |
| 6430 | } |
| 6431 | case 106: |
| 6432 | case 104: { |
| 6433 | repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); |
| 6434 | break; |
| 6435 | } |
| 6436 | case 16370: |
| 6437 | case 16369: { |
| 6438 | repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec); |
| 6439 | break; |
| 6440 | } |
| 6441 | case 16378: |
| 6442 | case 16376: { |
| 6443 | repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec); |
| 6444 | break; |
| 6445 | } |
| 6446 | case 2097138: |
| 6447 | case 2097141: { |
| 6448 | repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec); |
| 6449 | break; |
| 6450 | } |
| 6451 | case 2097146: |
| 6452 | case 2097144: { |
| 6453 | repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec); |
| 6454 | break; |
| 6455 | } |
| 6456 | } |
| 6457 | } |
| 6458 | } |
| 6459 | |
| 6460 | } |
| 6461 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6462 | public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCommentInjectionMessage> { |
| 6463 | private static readonly pb::MessageParser<TestCommentInjectionMessage> _parser = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInjectionMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6464 | private pb::UnknownFieldSet _unknownFields; |
| 6465 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6466 | public static pb::MessageParser<TestCommentInjectionMessage> Parser { get { return _parser; } } |
| 6467 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6468 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6469 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6470 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[27]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6471 | } |
| 6472 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6473 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6474 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6475 | get { return Descriptor; } |
| 6476 | } |
| 6477 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6478 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6479 | public TestCommentInjectionMessage() { |
| 6480 | OnConstruction(); |
| 6481 | } |
| 6482 | |
| 6483 | partial void OnConstruction(); |
| 6484 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6485 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6486 | public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() { |
| 6487 | a_ = other.a_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6488 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6489 | } |
| 6490 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6491 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6492 | public TestCommentInjectionMessage Clone() { |
| 6493 | return new TestCommentInjectionMessage(this); |
| 6494 | } |
| 6495 | |
| 6496 | /// <summary>Field number for the "a" field.</summary> |
| 6497 | public const int AFieldNumber = 1; |
| 6498 | private string a_ = ""; |
| 6499 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6500 | /// */ <- This should not close the generated doc comment |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6501 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6502 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6503 | public string A { |
| 6504 | get { return a_; } |
| 6505 | set { |
| 6506 | a_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 6507 | } |
| 6508 | } |
| 6509 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6510 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6511 | public override bool Equals(object other) { |
| 6512 | return Equals(other as TestCommentInjectionMessage); |
| 6513 | } |
| 6514 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6515 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6516 | public bool Equals(TestCommentInjectionMessage other) { |
| 6517 | if (ReferenceEquals(other, null)) { |
| 6518 | return false; |
| 6519 | } |
| 6520 | if (ReferenceEquals(other, this)) { |
| 6521 | return true; |
| 6522 | } |
| 6523 | if (A != other.A) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6524 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6525 | } |
| 6526 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6527 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6528 | public override int GetHashCode() { |
| 6529 | int hash = 1; |
| 6530 | if (A.Length != 0) hash ^= A.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6531 | if (_unknownFields != null) { |
| 6532 | hash ^= _unknownFields.GetHashCode(); |
| 6533 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6534 | return hash; |
| 6535 | } |
| 6536 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6537 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6538 | public override string ToString() { |
| 6539 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6540 | } |
| 6541 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6542 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6543 | public void WriteTo(pb::CodedOutputStream output) { |
| 6544 | if (A.Length != 0) { |
| 6545 | output.WriteRawTag(10); |
| 6546 | output.WriteString(A); |
| 6547 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6548 | if (_unknownFields != null) { |
| 6549 | _unknownFields.WriteTo(output); |
| 6550 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6551 | } |
| 6552 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6553 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6554 | public int CalculateSize() { |
| 6555 | int size = 0; |
| 6556 | if (A.Length != 0) { |
| 6557 | size += 1 + pb::CodedOutputStream.ComputeStringSize(A); |
| 6558 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6559 | if (_unknownFields != null) { |
| 6560 | size += _unknownFields.CalculateSize(); |
| 6561 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6562 | return size; |
| 6563 | } |
| 6564 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6565 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6566 | public void MergeFrom(TestCommentInjectionMessage other) { |
| 6567 | if (other == null) { |
| 6568 | return; |
| 6569 | } |
| 6570 | if (other.A.Length != 0) { |
| 6571 | A = other.A; |
| 6572 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6573 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6574 | } |
| 6575 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6576 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6577 | public void MergeFrom(pb::CodedInputStream input) { |
| 6578 | uint tag; |
| 6579 | while ((tag = input.ReadTag()) != 0) { |
| 6580 | switch(tag) { |
| 6581 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6582 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6583 | break; |
| 6584 | case 10: { |
| 6585 | A = input.ReadString(); |
| 6586 | break; |
| 6587 | } |
| 6588 | } |
| 6589 | } |
| 6590 | } |
| 6591 | |
| 6592 | } |
| 6593 | |
| 6594 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6595 | /// Test that RPC services work. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6596 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6597 | public sealed partial class FooRequest : pb::IMessage<FooRequest> { |
| 6598 | private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6599 | private pb::UnknownFieldSet _unknownFields; |
| 6600 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6601 | public static pb::MessageParser<FooRequest> Parser { get { return _parser; } } |
| 6602 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6603 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6604 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6605 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[28]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6606 | } |
| 6607 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6608 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6609 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6610 | get { return Descriptor; } |
| 6611 | } |
| 6612 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6613 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6614 | public FooRequest() { |
| 6615 | OnConstruction(); |
| 6616 | } |
| 6617 | |
| 6618 | partial void OnConstruction(); |
| 6619 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6620 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6621 | public FooRequest(FooRequest other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6622 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6623 | } |
| 6624 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6625 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6626 | public FooRequest Clone() { |
| 6627 | return new FooRequest(this); |
| 6628 | } |
| 6629 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6630 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6631 | public override bool Equals(object other) { |
| 6632 | return Equals(other as FooRequest); |
| 6633 | } |
| 6634 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6635 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6636 | public bool Equals(FooRequest other) { |
| 6637 | if (ReferenceEquals(other, null)) { |
| 6638 | return false; |
| 6639 | } |
| 6640 | if (ReferenceEquals(other, this)) { |
| 6641 | return true; |
| 6642 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6643 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6644 | } |
| 6645 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6646 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6647 | public override int GetHashCode() { |
| 6648 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6649 | if (_unknownFields != null) { |
| 6650 | hash ^= _unknownFields.GetHashCode(); |
| 6651 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6652 | return hash; |
| 6653 | } |
| 6654 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6655 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6656 | public override string ToString() { |
| 6657 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6658 | } |
| 6659 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6660 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6661 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6662 | if (_unknownFields != null) { |
| 6663 | _unknownFields.WriteTo(output); |
| 6664 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6665 | } |
| 6666 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6667 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6668 | public int CalculateSize() { |
| 6669 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6670 | if (_unknownFields != null) { |
| 6671 | size += _unknownFields.CalculateSize(); |
| 6672 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6673 | return size; |
| 6674 | } |
| 6675 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6676 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6677 | public void MergeFrom(FooRequest other) { |
| 6678 | if (other == null) { |
| 6679 | return; |
| 6680 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6681 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6682 | } |
| 6683 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6684 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6685 | public void MergeFrom(pb::CodedInputStream input) { |
| 6686 | uint tag; |
| 6687 | while ((tag = input.ReadTag()) != 0) { |
| 6688 | switch(tag) { |
| 6689 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6690 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6691 | break; |
| 6692 | } |
| 6693 | } |
| 6694 | } |
| 6695 | |
| 6696 | } |
| 6697 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6698 | public sealed partial class FooResponse : pb::IMessage<FooResponse> { |
| 6699 | private static readonly pb::MessageParser<FooResponse> _parser = new pb::MessageParser<FooResponse>(() => new FooResponse()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6700 | private pb::UnknownFieldSet _unknownFields; |
| 6701 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6702 | public static pb::MessageParser<FooResponse> Parser { get { return _parser; } } |
| 6703 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6704 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6705 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6706 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[29]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6707 | } |
| 6708 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6709 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6710 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6711 | get { return Descriptor; } |
| 6712 | } |
| 6713 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6714 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6715 | public FooResponse() { |
| 6716 | OnConstruction(); |
| 6717 | } |
| 6718 | |
| 6719 | partial void OnConstruction(); |
| 6720 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6721 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6722 | public FooResponse(FooResponse other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6723 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6724 | } |
| 6725 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6726 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6727 | public FooResponse Clone() { |
| 6728 | return new FooResponse(this); |
| 6729 | } |
| 6730 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6731 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6732 | public override bool Equals(object other) { |
| 6733 | return Equals(other as FooResponse); |
| 6734 | } |
| 6735 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6736 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6737 | public bool Equals(FooResponse other) { |
| 6738 | if (ReferenceEquals(other, null)) { |
| 6739 | return false; |
| 6740 | } |
| 6741 | if (ReferenceEquals(other, this)) { |
| 6742 | return true; |
| 6743 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6744 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6745 | } |
| 6746 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6747 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6748 | public override int GetHashCode() { |
| 6749 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6750 | if (_unknownFields != null) { |
| 6751 | hash ^= _unknownFields.GetHashCode(); |
| 6752 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6753 | return hash; |
| 6754 | } |
| 6755 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6756 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6757 | public override string ToString() { |
| 6758 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6759 | } |
| 6760 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6761 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6762 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6763 | if (_unknownFields != null) { |
| 6764 | _unknownFields.WriteTo(output); |
| 6765 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6766 | } |
| 6767 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6768 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6769 | public int CalculateSize() { |
| 6770 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6771 | if (_unknownFields != null) { |
| 6772 | size += _unknownFields.CalculateSize(); |
| 6773 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6774 | return size; |
| 6775 | } |
| 6776 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6777 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6778 | public void MergeFrom(FooResponse other) { |
| 6779 | if (other == null) { |
| 6780 | return; |
| 6781 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6782 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6783 | } |
| 6784 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6785 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6786 | public void MergeFrom(pb::CodedInputStream input) { |
| 6787 | uint tag; |
| 6788 | while ((tag = input.ReadTag()) != 0) { |
| 6789 | switch(tag) { |
| 6790 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6791 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6792 | break; |
| 6793 | } |
| 6794 | } |
| 6795 | } |
| 6796 | |
| 6797 | } |
| 6798 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6799 | public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage> { |
| 6800 | private static readonly pb::MessageParser<FooClientMessage> _parser = new pb::MessageParser<FooClientMessage>(() => new FooClientMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6801 | private pb::UnknownFieldSet _unknownFields; |
| 6802 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6803 | public static pb::MessageParser<FooClientMessage> Parser { get { return _parser; } } |
| 6804 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6805 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6806 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6807 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[30]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6808 | } |
| 6809 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6810 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6811 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6812 | get { return Descriptor; } |
| 6813 | } |
| 6814 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6815 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6816 | public FooClientMessage() { |
| 6817 | OnConstruction(); |
| 6818 | } |
| 6819 | |
| 6820 | partial void OnConstruction(); |
| 6821 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6822 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6823 | public FooClientMessage(FooClientMessage other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6824 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6825 | } |
| 6826 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6827 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6828 | public FooClientMessage Clone() { |
| 6829 | return new FooClientMessage(this); |
| 6830 | } |
| 6831 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6832 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6833 | public override bool Equals(object other) { |
| 6834 | return Equals(other as FooClientMessage); |
| 6835 | } |
| 6836 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6837 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6838 | public bool Equals(FooClientMessage other) { |
| 6839 | if (ReferenceEquals(other, null)) { |
| 6840 | return false; |
| 6841 | } |
| 6842 | if (ReferenceEquals(other, this)) { |
| 6843 | return true; |
| 6844 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6845 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6846 | } |
| 6847 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6848 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6849 | public override int GetHashCode() { |
| 6850 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6851 | if (_unknownFields != null) { |
| 6852 | hash ^= _unknownFields.GetHashCode(); |
| 6853 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6854 | return hash; |
| 6855 | } |
| 6856 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6857 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6858 | public override string ToString() { |
| 6859 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6860 | } |
| 6861 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6862 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6863 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6864 | if (_unknownFields != null) { |
| 6865 | _unknownFields.WriteTo(output); |
| 6866 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6867 | } |
| 6868 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6869 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6870 | public int CalculateSize() { |
| 6871 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6872 | if (_unknownFields != null) { |
| 6873 | size += _unknownFields.CalculateSize(); |
| 6874 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6875 | return size; |
| 6876 | } |
| 6877 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6878 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6879 | public void MergeFrom(FooClientMessage other) { |
| 6880 | if (other == null) { |
| 6881 | return; |
| 6882 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6883 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6884 | } |
| 6885 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6886 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6887 | public void MergeFrom(pb::CodedInputStream input) { |
| 6888 | uint tag; |
| 6889 | while ((tag = input.ReadTag()) != 0) { |
| 6890 | switch(tag) { |
| 6891 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6892 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6893 | break; |
| 6894 | } |
| 6895 | } |
| 6896 | } |
| 6897 | |
| 6898 | } |
| 6899 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6900 | public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage> { |
| 6901 | private static readonly pb::MessageParser<FooServerMessage> _parser = new pb::MessageParser<FooServerMessage>(() => new FooServerMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6902 | private pb::UnknownFieldSet _unknownFields; |
| 6903 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6904 | public static pb::MessageParser<FooServerMessage> Parser { get { return _parser; } } |
| 6905 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6906 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6907 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6908 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[31]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6909 | } |
| 6910 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6911 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6912 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6913 | get { return Descriptor; } |
| 6914 | } |
| 6915 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6916 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6917 | public FooServerMessage() { |
| 6918 | OnConstruction(); |
| 6919 | } |
| 6920 | |
| 6921 | partial void OnConstruction(); |
| 6922 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6923 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6924 | public FooServerMessage(FooServerMessage other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6925 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6926 | } |
| 6927 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6928 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6929 | public FooServerMessage Clone() { |
| 6930 | return new FooServerMessage(this); |
| 6931 | } |
| 6932 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6933 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6934 | public override bool Equals(object other) { |
| 6935 | return Equals(other as FooServerMessage); |
| 6936 | } |
| 6937 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6938 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6939 | public bool Equals(FooServerMessage other) { |
| 6940 | if (ReferenceEquals(other, null)) { |
| 6941 | return false; |
| 6942 | } |
| 6943 | if (ReferenceEquals(other, this)) { |
| 6944 | return true; |
| 6945 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6946 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6947 | } |
| 6948 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6949 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6950 | public override int GetHashCode() { |
| 6951 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6952 | if (_unknownFields != null) { |
| 6953 | hash ^= _unknownFields.GetHashCode(); |
| 6954 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6955 | return hash; |
| 6956 | } |
| 6957 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6959 | public override string ToString() { |
| 6960 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6961 | } |
| 6962 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6963 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6964 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6965 | if (_unknownFields != null) { |
| 6966 | _unknownFields.WriteTo(output); |
| 6967 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6968 | } |
| 6969 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6970 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6971 | public int CalculateSize() { |
| 6972 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6973 | if (_unknownFields != null) { |
| 6974 | size += _unknownFields.CalculateSize(); |
| 6975 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6976 | return size; |
| 6977 | } |
| 6978 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6979 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6980 | public void MergeFrom(FooServerMessage other) { |
| 6981 | if (other == null) { |
| 6982 | return; |
| 6983 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6984 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6985 | } |
| 6986 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6987 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6988 | public void MergeFrom(pb::CodedInputStream input) { |
| 6989 | uint tag; |
| 6990 | while ((tag = input.ReadTag()) != 0) { |
| 6991 | switch(tag) { |
| 6992 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6993 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6994 | break; |
| 6995 | } |
| 6996 | } |
| 6997 | } |
| 6998 | |
| 6999 | } |
| 7000 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7001 | public sealed partial class BarRequest : pb::IMessage<BarRequest> { |
| 7002 | private static readonly pb::MessageParser<BarRequest> _parser = new pb::MessageParser<BarRequest>(() => new BarRequest()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7003 | private pb::UnknownFieldSet _unknownFields; |
| 7004 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7005 | public static pb::MessageParser<BarRequest> Parser { get { return _parser; } } |
| 7006 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7007 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7008 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7009 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[32]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7010 | } |
| 7011 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7012 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7013 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 7014 | get { return Descriptor; } |
| 7015 | } |
| 7016 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7017 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7018 | public BarRequest() { |
| 7019 | OnConstruction(); |
| 7020 | } |
| 7021 | |
| 7022 | partial void OnConstruction(); |
| 7023 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7024 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7025 | public BarRequest(BarRequest other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7026 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7027 | } |
| 7028 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7029 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7030 | public BarRequest Clone() { |
| 7031 | return new BarRequest(this); |
| 7032 | } |
| 7033 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7034 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7035 | public override bool Equals(object other) { |
| 7036 | return Equals(other as BarRequest); |
| 7037 | } |
| 7038 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7039 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7040 | public bool Equals(BarRequest other) { |
| 7041 | if (ReferenceEquals(other, null)) { |
| 7042 | return false; |
| 7043 | } |
| 7044 | if (ReferenceEquals(other, this)) { |
| 7045 | return true; |
| 7046 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7047 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7048 | } |
| 7049 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7050 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7051 | public override int GetHashCode() { |
| 7052 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7053 | if (_unknownFields != null) { |
| 7054 | hash ^= _unknownFields.GetHashCode(); |
| 7055 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7056 | return hash; |
| 7057 | } |
| 7058 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7059 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7060 | public override string ToString() { |
| 7061 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 7062 | } |
| 7063 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7064 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7065 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7066 | if (_unknownFields != null) { |
| 7067 | _unknownFields.WriteTo(output); |
| 7068 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7069 | } |
| 7070 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7071 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7072 | public int CalculateSize() { |
| 7073 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7074 | if (_unknownFields != null) { |
| 7075 | size += _unknownFields.CalculateSize(); |
| 7076 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7077 | return size; |
| 7078 | } |
| 7079 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7080 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7081 | public void MergeFrom(BarRequest other) { |
| 7082 | if (other == null) { |
| 7083 | return; |
| 7084 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7085 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7086 | } |
| 7087 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7088 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7089 | public void MergeFrom(pb::CodedInputStream input) { |
| 7090 | uint tag; |
| 7091 | while ((tag = input.ReadTag()) != 0) { |
| 7092 | switch(tag) { |
| 7093 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7094 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7095 | break; |
| 7096 | } |
| 7097 | } |
| 7098 | } |
| 7099 | |
| 7100 | } |
| 7101 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7102 | public sealed partial class BarResponse : pb::IMessage<BarResponse> { |
| 7103 | private static readonly pb::MessageParser<BarResponse> _parser = new pb::MessageParser<BarResponse>(() => new BarResponse()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7104 | private pb::UnknownFieldSet _unknownFields; |
| 7105 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7106 | public static pb::MessageParser<BarResponse> Parser { get { return _parser; } } |
| 7107 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7108 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7109 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7110 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[33]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7111 | } |
| 7112 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7113 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7114 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 7115 | get { return Descriptor; } |
| 7116 | } |
| 7117 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7118 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7119 | public BarResponse() { |
| 7120 | OnConstruction(); |
| 7121 | } |
| 7122 | |
| 7123 | partial void OnConstruction(); |
| 7124 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7125 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7126 | public BarResponse(BarResponse other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7127 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7128 | } |
| 7129 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7131 | public BarResponse Clone() { |
| 7132 | return new BarResponse(this); |
| 7133 | } |
| 7134 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7136 | public override bool Equals(object other) { |
| 7137 | return Equals(other as BarResponse); |
| 7138 | } |
| 7139 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7140 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7141 | public bool Equals(BarResponse other) { |
| 7142 | if (ReferenceEquals(other, null)) { |
| 7143 | return false; |
| 7144 | } |
| 7145 | if (ReferenceEquals(other, this)) { |
| 7146 | return true; |
| 7147 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7148 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7149 | } |
| 7150 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7151 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7152 | public override int GetHashCode() { |
| 7153 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7154 | if (_unknownFields != null) { |
| 7155 | hash ^= _unknownFields.GetHashCode(); |
| 7156 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7157 | return hash; |
| 7158 | } |
| 7159 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7160 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7161 | public override string ToString() { |
| 7162 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 7163 | } |
| 7164 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7165 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7166 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7167 | if (_unknownFields != null) { |
| 7168 | _unknownFields.WriteTo(output); |
| 7169 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7170 | } |
| 7171 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7172 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7173 | public int CalculateSize() { |
| 7174 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7175 | if (_unknownFields != null) { |
| 7176 | size += _unknownFields.CalculateSize(); |
| 7177 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7178 | return size; |
| 7179 | } |
| 7180 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7181 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7182 | public void MergeFrom(BarResponse other) { |
| 7183 | if (other == null) { |
| 7184 | return; |
| 7185 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7186 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7187 | } |
| 7188 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7189 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7190 | public void MergeFrom(pb::CodedInputStream input) { |
| 7191 | uint tag; |
| 7192 | while ((tag = input.ReadTag()) != 0) { |
| 7193 | switch(tag) { |
| 7194 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 7195 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 7196 | break; |
| 7197 | } |
| 7198 | } |
| 7199 | } |
| 7200 | |
| 7201 | } |
| 7202 | |
| 7203 | public sealed partial class TestEmptyMessage : pb::IMessage<TestEmptyMessage> { |
| 7204 | private static readonly pb::MessageParser<TestEmptyMessage> _parser = new pb::MessageParser<TestEmptyMessage>(() => new TestEmptyMessage()); |
| 7205 | private pb::UnknownFieldSet _unknownFields; |
| 7206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7207 | public static pb::MessageParser<TestEmptyMessage> Parser { get { return _parser; } } |
| 7208 | |
| 7209 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7210 | public static pbr::MessageDescriptor Descriptor { |
| 7211 | get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[34]; } |
| 7212 | } |
| 7213 | |
| 7214 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7215 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 7216 | get { return Descriptor; } |
| 7217 | } |
| 7218 | |
| 7219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7220 | public TestEmptyMessage() { |
| 7221 | OnConstruction(); |
| 7222 | } |
| 7223 | |
| 7224 | partial void OnConstruction(); |
| 7225 | |
| 7226 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7227 | public TestEmptyMessage(TestEmptyMessage other) : this() { |
| 7228 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 7229 | } |
| 7230 | |
| 7231 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7232 | public TestEmptyMessage Clone() { |
| 7233 | return new TestEmptyMessage(this); |
| 7234 | } |
| 7235 | |
| 7236 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7237 | public override bool Equals(object other) { |
| 7238 | return Equals(other as TestEmptyMessage); |
| 7239 | } |
| 7240 | |
| 7241 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7242 | public bool Equals(TestEmptyMessage other) { |
| 7243 | if (ReferenceEquals(other, null)) { |
| 7244 | return false; |
| 7245 | } |
| 7246 | if (ReferenceEquals(other, this)) { |
| 7247 | return true; |
| 7248 | } |
| 7249 | return Equals(_unknownFields, other._unknownFields); |
| 7250 | } |
| 7251 | |
| 7252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7253 | public override int GetHashCode() { |
| 7254 | int hash = 1; |
| 7255 | if (_unknownFields != null) { |
| 7256 | hash ^= _unknownFields.GetHashCode(); |
| 7257 | } |
| 7258 | return hash; |
| 7259 | } |
| 7260 | |
| 7261 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7262 | public override string ToString() { |
| 7263 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 7264 | } |
| 7265 | |
| 7266 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7267 | public void WriteTo(pb::CodedOutputStream output) { |
| 7268 | if (_unknownFields != null) { |
| 7269 | _unknownFields.WriteTo(output); |
| 7270 | } |
| 7271 | } |
| 7272 | |
| 7273 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7274 | public int CalculateSize() { |
| 7275 | int size = 0; |
| 7276 | if (_unknownFields != null) { |
| 7277 | size += _unknownFields.CalculateSize(); |
| 7278 | } |
| 7279 | return size; |
| 7280 | } |
| 7281 | |
| 7282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7283 | public void MergeFrom(TestEmptyMessage other) { |
| 7284 | if (other == null) { |
| 7285 | return; |
| 7286 | } |
| 7287 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 7288 | } |
| 7289 | |
| 7290 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 7291 | public void MergeFrom(pb::CodedInputStream input) { |
| 7292 | uint tag; |
| 7293 | while ((tag = input.ReadTag()) != 0) { |
| 7294 | switch(tag) { |
| 7295 | default: |
| 7296 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 7297 | break; |
| 7298 | } |
| 7299 | } |
| 7300 | } |
| 7301 | |
| 7302 | } |
| 7303 | |
| 7304 | #endregion |
| 7305 | |
| 7306 | } |
| 7307 | |
| 7308 | #endregion Designer generated code |