Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/unittest_well_known_types.proto |
| 3 | #pragma warning disable 1591, 0612, 3021 |
| 4 | #region Designer generated code |
| 5 | |
| 6 | using pb = global::Google.Protobuf; |
| 7 | using pbc = global::Google.Protobuf.Collections; |
| 8 | using pbr = global::Google.Protobuf.Reflection; |
| 9 | using scg = global::System.Collections.Generic; |
| 10 | namespace Google.Protobuf.TestProtos { |
| 11 | |
| 12 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 13 | public static partial class UnittestWellKnownTypes { |
| 14 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 15 | #region Descriptor |
| 16 | public static pbr::FileDescriptor Descriptor { |
| 17 | get { return descriptor; } |
| 18 | } |
| 19 | private static pbr::FileDescriptor descriptor; |
| 20 | |
| 21 | static UnittestWellKnownTypes() { |
| 22 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 23 | string.Concat( |
| 24 | "Ci9nb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfd2VsbF9rbm93bl90eXBlcy5w", |
| 25 | "cm90bxIRcHJvdG9idWZfdW5pdHRlc3QaGWdvb2dsZS9wcm90b2J1Zi9hbnku", |
| 26 | "cHJvdG8aGWdvb2dsZS9wcm90b2J1Zi9hcGkucHJvdG8aHmdvb2dsZS9wcm90", |
| 27 | "b2J1Zi9kdXJhdGlvbi5wcm90bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnBy", |
| 28 | "b3RvGiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxokZ29vZ2xl", |
| 29 | "L3Byb3RvYnVmL3NvdXJjZV9jb250ZXh0LnByb3RvGhxnb29nbGUvcHJvdG9i", |
| 30 | "dWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnBy", |
| 31 | "b3RvGhpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxoeZ29vZ2xlL3Byb3Rv", |
| 32 | "YnVmL3dyYXBwZXJzLnByb3RvIpEHChJUZXN0V2VsbEtub3duVHlwZXMSJwoJ", |
| 33 | "YW55X2ZpZWxkGAEgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRInCglhcGlf", |
| 34 | "ZmllbGQYAiABKAsyFC5nb29nbGUucHJvdG9idWYuQXBpEjEKDmR1cmF0aW9u", |
| 35 | "X2ZpZWxkGAMgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEisKC2Vt", |
| 36 | "cHR5X2ZpZWxkGAQgASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5EjQKEGZp", |
| 37 | "ZWxkX21hc2tfZmllbGQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRN", |
| 38 | "YXNrEjwKFHNvdXJjZV9jb250ZXh0X2ZpZWxkGAYgASgLMh4uZ29vZ2xlLnBy", |
| 39 | "b3RvYnVmLlNvdXJjZUNvbnRleHQSLQoMc3RydWN0X2ZpZWxkGAcgASgLMhcu", |
| 40 | "Z29vZ2xlLnByb3RvYnVmLlN0cnVjdBIzCg90aW1lc3RhbXBfZmllbGQYCCAB", |
| 41 | "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEikKCnR5cGVfZmllbGQY", |
| 42 | "CSABKAsyFS5nb29nbGUucHJvdG9idWYuVHlwZRIyCgxkb3VibGVfZmllbGQY", |
| 43 | "CiABKAsyHC5nb29nbGUucHJvdG9idWYuRG91YmxlVmFsdWUSMAoLZmxvYXRf", |
| 44 | "ZmllbGQYCyABKAsyGy5nb29nbGUucHJvdG9idWYuRmxvYXRWYWx1ZRIwCgtp", |
| 45 | "bnQ2NF9maWVsZBgMIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVl", |
| 46 | "EjIKDHVpbnQ2NF9maWVsZBgNIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50", |
| 47 | "NjRWYWx1ZRIwCgtpbnQzMl9maWVsZBgOIAEoCzIbLmdvb2dsZS5wcm90b2J1", |
| 48 | "Zi5JbnQzMlZhbHVlEjIKDHVpbnQzMl9maWVsZBgPIAEoCzIcLmdvb2dsZS5w", |
| 49 | "cm90b2J1Zi5VSW50MzJWYWx1ZRIuCgpib29sX2ZpZWxkGBAgASgLMhouZ29v", |
| 50 | "Z2xlLnByb3RvYnVmLkJvb2xWYWx1ZRIyCgxzdHJpbmdfZmllbGQYESABKAsy", |
| 51 | "HC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUSMAoLYnl0ZXNfZmllbGQY", |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 52 | "EiABKAsyGy5nb29nbGUucHJvdG9idWYuQnl0ZXNWYWx1ZSKVBwoWUmVwZWF0", |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 53 | "ZWRXZWxsS25vd25UeXBlcxInCglhbnlfZmllbGQYASADKAsyFC5nb29nbGUu", |
| 54 | "cHJvdG9idWYuQW55EicKCWFwaV9maWVsZBgCIAMoCzIULmdvb2dsZS5wcm90", |
| 55 | "b2J1Zi5BcGkSMQoOZHVyYXRpb25fZmllbGQYAyADKAsyGS5nb29nbGUucHJv", |
| 56 | "dG9idWYuRHVyYXRpb24SKwoLZW1wdHlfZmllbGQYBCADKAsyFi5nb29nbGUu", |
| 57 | "cHJvdG9idWYuRW1wdHkSNAoQZmllbGRfbWFza19maWVsZBgFIAMoCzIaLmdv", |
| 58 | "b2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sSPAoUc291cmNlX2NvbnRleHRfZmll", |
| 59 | "bGQYBiADKAsyHi5nb29nbGUucHJvdG9idWYuU291cmNlQ29udGV4dBItCgxz", |
| 60 | "dHJ1Y3RfZmllbGQYByADKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0EjMK", |
| 61 | "D3RpbWVzdGFtcF9maWVsZBgIIAMoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1l", |
| 62 | "c3RhbXASKQoKdHlwZV9maWVsZBgJIAMoCzIVLmdvb2dsZS5wcm90b2J1Zi5U", |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 63 | "eXBlEjIKDGRvdWJsZV9maWVsZBgKIAMoCzIcLmdvb2dsZS5wcm90b2J1Zi5E", |
| 64 | "b3VibGVWYWx1ZRIwCgtmbG9hdF9maWVsZBgLIAMoCzIbLmdvb2dsZS5wcm90", |
| 65 | "b2J1Zi5GbG9hdFZhbHVlEjAKC2ludDY0X2ZpZWxkGAwgAygLMhsuZ29vZ2xl", |
| 66 | "LnByb3RvYnVmLkludDY0VmFsdWUSMgoMdWludDY0X2ZpZWxkGA0gAygLMhwu", |
| 67 | "Z29vZ2xlLnByb3RvYnVmLlVJbnQ2NFZhbHVlEjAKC2ludDMyX2ZpZWxkGA4g", |
| 68 | "AygLMhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUSMgoMdWludDMyX2Zp", |
| 69 | "ZWxkGA8gAygLMhwuZ29vZ2xlLnByb3RvYnVmLlVJbnQzMlZhbHVlEi4KCmJv", |
| 70 | "b2xfZmllbGQYECADKAsyGi5nb29nbGUucHJvdG9idWYuQm9vbFZhbHVlEjIK", |
| 71 | "DHN0cmluZ19maWVsZBgRIAMoCzIcLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdW", |
| 72 | "YWx1ZRIwCgtieXRlc19maWVsZBgSIAMoCzIbLmdvb2dsZS5wcm90b2J1Zi5C", |
| 73 | "eXRlc1ZhbHVlIsUHChNPbmVvZldlbGxLbm93blR5cGVzEikKCWFueV9maWVs", |
| 74 | "ZBgBIAEoCzIULmdvb2dsZS5wcm90b2J1Zi5BbnlIABIpCglhcGlfZmllbGQY", |
| 75 | "AiABKAsyFC5nb29nbGUucHJvdG9idWYuQXBpSAASMwoOZHVyYXRpb25fZmll", |
| 76 | "bGQYAyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25IABItCgtlbXB0", |
| 77 | "eV9maWVsZBgEIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAEjYKEGZp", |
| 78 | "ZWxkX21hc2tfZmllbGQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRN", |
| 79 | "YXNrSAASPgoUc291cmNlX2NvbnRleHRfZmllbGQYBiABKAsyHi5nb29nbGUu", |
| 80 | "cHJvdG9idWYuU291cmNlQ29udGV4dEgAEi8KDHN0cnVjdF9maWVsZBgHIAEo", |
| 81 | "CzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIABI1Cg90aW1lc3RhbXBfZmll", |
| 82 | "bGQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSAASKwoKdHlw", |
| 83 | "ZV9maWVsZBgJIAEoCzIVLmdvb2dsZS5wcm90b2J1Zi5UeXBlSAASNAoMZG91", |
| 84 | "YmxlX2ZpZWxkGAogASgLMhwuZ29vZ2xlLnByb3RvYnVmLkRvdWJsZVZhbHVl", |
| 85 | "SAASMgoLZmxvYXRfZmllbGQYCyABKAsyGy5nb29nbGUucHJvdG9idWYuRmxv", |
| 86 | "YXRWYWx1ZUgAEjIKC2ludDY0X2ZpZWxkGAwgASgLMhsuZ29vZ2xlLnByb3Rv", |
| 87 | "YnVmLkludDY0VmFsdWVIABI0Cgx1aW50NjRfZmllbGQYDSABKAsyHC5nb29n", |
| 88 | "bGUucHJvdG9idWYuVUludDY0VmFsdWVIABIyCgtpbnQzMl9maWVsZBgOIAEo", |
| 89 | "CzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlSAASNAoMdWludDMyX2Zp", |
| 90 | "ZWxkGA8gASgLMhwuZ29vZ2xlLnByb3RvYnVmLlVJbnQzMlZhbHVlSAASMAoK", |
| 91 | "Ym9vbF9maWVsZBgQIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5Cb29sVmFsdWVI", |
| 92 | "ABI0CgxzdHJpbmdfZmllbGQYESABKAsyHC5nb29nbGUucHJvdG9idWYuU3Ry", |
| 93 | "aW5nVmFsdWVIABIyCgtieXRlc19maWVsZBgSIAEoCzIbLmdvb2dsZS5wcm90", |
| 94 | "b2J1Zi5CeXRlc1ZhbHVlSABCDQoLb25lb2ZfZmllbGQilhYKEU1hcFdlbGxL", |
| 95 | "bm93blR5cGVzEkUKCWFueV9maWVsZBgBIAMoCzIyLnByb3RvYnVmX3VuaXR0", |
| 96 | "ZXN0Lk1hcFdlbGxLbm93blR5cGVzLkFueUZpZWxkRW50cnkSRQoJYXBpX2Zp", |
| 97 | "ZWxkGAIgAygLMjIucHJvdG9idWZfdW5pdHRlc3QuTWFwV2VsbEtub3duVHlw", |
| 98 | "ZXMuQXBpRmllbGRFbnRyeRJPCg5kdXJhdGlvbl9maWVsZBgDIAMoCzI3LnBy", |
| 99 | "b3RvYnVmX3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5cGVzLkR1cmF0aW9uRmll", |
| 100 | "bGRFbnRyeRJJCgtlbXB0eV9maWVsZBgEIAMoCzI0LnByb3RvYnVmX3VuaXR0", |
| 101 | "ZXN0Lk1hcFdlbGxLbm93blR5cGVzLkVtcHR5RmllbGRFbnRyeRJSChBmaWVs", |
| 102 | "ZF9tYXNrX2ZpZWxkGAUgAygLMjgucHJvdG9idWZfdW5pdHRlc3QuTWFwV2Vs", |
| 103 | "bEtub3duVHlwZXMuRmllbGRNYXNrRmllbGRFbnRyeRJaChRzb3VyY2VfY29u", |
| 104 | "dGV4dF9maWVsZBgGIAMoCzI8LnByb3RvYnVmX3VuaXR0ZXN0Lk1hcFdlbGxL", |
| 105 | "bm93blR5cGVzLlNvdXJjZUNvbnRleHRGaWVsZEVudHJ5EksKDHN0cnVjdF9m", |
| 106 | "aWVsZBgHIAMoCzI1LnByb3RvYnVmX3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5", |
| 107 | "cGVzLlN0cnVjdEZpZWxkRW50cnkSUQoPdGltZXN0YW1wX2ZpZWxkGAggAygL", |
| 108 | "MjgucHJvdG9idWZfdW5pdHRlc3QuTWFwV2VsbEtub3duVHlwZXMuVGltZXN0", |
| 109 | "YW1wRmllbGRFbnRyeRJHCgp0eXBlX2ZpZWxkGAkgAygLMjMucHJvdG9idWZf", |
| 110 | "dW5pdHRlc3QuTWFwV2VsbEtub3duVHlwZXMuVHlwZUZpZWxkRW50cnkSSwoM", |
| 111 | "ZG91YmxlX2ZpZWxkGAogAygLMjUucHJvdG9idWZfdW5pdHRlc3QuTWFwV2Vs", |
| 112 | "bEtub3duVHlwZXMuRG91YmxlRmllbGRFbnRyeRJJCgtmbG9hdF9maWVsZBgL", |
| 113 | "IAMoCzI0LnByb3RvYnVmX3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5cGVzLkZs", |
| 114 | "b2F0RmllbGRFbnRyeRJJCgtpbnQ2NF9maWVsZBgMIAMoCzI0LnByb3RvYnVm", |
| 115 | "X3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5cGVzLkludDY0RmllbGRFbnRyeRJL", |
| 116 | "Cgx1aW50NjRfZmllbGQYDSADKAsyNS5wcm90b2J1Zl91bml0dGVzdC5NYXBX", |
| 117 | "ZWxsS25vd25UeXBlcy5VaW50NjRGaWVsZEVudHJ5EkkKC2ludDMyX2ZpZWxk", |
| 118 | "GA4gAygLMjQucHJvdG9idWZfdW5pdHRlc3QuTWFwV2VsbEtub3duVHlwZXMu", |
| 119 | "SW50MzJGaWVsZEVudHJ5EksKDHVpbnQzMl9maWVsZBgPIAMoCzI1LnByb3Rv", |
| 120 | "YnVmX3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5cGVzLlVpbnQzMkZpZWxkRW50", |
| 121 | "cnkSRwoKYm9vbF9maWVsZBgQIAMoCzIzLnByb3RvYnVmX3VuaXR0ZXN0Lk1h", |
| 122 | "cFdlbGxLbm93blR5cGVzLkJvb2xGaWVsZEVudHJ5EksKDHN0cmluZ19maWVs", |
| 123 | "ZBgRIAMoCzI1LnByb3RvYnVmX3VuaXR0ZXN0Lk1hcFdlbGxLbm93blR5cGVz", |
| 124 | "LlN0cmluZ0ZpZWxkRW50cnkSSQoLYnl0ZXNfZmllbGQYEiADKAsyNC5wcm90", |
| 125 | "b2J1Zl91bml0dGVzdC5NYXBXZWxsS25vd25UeXBlcy5CeXRlc0ZpZWxkRW50", |
| 126 | "cnkaRQoNQW55RmllbGRFbnRyeRILCgNrZXkYASABKAUSIwoFdmFsdWUYAiAB", |
| 127 | "KAsyFC5nb29nbGUucHJvdG9idWYuQW55OgI4ARpFCg1BcGlGaWVsZEVudHJ5", |
| 128 | "EgsKA2tleRgBIAEoBRIjCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5wcm90b2J1", |
| 129 | "Zi5BcGk6AjgBGk8KEkR1cmF0aW9uRmllbGRFbnRyeRILCgNrZXkYASABKAUS", |
| 130 | "KAoFdmFsdWUYAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb246AjgB", |
| 131 | "GkkKD0VtcHR5RmllbGRFbnRyeRILCgNrZXkYASABKAUSJQoFdmFsdWUYAiAB", |
| 132 | "KAsyFi5nb29nbGUucHJvdG9idWYuRW1wdHk6AjgBGlEKE0ZpZWxkTWFza0Zp", |
| 133 | "ZWxkRW50cnkSCwoDa2V5GAEgASgFEikKBXZhbHVlGAIgASgLMhouZ29vZ2xl", |
| 134 | "LnByb3RvYnVmLkZpZWxkTWFzazoCOAEaWQoXU291cmNlQ29udGV4dEZpZWxk", |
| 135 | "RW50cnkSCwoDa2V5GAEgASgFEi0KBXZhbHVlGAIgASgLMh4uZ29vZ2xlLnBy", |
| 136 | "b3RvYnVmLlNvdXJjZUNvbnRleHQ6AjgBGksKEFN0cnVjdEZpZWxkRW50cnkS", |
| 137 | "CwoDa2V5GAEgASgFEiYKBXZhbHVlGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVm", |
| 138 | "LlN0cnVjdDoCOAEaUQoTVGltZXN0YW1wRmllbGRFbnRyeRILCgNrZXkYASAB", |
| 139 | "KAUSKQoFdmFsdWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1w", |
| 140 | "OgI4ARpHCg5UeXBlRmllbGRFbnRyeRILCgNrZXkYASABKAUSJAoFdmFsdWUY", |
| 141 | "AiABKAsyFS5nb29nbGUucHJvdG9idWYuVHlwZToCOAEaUAoQRG91YmxlRmll", |
| 142 | "bGRFbnRyeRILCgNrZXkYASABKAUSKwoFdmFsdWUYAiABKAsyHC5nb29nbGUu", |
| 143 | "cHJvdG9idWYuRG91YmxlVmFsdWU6AjgBGk4KD0Zsb2F0RmllbGRFbnRyeRIL", |
| 144 | "CgNrZXkYASABKAUSKgoFdmFsdWUYAiABKAsyGy5nb29nbGUucHJvdG9idWYu", |
| 145 | "RmxvYXRWYWx1ZToCOAEaTgoPSW50NjRGaWVsZEVudHJ5EgsKA2tleRgBIAEo", |
| 146 | "BRIqCgV2YWx1ZRgCIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVl", |
| 147 | "OgI4ARpQChBVaW50NjRGaWVsZEVudHJ5EgsKA2tleRgBIAEoBRIrCgV2YWx1", |
| 148 | "ZRgCIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50NjRWYWx1ZToCOAEaTgoP", |
| 149 | "SW50MzJGaWVsZEVudHJ5EgsKA2tleRgBIAEoBRIqCgV2YWx1ZRgCIAEoCzIb", |
| 150 | "Lmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlOgI4ARpQChBVaW50MzJGaWVs", |
| 151 | "ZEVudHJ5EgsKA2tleRgBIAEoBRIrCgV2YWx1ZRgCIAEoCzIcLmdvb2dsZS5w", |
| 152 | "cm90b2J1Zi5VSW50MzJWYWx1ZToCOAEaTAoOQm9vbEZpZWxkRW50cnkSCwoD", |
| 153 | "a2V5GAEgASgFEikKBXZhbHVlGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkJv", |
| 154 | "b2xWYWx1ZToCOAEaUAoQU3RyaW5nRmllbGRFbnRyeRILCgNrZXkYASABKAUS", |
| 155 | "KwoFdmFsdWUYAiABKAsyHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWU6", |
| 156 | "AjgBGk4KD0J5dGVzRmllbGRFbnRyeRILCgNrZXkYASABKAUSKgoFdmFsdWUY", |
| 157 | "AiABKAsyGy5nb29nbGUucHJvdG9idWYuQnl0ZXNWYWx1ZToCOAFCOQoYY29t", |
| 158 | "Lmdvb2dsZS5wcm90b2J1Zi50ZXN0UAGqAhpHb29nbGUuUHJvdG9idWYuVGVz", |
Jon Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 159 | "dFByb3Rvc2IGcHJvdG8z")); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 160 | descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 161 | new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Proto.Any.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Duration.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Empty.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.FieldMask.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor, global::Google.Protobuf.WellKnownTypes.Wrappers.Descriptor, }, |
Jon Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 162 | new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { |
| 163 | new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestWellKnownTypes), new[]{ "AnyField", "ApiField", "DurationField", "EmptyField", "FieldMaskField", "SourceContextField", "StructField", "TimestampField", "TypeField", "DoubleField", "FloatField", "Int64Field", "Uint64Field", "Int32Field", "Uint32Field", "BoolField", "StringField", "BytesField" }, null, null, null), |
| 164 | new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.RepeatedWellKnownTypes), new[]{ "AnyField", "ApiField", "DurationField", "EmptyField", "FieldMaskField", "SourceContextField", "StructField", "TimestampField", "TypeField", "DoubleField", "FloatField", "Int64Field", "Uint64Field", "Int32Field", "Uint32Field", "BoolField", "StringField", "BytesField" }, null, null, null), |
| 165 | new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.OneofWellKnownTypes), new[]{ "AnyField", "ApiField", "DurationField", "EmptyField", "FieldMaskField", "SourceContextField", "StructField", "TimestampField", "TypeField", "DoubleField", "FloatField", "Int64Field", "Uint64Field", "Int32Field", "Uint32Field", "BoolField", "StringField", "BytesField" }, new[]{ "OneofField" }, null, null), |
| 166 | new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MapWellKnownTypes), new[]{ "AnyField", "ApiField", "DurationField", "EmptyField", "FieldMaskField", "SourceContextField", "StructField", "TimestampField", "TypeField", "DoubleField", "FloatField", "Int64Field", "Uint64Field", "Int32Field", "Uint32Field", "BoolField", "StringField", "BytesField" }, null, null, new pbr::GeneratedCodeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }) |
| 167 | })); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 168 | } |
| 169 | #endregion |
| 170 | |
| 171 | } |
| 172 | #region Messages |
| 173 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 174 | public sealed partial class TestWellKnownTypes : pb::IMessage<TestWellKnownTypes> { |
| 175 | private static readonly pb::MessageParser<TestWellKnownTypes> _parser = new pb::MessageParser<TestWellKnownTypes>(() => new TestWellKnownTypes()); |
| 176 | public static pb::MessageParser<TestWellKnownTypes> Parser { get { return _parser; } } |
| 177 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 178 | public static pbr::MessageDescriptor Descriptor { |
| 179 | get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypes.Descriptor.MessageTypes[0]; } |
| 180 | } |
| 181 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 182 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 183 | get { return Descriptor; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 184 | } |
| 185 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 186 | public TestWellKnownTypes() { |
| 187 | OnConstruction(); |
| 188 | } |
| 189 | |
| 190 | partial void OnConstruction(); |
| 191 | |
| 192 | public TestWellKnownTypes(TestWellKnownTypes other) : this() { |
| 193 | AnyField = other.anyField_ != null ? other.AnyField.Clone() : null; |
| 194 | ApiField = other.apiField_ != null ? other.ApiField.Clone() : null; |
| 195 | DurationField = other.durationField_ != null ? other.DurationField.Clone() : null; |
| 196 | EmptyField = other.emptyField_ != null ? other.EmptyField.Clone() : null; |
| 197 | FieldMaskField = other.fieldMaskField_ != null ? other.FieldMaskField.Clone() : null; |
| 198 | SourceContextField = other.sourceContextField_ != null ? other.SourceContextField.Clone() : null; |
| 199 | StructField = other.structField_ != null ? other.StructField.Clone() : null; |
| 200 | TimestampField = other.timestampField_ != null ? other.TimestampField.Clone() : null; |
| 201 | TypeField = other.typeField_ != null ? other.TypeField.Clone() : null; |
| 202 | DoubleField = other.DoubleField; |
| 203 | FloatField = other.FloatField; |
| 204 | Int64Field = other.Int64Field; |
| 205 | Uint64Field = other.Uint64Field; |
| 206 | Int32Field = other.Int32Field; |
| 207 | Uint32Field = other.Uint32Field; |
| 208 | BoolField = other.BoolField; |
| 209 | StringField = other.StringField; |
| 210 | BytesField = other.BytesField; |
| 211 | } |
| 212 | |
| 213 | public TestWellKnownTypes Clone() { |
| 214 | return new TestWellKnownTypes(this); |
| 215 | } |
| 216 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 217 | public const int AnyFieldFieldNumber = 1; |
| 218 | private global::Google.Protobuf.WellKnownTypes.Any anyField_; |
| 219 | public global::Google.Protobuf.WellKnownTypes.Any AnyField { |
| 220 | get { return anyField_; } |
| 221 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 222 | anyField_ = value; |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | public const int ApiFieldFieldNumber = 2; |
| 227 | private global::Google.Protobuf.WellKnownTypes.Api apiField_; |
| 228 | public global::Google.Protobuf.WellKnownTypes.Api ApiField { |
| 229 | get { return apiField_; } |
| 230 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 231 | apiField_ = value; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | public const int DurationFieldFieldNumber = 3; |
| 236 | private global::Google.Protobuf.WellKnownTypes.Duration durationField_; |
| 237 | public global::Google.Protobuf.WellKnownTypes.Duration DurationField { |
| 238 | get { return durationField_; } |
| 239 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 240 | durationField_ = value; |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | public const int EmptyFieldFieldNumber = 4; |
| 245 | private global::Google.Protobuf.WellKnownTypes.Empty emptyField_; |
| 246 | public global::Google.Protobuf.WellKnownTypes.Empty EmptyField { |
| 247 | get { return emptyField_; } |
| 248 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 249 | emptyField_ = value; |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | public const int FieldMaskFieldFieldNumber = 5; |
| 254 | private global::Google.Protobuf.WellKnownTypes.FieldMask fieldMaskField_; |
| 255 | public global::Google.Protobuf.WellKnownTypes.FieldMask FieldMaskField { |
| 256 | get { return fieldMaskField_; } |
| 257 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 258 | fieldMaskField_ = value; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | public const int SourceContextFieldFieldNumber = 6; |
| 263 | private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContextField_; |
| 264 | public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContextField { |
| 265 | get { return sourceContextField_; } |
| 266 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 267 | sourceContextField_ = value; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | public const int StructFieldFieldNumber = 7; |
| 272 | private global::Google.Protobuf.WellKnownTypes.Struct structField_; |
| 273 | public global::Google.Protobuf.WellKnownTypes.Struct StructField { |
| 274 | get { return structField_; } |
| 275 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 276 | structField_ = value; |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | public const int TimestampFieldFieldNumber = 8; |
| 281 | private global::Google.Protobuf.WellKnownTypes.Timestamp timestampField_; |
| 282 | public global::Google.Protobuf.WellKnownTypes.Timestamp TimestampField { |
| 283 | get { return timestampField_; } |
| 284 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 285 | timestampField_ = value; |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | public const int TypeFieldFieldNumber = 9; |
| 290 | private global::Google.Protobuf.WellKnownTypes.Type typeField_; |
| 291 | public global::Google.Protobuf.WellKnownTypes.Type TypeField { |
| 292 | get { return typeField_; } |
| 293 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 294 | typeField_ = value; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | public const int DoubleFieldFieldNumber = 10; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 299 | private static readonly pb::FieldCodec<double?> _single_doubleField_codec = pb::FieldCodec.ForStructWrapper<double>(82); |
| 300 | private double? doubleField_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 301 | public double? DoubleField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 302 | get { return doubleField_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 303 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 304 | doubleField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 305 | } |
| 306 | } |
| 307 | |
| 308 | public const int FloatFieldFieldNumber = 11; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 309 | private static readonly pb::FieldCodec<float?> _single_floatField_codec = pb::FieldCodec.ForStructWrapper<float>(90); |
| 310 | private float? floatField_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 311 | public float? FloatField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 312 | get { return floatField_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 313 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 314 | floatField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 315 | } |
| 316 | } |
| 317 | |
| 318 | public const int Int64FieldFieldNumber = 12; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 319 | private static readonly pb::FieldCodec<long?> _single_int64Field_codec = pb::FieldCodec.ForStructWrapper<long>(98); |
| 320 | private long? int64Field_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 321 | public long? Int64Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 322 | get { return int64Field_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 323 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 324 | int64Field_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 325 | } |
| 326 | } |
| 327 | |
| 328 | public const int Uint64FieldFieldNumber = 13; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 329 | private static readonly pb::FieldCodec<ulong?> _single_uint64Field_codec = pb::FieldCodec.ForStructWrapper<ulong>(106); |
| 330 | private ulong? uint64Field_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 331 | public ulong? Uint64Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 332 | get { return uint64Field_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 333 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 334 | uint64Field_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 335 | } |
| 336 | } |
| 337 | |
| 338 | public const int Int32FieldFieldNumber = 14; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 339 | private static readonly pb::FieldCodec<int?> _single_int32Field_codec = pb::FieldCodec.ForStructWrapper<int>(114); |
| 340 | private int? int32Field_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 341 | public int? Int32Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 342 | get { return int32Field_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 343 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 344 | int32Field_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 345 | } |
| 346 | } |
| 347 | |
| 348 | public const int Uint32FieldFieldNumber = 15; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 349 | private static readonly pb::FieldCodec<uint?> _single_uint32Field_codec = pb::FieldCodec.ForStructWrapper<uint>(122); |
| 350 | private uint? uint32Field_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 351 | public uint? Uint32Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 352 | get { return uint32Field_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 353 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 354 | uint32Field_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 355 | } |
| 356 | } |
| 357 | |
| 358 | public const int BoolFieldFieldNumber = 16; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 359 | private static readonly pb::FieldCodec<bool?> _single_boolField_codec = pb::FieldCodec.ForStructWrapper<bool>(130); |
| 360 | private bool? boolField_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 361 | public bool? BoolField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 362 | get { return boolField_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 363 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 364 | boolField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 365 | } |
| 366 | } |
| 367 | |
| 368 | public const int StringFieldFieldNumber = 17; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 369 | private static readonly pb::FieldCodec<string> _single_stringField_codec = pb::FieldCodec.ForClassWrapper<string>(138); |
| 370 | private string stringField_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 371 | public string StringField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 372 | get { return stringField_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 373 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 374 | stringField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 375 | } |
| 376 | } |
| 377 | |
| 378 | public const int BytesFieldFieldNumber = 18; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 379 | private static readonly pb::FieldCodec<pb::ByteString> _single_bytesField_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(146); |
| 380 | private pb::ByteString bytesField_; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 381 | public pb::ByteString BytesField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 382 | get { return bytesField_; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 383 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 384 | bytesField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 385 | } |
| 386 | } |
| 387 | |
| 388 | public override bool Equals(object other) { |
| 389 | return Equals(other as TestWellKnownTypes); |
| 390 | } |
| 391 | |
| 392 | public bool Equals(TestWellKnownTypes other) { |
| 393 | if (ReferenceEquals(other, null)) { |
| 394 | return false; |
| 395 | } |
| 396 | if (ReferenceEquals(other, this)) { |
| 397 | return true; |
| 398 | } |
| 399 | if (!object.Equals(AnyField, other.AnyField)) return false; |
| 400 | if (!object.Equals(ApiField, other.ApiField)) return false; |
| 401 | if (!object.Equals(DurationField, other.DurationField)) return false; |
| 402 | if (!object.Equals(EmptyField, other.EmptyField)) return false; |
| 403 | if (!object.Equals(FieldMaskField, other.FieldMaskField)) return false; |
| 404 | if (!object.Equals(SourceContextField, other.SourceContextField)) return false; |
| 405 | if (!object.Equals(StructField, other.StructField)) return false; |
| 406 | if (!object.Equals(TimestampField, other.TimestampField)) return false; |
| 407 | if (!object.Equals(TypeField, other.TypeField)) return false; |
| 408 | if (DoubleField != other.DoubleField) return false; |
| 409 | if (FloatField != other.FloatField) return false; |
| 410 | if (Int64Field != other.Int64Field) return false; |
| 411 | if (Uint64Field != other.Uint64Field) return false; |
| 412 | if (Int32Field != other.Int32Field) return false; |
| 413 | if (Uint32Field != other.Uint32Field) return false; |
| 414 | if (BoolField != other.BoolField) return false; |
| 415 | if (StringField != other.StringField) return false; |
| 416 | if (BytesField != other.BytesField) return false; |
| 417 | return true; |
| 418 | } |
| 419 | |
| 420 | public override int GetHashCode() { |
| 421 | int hash = 1; |
| 422 | if (anyField_ != null) hash ^= AnyField.GetHashCode(); |
| 423 | if (apiField_ != null) hash ^= ApiField.GetHashCode(); |
| 424 | if (durationField_ != null) hash ^= DurationField.GetHashCode(); |
| 425 | if (emptyField_ != null) hash ^= EmptyField.GetHashCode(); |
| 426 | if (fieldMaskField_ != null) hash ^= FieldMaskField.GetHashCode(); |
| 427 | if (sourceContextField_ != null) hash ^= SourceContextField.GetHashCode(); |
| 428 | if (structField_ != null) hash ^= StructField.GetHashCode(); |
| 429 | if (timestampField_ != null) hash ^= TimestampField.GetHashCode(); |
| 430 | if (typeField_ != null) hash ^= TypeField.GetHashCode(); |
| 431 | if (doubleField_ != null) hash ^= DoubleField.GetHashCode(); |
| 432 | if (floatField_ != null) hash ^= FloatField.GetHashCode(); |
| 433 | if (int64Field_ != null) hash ^= Int64Field.GetHashCode(); |
| 434 | if (uint64Field_ != null) hash ^= Uint64Field.GetHashCode(); |
| 435 | if (int32Field_ != null) hash ^= Int32Field.GetHashCode(); |
| 436 | if (uint32Field_ != null) hash ^= Uint32Field.GetHashCode(); |
| 437 | if (boolField_ != null) hash ^= BoolField.GetHashCode(); |
| 438 | if (stringField_ != null) hash ^= StringField.GetHashCode(); |
| 439 | if (bytesField_ != null) hash ^= BytesField.GetHashCode(); |
| 440 | return hash; |
| 441 | } |
| 442 | |
| 443 | public override string ToString() { |
| 444 | return pb::JsonFormatter.Default.Format(this); |
| 445 | } |
| 446 | |
| 447 | public void WriteTo(pb::CodedOutputStream output) { |
| 448 | if (anyField_ != null) { |
| 449 | output.WriteRawTag(10); |
| 450 | output.WriteMessage(AnyField); |
| 451 | } |
| 452 | if (apiField_ != null) { |
| 453 | output.WriteRawTag(18); |
| 454 | output.WriteMessage(ApiField); |
| 455 | } |
| 456 | if (durationField_ != null) { |
| 457 | output.WriteRawTag(26); |
| 458 | output.WriteMessage(DurationField); |
| 459 | } |
| 460 | if (emptyField_ != null) { |
| 461 | output.WriteRawTag(34); |
| 462 | output.WriteMessage(EmptyField); |
| 463 | } |
| 464 | if (fieldMaskField_ != null) { |
| 465 | output.WriteRawTag(42); |
| 466 | output.WriteMessage(FieldMaskField); |
| 467 | } |
| 468 | if (sourceContextField_ != null) { |
| 469 | output.WriteRawTag(50); |
| 470 | output.WriteMessage(SourceContextField); |
| 471 | } |
| 472 | if (structField_ != null) { |
| 473 | output.WriteRawTag(58); |
| 474 | output.WriteMessage(StructField); |
| 475 | } |
| 476 | if (timestampField_ != null) { |
| 477 | output.WriteRawTag(66); |
| 478 | output.WriteMessage(TimestampField); |
| 479 | } |
| 480 | if (typeField_ != null) { |
| 481 | output.WriteRawTag(74); |
| 482 | output.WriteMessage(TypeField); |
| 483 | } |
| 484 | if (doubleField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 485 | _single_doubleField_codec.WriteTagAndValue(output, DoubleField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 486 | } |
| 487 | if (floatField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 488 | _single_floatField_codec.WriteTagAndValue(output, FloatField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 489 | } |
| 490 | if (int64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 491 | _single_int64Field_codec.WriteTagAndValue(output, Int64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 492 | } |
| 493 | if (uint64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 494 | _single_uint64Field_codec.WriteTagAndValue(output, Uint64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 495 | } |
| 496 | if (int32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 497 | _single_int32Field_codec.WriteTagAndValue(output, Int32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 498 | } |
| 499 | if (uint32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 500 | _single_uint32Field_codec.WriteTagAndValue(output, Uint32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 501 | } |
| 502 | if (boolField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 503 | _single_boolField_codec.WriteTagAndValue(output, BoolField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 504 | } |
| 505 | if (stringField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 506 | _single_stringField_codec.WriteTagAndValue(output, StringField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 507 | } |
| 508 | if (bytesField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 509 | _single_bytesField_codec.WriteTagAndValue(output, BytesField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 510 | } |
| 511 | } |
| 512 | |
| 513 | public int CalculateSize() { |
| 514 | int size = 0; |
| 515 | if (anyField_ != null) { |
| 516 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(AnyField); |
| 517 | } |
| 518 | if (apiField_ != null) { |
| 519 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(ApiField); |
| 520 | } |
| 521 | if (durationField_ != null) { |
| 522 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(DurationField); |
| 523 | } |
| 524 | if (emptyField_ != null) { |
| 525 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(EmptyField); |
| 526 | } |
| 527 | if (fieldMaskField_ != null) { |
| 528 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(FieldMaskField); |
| 529 | } |
| 530 | if (sourceContextField_ != null) { |
| 531 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContextField); |
| 532 | } |
| 533 | if (structField_ != null) { |
| 534 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructField); |
| 535 | } |
| 536 | if (timestampField_ != null) { |
| 537 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimestampField); |
| 538 | } |
| 539 | if (typeField_ != null) { |
| 540 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypeField); |
| 541 | } |
| 542 | if (doubleField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 543 | size += _single_doubleField_codec.CalculateSizeWithTag(DoubleField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 544 | } |
| 545 | if (floatField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 546 | size += _single_floatField_codec.CalculateSizeWithTag(FloatField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 547 | } |
| 548 | if (int64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 549 | size += _single_int64Field_codec.CalculateSizeWithTag(Int64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 550 | } |
| 551 | if (uint64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 552 | size += _single_uint64Field_codec.CalculateSizeWithTag(Uint64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 553 | } |
| 554 | if (int32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 555 | size += _single_int32Field_codec.CalculateSizeWithTag(Int32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 556 | } |
| 557 | if (uint32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 558 | size += _single_uint32Field_codec.CalculateSizeWithTag(Uint32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 559 | } |
| 560 | if (boolField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 561 | size += _single_boolField_codec.CalculateSizeWithTag(BoolField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 562 | } |
| 563 | if (stringField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 564 | size += _single_stringField_codec.CalculateSizeWithTag(StringField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 565 | } |
| 566 | if (bytesField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 567 | size += _single_bytesField_codec.CalculateSizeWithTag(BytesField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 568 | } |
| 569 | return size; |
| 570 | } |
| 571 | |
| 572 | public void MergeFrom(TestWellKnownTypes other) { |
| 573 | if (other == null) { |
| 574 | return; |
| 575 | } |
| 576 | if (other.anyField_ != null) { |
| 577 | if (anyField_ == null) { |
| 578 | anyField_ = new global::Google.Protobuf.WellKnownTypes.Any(); |
| 579 | } |
| 580 | AnyField.MergeFrom(other.AnyField); |
| 581 | } |
| 582 | if (other.apiField_ != null) { |
| 583 | if (apiField_ == null) { |
| 584 | apiField_ = new global::Google.Protobuf.WellKnownTypes.Api(); |
| 585 | } |
| 586 | ApiField.MergeFrom(other.ApiField); |
| 587 | } |
| 588 | if (other.durationField_ != null) { |
| 589 | if (durationField_ == null) { |
| 590 | durationField_ = new global::Google.Protobuf.WellKnownTypes.Duration(); |
| 591 | } |
| 592 | DurationField.MergeFrom(other.DurationField); |
| 593 | } |
| 594 | if (other.emptyField_ != null) { |
| 595 | if (emptyField_ == null) { |
| 596 | emptyField_ = new global::Google.Protobuf.WellKnownTypes.Empty(); |
| 597 | } |
| 598 | EmptyField.MergeFrom(other.EmptyField); |
| 599 | } |
| 600 | if (other.fieldMaskField_ != null) { |
| 601 | if (fieldMaskField_ == null) { |
| 602 | fieldMaskField_ = new global::Google.Protobuf.WellKnownTypes.FieldMask(); |
| 603 | } |
| 604 | FieldMaskField.MergeFrom(other.FieldMaskField); |
| 605 | } |
| 606 | if (other.sourceContextField_ != null) { |
| 607 | if (sourceContextField_ == null) { |
| 608 | sourceContextField_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); |
| 609 | } |
| 610 | SourceContextField.MergeFrom(other.SourceContextField); |
| 611 | } |
| 612 | if (other.structField_ != null) { |
| 613 | if (structField_ == null) { |
| 614 | structField_ = new global::Google.Protobuf.WellKnownTypes.Struct(); |
| 615 | } |
| 616 | StructField.MergeFrom(other.StructField); |
| 617 | } |
| 618 | if (other.timestampField_ != null) { |
| 619 | if (timestampField_ == null) { |
| 620 | timestampField_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); |
| 621 | } |
| 622 | TimestampField.MergeFrom(other.TimestampField); |
| 623 | } |
| 624 | if (other.typeField_ != null) { |
| 625 | if (typeField_ == null) { |
| 626 | typeField_ = new global::Google.Protobuf.WellKnownTypes.Type(); |
| 627 | } |
| 628 | TypeField.MergeFrom(other.TypeField); |
| 629 | } |
| 630 | if (other.doubleField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 631 | if (doubleField_ == null || other.DoubleField != 0D) { |
| 632 | DoubleField = other.DoubleField; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 633 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 634 | } |
| 635 | if (other.floatField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 636 | if (floatField_ == null || other.FloatField != 0F) { |
| 637 | FloatField = other.FloatField; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 638 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 639 | } |
| 640 | if (other.int64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 641 | if (int64Field_ == null || other.Int64Field != 0L) { |
| 642 | Int64Field = other.Int64Field; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 643 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 644 | } |
| 645 | if (other.uint64Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 646 | if (uint64Field_ == null || other.Uint64Field != 0UL) { |
| 647 | Uint64Field = other.Uint64Field; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 648 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 649 | } |
| 650 | if (other.int32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 651 | if (int32Field_ == null || other.Int32Field != 0) { |
| 652 | Int32Field = other.Int32Field; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 653 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 654 | } |
| 655 | if (other.uint32Field_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 656 | if (uint32Field_ == null || other.Uint32Field != 0) { |
| 657 | Uint32Field = other.Uint32Field; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 658 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 659 | } |
| 660 | if (other.boolField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 661 | if (boolField_ == null || other.BoolField != false) { |
| 662 | BoolField = other.BoolField; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 663 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 664 | } |
| 665 | if (other.stringField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 666 | if (stringField_ == null || other.StringField != "") { |
| 667 | StringField = other.StringField; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 668 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 669 | } |
| 670 | if (other.bytesField_ != null) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 671 | if (bytesField_ == null || other.BytesField != pb::ByteString.Empty) { |
| 672 | BytesField = other.BytesField; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 673 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 674 | } |
| 675 | } |
| 676 | |
| 677 | public void MergeFrom(pb::CodedInputStream input) { |
| 678 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 679 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 680 | switch(tag) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 681 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 682 | input.SkipLastField(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 683 | break; |
| 684 | case 10: { |
| 685 | if (anyField_ == null) { |
| 686 | anyField_ = new global::Google.Protobuf.WellKnownTypes.Any(); |
| 687 | } |
| 688 | input.ReadMessage(anyField_); |
| 689 | break; |
| 690 | } |
| 691 | case 18: { |
| 692 | if (apiField_ == null) { |
| 693 | apiField_ = new global::Google.Protobuf.WellKnownTypes.Api(); |
| 694 | } |
| 695 | input.ReadMessage(apiField_); |
| 696 | break; |
| 697 | } |
| 698 | case 26: { |
| 699 | if (durationField_ == null) { |
| 700 | durationField_ = new global::Google.Protobuf.WellKnownTypes.Duration(); |
| 701 | } |
| 702 | input.ReadMessage(durationField_); |
| 703 | break; |
| 704 | } |
| 705 | case 34: { |
| 706 | if (emptyField_ == null) { |
| 707 | emptyField_ = new global::Google.Protobuf.WellKnownTypes.Empty(); |
| 708 | } |
| 709 | input.ReadMessage(emptyField_); |
| 710 | break; |
| 711 | } |
| 712 | case 42: { |
| 713 | if (fieldMaskField_ == null) { |
| 714 | fieldMaskField_ = new global::Google.Protobuf.WellKnownTypes.FieldMask(); |
| 715 | } |
| 716 | input.ReadMessage(fieldMaskField_); |
| 717 | break; |
| 718 | } |
| 719 | case 50: { |
| 720 | if (sourceContextField_ == null) { |
| 721 | sourceContextField_ = new global::Google.Protobuf.WellKnownTypes.SourceContext(); |
| 722 | } |
| 723 | input.ReadMessage(sourceContextField_); |
| 724 | break; |
| 725 | } |
| 726 | case 58: { |
| 727 | if (structField_ == null) { |
| 728 | structField_ = new global::Google.Protobuf.WellKnownTypes.Struct(); |
| 729 | } |
| 730 | input.ReadMessage(structField_); |
| 731 | break; |
| 732 | } |
| 733 | case 66: { |
| 734 | if (timestampField_ == null) { |
| 735 | timestampField_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); |
| 736 | } |
| 737 | input.ReadMessage(timestampField_); |
| 738 | break; |
| 739 | } |
| 740 | case 74: { |
| 741 | if (typeField_ == null) { |
| 742 | typeField_ = new global::Google.Protobuf.WellKnownTypes.Type(); |
| 743 | } |
| 744 | input.ReadMessage(typeField_); |
| 745 | break; |
| 746 | } |
| 747 | case 82: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 748 | double? value = _single_doubleField_codec.Read(input); |
| 749 | if (doubleField_ == null || value != 0D) { |
| 750 | DoubleField = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 751 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 752 | break; |
| 753 | } |
| 754 | case 90: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 755 | float? value = _single_floatField_codec.Read(input); |
| 756 | if (floatField_ == null || value != 0F) { |
| 757 | FloatField = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 758 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 759 | break; |
| 760 | } |
| 761 | case 98: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 762 | long? value = _single_int64Field_codec.Read(input); |
| 763 | if (int64Field_ == null || value != 0L) { |
| 764 | Int64Field = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 765 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 766 | break; |
| 767 | } |
| 768 | case 106: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 769 | ulong? value = _single_uint64Field_codec.Read(input); |
| 770 | if (uint64Field_ == null || value != 0UL) { |
| 771 | Uint64Field = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 772 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 773 | break; |
| 774 | } |
| 775 | case 114: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 776 | int? value = _single_int32Field_codec.Read(input); |
| 777 | if (int32Field_ == null || value != 0) { |
| 778 | Int32Field = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 779 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 780 | break; |
| 781 | } |
| 782 | case 122: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 783 | uint? value = _single_uint32Field_codec.Read(input); |
| 784 | if (uint32Field_ == null || value != 0) { |
| 785 | Uint32Field = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 786 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 787 | break; |
| 788 | } |
| 789 | case 130: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 790 | bool? value = _single_boolField_codec.Read(input); |
| 791 | if (boolField_ == null || value != false) { |
| 792 | BoolField = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 793 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 794 | break; |
| 795 | } |
| 796 | case 138: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 797 | string value = _single_stringField_codec.Read(input); |
| 798 | if (stringField_ == null || value != "") { |
| 799 | StringField = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 800 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 801 | break; |
| 802 | } |
| 803 | case 146: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 804 | pb::ByteString value = _single_bytesField_codec.Read(input); |
| 805 | if (bytesField_ == null || value != pb::ByteString.Empty) { |
| 806 | BytesField = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 807 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 808 | break; |
| 809 | } |
| 810 | } |
| 811 | } |
| 812 | } |
| 813 | |
| 814 | } |
| 815 | |
| 816 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 817 | public sealed partial class RepeatedWellKnownTypes : pb::IMessage<RepeatedWellKnownTypes> { |
| 818 | private static readonly pb::MessageParser<RepeatedWellKnownTypes> _parser = new pb::MessageParser<RepeatedWellKnownTypes>(() => new RepeatedWellKnownTypes()); |
| 819 | public static pb::MessageParser<RepeatedWellKnownTypes> Parser { get { return _parser; } } |
| 820 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 821 | public static pbr::MessageDescriptor Descriptor { |
| 822 | get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypes.Descriptor.MessageTypes[1]; } |
| 823 | } |
| 824 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 825 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 826 | get { return Descriptor; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 827 | } |
| 828 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 829 | public RepeatedWellKnownTypes() { |
| 830 | OnConstruction(); |
| 831 | } |
| 832 | |
| 833 | partial void OnConstruction(); |
| 834 | |
| 835 | public RepeatedWellKnownTypes(RepeatedWellKnownTypes other) : this() { |
| 836 | anyField_ = other.anyField_.Clone(); |
| 837 | apiField_ = other.apiField_.Clone(); |
| 838 | durationField_ = other.durationField_.Clone(); |
| 839 | emptyField_ = other.emptyField_.Clone(); |
| 840 | fieldMaskField_ = other.fieldMaskField_.Clone(); |
| 841 | sourceContextField_ = other.sourceContextField_.Clone(); |
| 842 | structField_ = other.structField_.Clone(); |
| 843 | timestampField_ = other.timestampField_.Clone(); |
| 844 | typeField_ = other.typeField_.Clone(); |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 845 | doubleField_ = other.doubleField_.Clone(); |
| 846 | floatField_ = other.floatField_.Clone(); |
| 847 | int64Field_ = other.int64Field_.Clone(); |
| 848 | uint64Field_ = other.uint64Field_.Clone(); |
| 849 | int32Field_ = other.int32Field_.Clone(); |
| 850 | uint32Field_ = other.uint32Field_.Clone(); |
| 851 | boolField_ = other.boolField_.Clone(); |
| 852 | stringField_ = other.stringField_.Clone(); |
| 853 | bytesField_ = other.bytesField_.Clone(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 854 | } |
| 855 | |
| 856 | public RepeatedWellKnownTypes Clone() { |
| 857 | return new RepeatedWellKnownTypes(this); |
| 858 | } |
| 859 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 860 | public const int AnyFieldFieldNumber = 1; |
| 861 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Any> _repeated_anyField_codec |
| 862 | = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Any.Parser); |
| 863 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> anyField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any>(); |
| 864 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> AnyField { |
| 865 | get { return anyField_; } |
| 866 | } |
| 867 | |
| 868 | public const int ApiFieldFieldNumber = 2; |
| 869 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Api> _repeated_apiField_codec |
| 870 | = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Api.Parser); |
| 871 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api> apiField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api>(); |
| 872 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api> ApiField { |
| 873 | get { return apiField_; } |
| 874 | } |
| 875 | |
| 876 | public const int DurationFieldFieldNumber = 3; |
| 877 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Duration> _repeated_durationField_codec |
| 878 | = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Duration.Parser); |
| 879 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> durationField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration>(); |
| 880 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> DurationField { |
| 881 | get { return durationField_; } |
| 882 | } |
| 883 | |
| 884 | public const int EmptyFieldFieldNumber = 4; |
| 885 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Empty> _repeated_emptyField_codec |
| 886 | = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Empty.Parser); |
| 887 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty> emptyField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty>(); |
| 888 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty> EmptyField { |
| 889 | get { return emptyField_; } |
| 890 | } |
| 891 | |
| 892 | public const int FieldMaskFieldFieldNumber = 5; |
| 893 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.FieldMask> _repeated_fieldMaskField_codec |
| 894 | = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser); |
| 895 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> fieldMaskField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask>(); |
| 896 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> FieldMaskField { |
| 897 | get { return fieldMaskField_; } |
| 898 | } |
| 899 | |
| 900 | public const int SourceContextFieldFieldNumber = 6; |
| 901 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.SourceContext> _repeated_sourceContextField_codec |
| 902 | = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.SourceContext.Parser); |
| 903 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext> sourceContextField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext>(); |
| 904 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext> SourceContextField { |
| 905 | get { return sourceContextField_; } |
| 906 | } |
| 907 | |
| 908 | public const int StructFieldFieldNumber = 7; |
| 909 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Struct> _repeated_structField_codec |
| 910 | = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.WellKnownTypes.Struct.Parser); |
| 911 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> structField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct>(); |
| 912 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> StructField { |
| 913 | get { return structField_; } |
| 914 | } |
| 915 | |
| 916 | public const int TimestampFieldFieldNumber = 8; |
| 917 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Timestamp> _repeated_timestampField_codec |
| 918 | = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser); |
| 919 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> timestampField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp>(); |
| 920 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> TimestampField { |
| 921 | get { return timestampField_; } |
| 922 | } |
| 923 | |
| 924 | public const int TypeFieldFieldNumber = 9; |
| 925 | private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Type> _repeated_typeField_codec |
| 926 | = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Type.Parser); |
| 927 | private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type> typeField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type>(); |
| 928 | public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type> TypeField { |
| 929 | get { return typeField_; } |
| 930 | } |
| 931 | |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 932 | public const int DoubleFieldFieldNumber = 10; |
| 933 | private static readonly pb::FieldCodec<double?> _repeated_doubleField_codec |
| 934 | = pb::FieldCodec.ForStructWrapper<double>(82); |
| 935 | private readonly pbc::RepeatedField<double?> doubleField_ = new pbc::RepeatedField<double?>(); |
| 936 | public pbc::RepeatedField<double?> DoubleField { |
| 937 | get { return doubleField_; } |
| 938 | } |
| 939 | |
| 940 | public const int FloatFieldFieldNumber = 11; |
| 941 | private static readonly pb::FieldCodec<float?> _repeated_floatField_codec |
| 942 | = pb::FieldCodec.ForStructWrapper<float>(90); |
| 943 | private readonly pbc::RepeatedField<float?> floatField_ = new pbc::RepeatedField<float?>(); |
| 944 | public pbc::RepeatedField<float?> FloatField { |
| 945 | get { return floatField_; } |
| 946 | } |
| 947 | |
| 948 | public const int Int64FieldFieldNumber = 12; |
| 949 | private static readonly pb::FieldCodec<long?> _repeated_int64Field_codec |
| 950 | = pb::FieldCodec.ForStructWrapper<long>(98); |
| 951 | private readonly pbc::RepeatedField<long?> int64Field_ = new pbc::RepeatedField<long?>(); |
| 952 | public pbc::RepeatedField<long?> Int64Field { |
| 953 | get { return int64Field_; } |
| 954 | } |
| 955 | |
| 956 | public const int Uint64FieldFieldNumber = 13; |
| 957 | private static readonly pb::FieldCodec<ulong?> _repeated_uint64Field_codec |
| 958 | = pb::FieldCodec.ForStructWrapper<ulong>(106); |
| 959 | private readonly pbc::RepeatedField<ulong?> uint64Field_ = new pbc::RepeatedField<ulong?>(); |
| 960 | public pbc::RepeatedField<ulong?> Uint64Field { |
| 961 | get { return uint64Field_; } |
| 962 | } |
| 963 | |
| 964 | public const int Int32FieldFieldNumber = 14; |
| 965 | private static readonly pb::FieldCodec<int?> _repeated_int32Field_codec |
| 966 | = pb::FieldCodec.ForStructWrapper<int>(114); |
| 967 | private readonly pbc::RepeatedField<int?> int32Field_ = new pbc::RepeatedField<int?>(); |
| 968 | public pbc::RepeatedField<int?> Int32Field { |
| 969 | get { return int32Field_; } |
| 970 | } |
| 971 | |
| 972 | public const int Uint32FieldFieldNumber = 15; |
| 973 | private static readonly pb::FieldCodec<uint?> _repeated_uint32Field_codec |
| 974 | = pb::FieldCodec.ForStructWrapper<uint>(122); |
| 975 | private readonly pbc::RepeatedField<uint?> uint32Field_ = new pbc::RepeatedField<uint?>(); |
| 976 | public pbc::RepeatedField<uint?> Uint32Field { |
| 977 | get { return uint32Field_; } |
| 978 | } |
| 979 | |
| 980 | public const int BoolFieldFieldNumber = 16; |
| 981 | private static readonly pb::FieldCodec<bool?> _repeated_boolField_codec |
| 982 | = pb::FieldCodec.ForStructWrapper<bool>(130); |
| 983 | private readonly pbc::RepeatedField<bool?> boolField_ = new pbc::RepeatedField<bool?>(); |
| 984 | public pbc::RepeatedField<bool?> BoolField { |
| 985 | get { return boolField_; } |
| 986 | } |
| 987 | |
| 988 | public const int StringFieldFieldNumber = 17; |
| 989 | private static readonly pb::FieldCodec<string> _repeated_stringField_codec |
| 990 | = pb::FieldCodec.ForClassWrapper<string>(138); |
| 991 | private readonly pbc::RepeatedField<string> stringField_ = new pbc::RepeatedField<string>(); |
| 992 | public pbc::RepeatedField<string> StringField { |
| 993 | get { return stringField_; } |
| 994 | } |
| 995 | |
| 996 | public const int BytesFieldFieldNumber = 18; |
| 997 | private static readonly pb::FieldCodec<pb::ByteString> _repeated_bytesField_codec |
| 998 | = pb::FieldCodec.ForClassWrapper<pb::ByteString>(146); |
| 999 | private readonly pbc::RepeatedField<pb::ByteString> bytesField_ = new pbc::RepeatedField<pb::ByteString>(); |
| 1000 | public pbc::RepeatedField<pb::ByteString> BytesField { |
| 1001 | get { return bytesField_; } |
| 1002 | } |
| 1003 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1004 | public override bool Equals(object other) { |
| 1005 | return Equals(other as RepeatedWellKnownTypes); |
| 1006 | } |
| 1007 | |
| 1008 | public bool Equals(RepeatedWellKnownTypes other) { |
| 1009 | if (ReferenceEquals(other, null)) { |
| 1010 | return false; |
| 1011 | } |
| 1012 | if (ReferenceEquals(other, this)) { |
| 1013 | return true; |
| 1014 | } |
| 1015 | if(!anyField_.Equals(other.anyField_)) return false; |
| 1016 | if(!apiField_.Equals(other.apiField_)) return false; |
| 1017 | if(!durationField_.Equals(other.durationField_)) return false; |
| 1018 | if(!emptyField_.Equals(other.emptyField_)) return false; |
| 1019 | if(!fieldMaskField_.Equals(other.fieldMaskField_)) return false; |
| 1020 | if(!sourceContextField_.Equals(other.sourceContextField_)) return false; |
| 1021 | if(!structField_.Equals(other.structField_)) return false; |
| 1022 | if(!timestampField_.Equals(other.timestampField_)) return false; |
| 1023 | if(!typeField_.Equals(other.typeField_)) return false; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1024 | if(!doubleField_.Equals(other.doubleField_)) return false; |
| 1025 | if(!floatField_.Equals(other.floatField_)) return false; |
| 1026 | if(!int64Field_.Equals(other.int64Field_)) return false; |
| 1027 | if(!uint64Field_.Equals(other.uint64Field_)) return false; |
| 1028 | if(!int32Field_.Equals(other.int32Field_)) return false; |
| 1029 | if(!uint32Field_.Equals(other.uint32Field_)) return false; |
| 1030 | if(!boolField_.Equals(other.boolField_)) return false; |
| 1031 | if(!stringField_.Equals(other.stringField_)) return false; |
| 1032 | if(!bytesField_.Equals(other.bytesField_)) return false; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1033 | return true; |
| 1034 | } |
| 1035 | |
| 1036 | public override int GetHashCode() { |
| 1037 | int hash = 1; |
| 1038 | hash ^= anyField_.GetHashCode(); |
| 1039 | hash ^= apiField_.GetHashCode(); |
| 1040 | hash ^= durationField_.GetHashCode(); |
| 1041 | hash ^= emptyField_.GetHashCode(); |
| 1042 | hash ^= fieldMaskField_.GetHashCode(); |
| 1043 | hash ^= sourceContextField_.GetHashCode(); |
| 1044 | hash ^= structField_.GetHashCode(); |
| 1045 | hash ^= timestampField_.GetHashCode(); |
| 1046 | hash ^= typeField_.GetHashCode(); |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1047 | hash ^= doubleField_.GetHashCode(); |
| 1048 | hash ^= floatField_.GetHashCode(); |
| 1049 | hash ^= int64Field_.GetHashCode(); |
| 1050 | hash ^= uint64Field_.GetHashCode(); |
| 1051 | hash ^= int32Field_.GetHashCode(); |
| 1052 | hash ^= uint32Field_.GetHashCode(); |
| 1053 | hash ^= boolField_.GetHashCode(); |
| 1054 | hash ^= stringField_.GetHashCode(); |
| 1055 | hash ^= bytesField_.GetHashCode(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1056 | return hash; |
| 1057 | } |
| 1058 | |
| 1059 | public override string ToString() { |
| 1060 | return pb::JsonFormatter.Default.Format(this); |
| 1061 | } |
| 1062 | |
| 1063 | public void WriteTo(pb::CodedOutputStream output) { |
| 1064 | anyField_.WriteTo(output, _repeated_anyField_codec); |
| 1065 | apiField_.WriteTo(output, _repeated_apiField_codec); |
| 1066 | durationField_.WriteTo(output, _repeated_durationField_codec); |
| 1067 | emptyField_.WriteTo(output, _repeated_emptyField_codec); |
| 1068 | fieldMaskField_.WriteTo(output, _repeated_fieldMaskField_codec); |
| 1069 | sourceContextField_.WriteTo(output, _repeated_sourceContextField_codec); |
| 1070 | structField_.WriteTo(output, _repeated_structField_codec); |
| 1071 | timestampField_.WriteTo(output, _repeated_timestampField_codec); |
| 1072 | typeField_.WriteTo(output, _repeated_typeField_codec); |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1073 | doubleField_.WriteTo(output, _repeated_doubleField_codec); |
| 1074 | floatField_.WriteTo(output, _repeated_floatField_codec); |
| 1075 | int64Field_.WriteTo(output, _repeated_int64Field_codec); |
| 1076 | uint64Field_.WriteTo(output, _repeated_uint64Field_codec); |
| 1077 | int32Field_.WriteTo(output, _repeated_int32Field_codec); |
| 1078 | uint32Field_.WriteTo(output, _repeated_uint32Field_codec); |
| 1079 | boolField_.WriteTo(output, _repeated_boolField_codec); |
| 1080 | stringField_.WriteTo(output, _repeated_stringField_codec); |
| 1081 | bytesField_.WriteTo(output, _repeated_bytesField_codec); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1082 | } |
| 1083 | |
| 1084 | public int CalculateSize() { |
| 1085 | int size = 0; |
| 1086 | size += anyField_.CalculateSize(_repeated_anyField_codec); |
| 1087 | size += apiField_.CalculateSize(_repeated_apiField_codec); |
| 1088 | size += durationField_.CalculateSize(_repeated_durationField_codec); |
| 1089 | size += emptyField_.CalculateSize(_repeated_emptyField_codec); |
| 1090 | size += fieldMaskField_.CalculateSize(_repeated_fieldMaskField_codec); |
| 1091 | size += sourceContextField_.CalculateSize(_repeated_sourceContextField_codec); |
| 1092 | size += structField_.CalculateSize(_repeated_structField_codec); |
| 1093 | size += timestampField_.CalculateSize(_repeated_timestampField_codec); |
| 1094 | size += typeField_.CalculateSize(_repeated_typeField_codec); |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1095 | size += doubleField_.CalculateSize(_repeated_doubleField_codec); |
| 1096 | size += floatField_.CalculateSize(_repeated_floatField_codec); |
| 1097 | size += int64Field_.CalculateSize(_repeated_int64Field_codec); |
| 1098 | size += uint64Field_.CalculateSize(_repeated_uint64Field_codec); |
| 1099 | size += int32Field_.CalculateSize(_repeated_int32Field_codec); |
| 1100 | size += uint32Field_.CalculateSize(_repeated_uint32Field_codec); |
| 1101 | size += boolField_.CalculateSize(_repeated_boolField_codec); |
| 1102 | size += stringField_.CalculateSize(_repeated_stringField_codec); |
| 1103 | size += bytesField_.CalculateSize(_repeated_bytesField_codec); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1104 | return size; |
| 1105 | } |
| 1106 | |
| 1107 | public void MergeFrom(RepeatedWellKnownTypes other) { |
| 1108 | if (other == null) { |
| 1109 | return; |
| 1110 | } |
| 1111 | anyField_.Add(other.anyField_); |
| 1112 | apiField_.Add(other.apiField_); |
| 1113 | durationField_.Add(other.durationField_); |
| 1114 | emptyField_.Add(other.emptyField_); |
| 1115 | fieldMaskField_.Add(other.fieldMaskField_); |
| 1116 | sourceContextField_.Add(other.sourceContextField_); |
| 1117 | structField_.Add(other.structField_); |
| 1118 | timestampField_.Add(other.timestampField_); |
| 1119 | typeField_.Add(other.typeField_); |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1120 | doubleField_.Add(other.doubleField_); |
| 1121 | floatField_.Add(other.floatField_); |
| 1122 | int64Field_.Add(other.int64Field_); |
| 1123 | uint64Field_.Add(other.uint64Field_); |
| 1124 | int32Field_.Add(other.int32Field_); |
| 1125 | uint32Field_.Add(other.uint32Field_); |
| 1126 | boolField_.Add(other.boolField_); |
| 1127 | stringField_.Add(other.stringField_); |
| 1128 | bytesField_.Add(other.bytesField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1129 | } |
| 1130 | |
| 1131 | public void MergeFrom(pb::CodedInputStream input) { |
| 1132 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 1133 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1134 | switch(tag) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1135 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 1136 | input.SkipLastField(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1137 | break; |
| 1138 | case 10: { |
| 1139 | anyField_.AddEntriesFrom(input, _repeated_anyField_codec); |
| 1140 | break; |
| 1141 | } |
| 1142 | case 18: { |
| 1143 | apiField_.AddEntriesFrom(input, _repeated_apiField_codec); |
| 1144 | break; |
| 1145 | } |
| 1146 | case 26: { |
| 1147 | durationField_.AddEntriesFrom(input, _repeated_durationField_codec); |
| 1148 | break; |
| 1149 | } |
| 1150 | case 34: { |
| 1151 | emptyField_.AddEntriesFrom(input, _repeated_emptyField_codec); |
| 1152 | break; |
| 1153 | } |
| 1154 | case 42: { |
| 1155 | fieldMaskField_.AddEntriesFrom(input, _repeated_fieldMaskField_codec); |
| 1156 | break; |
| 1157 | } |
| 1158 | case 50: { |
| 1159 | sourceContextField_.AddEntriesFrom(input, _repeated_sourceContextField_codec); |
| 1160 | break; |
| 1161 | } |
| 1162 | case 58: { |
| 1163 | structField_.AddEntriesFrom(input, _repeated_structField_codec); |
| 1164 | break; |
| 1165 | } |
| 1166 | case 66: { |
| 1167 | timestampField_.AddEntriesFrom(input, _repeated_timestampField_codec); |
| 1168 | break; |
| 1169 | } |
| 1170 | case 74: { |
| 1171 | typeField_.AddEntriesFrom(input, _repeated_typeField_codec); |
| 1172 | break; |
| 1173 | } |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1174 | case 82: { |
| 1175 | doubleField_.AddEntriesFrom(input, _repeated_doubleField_codec); |
| 1176 | break; |
| 1177 | } |
| 1178 | case 90: { |
| 1179 | floatField_.AddEntriesFrom(input, _repeated_floatField_codec); |
| 1180 | break; |
| 1181 | } |
| 1182 | case 98: { |
| 1183 | int64Field_.AddEntriesFrom(input, _repeated_int64Field_codec); |
| 1184 | break; |
| 1185 | } |
| 1186 | case 106: { |
| 1187 | uint64Field_.AddEntriesFrom(input, _repeated_uint64Field_codec); |
| 1188 | break; |
| 1189 | } |
| 1190 | case 114: { |
| 1191 | int32Field_.AddEntriesFrom(input, _repeated_int32Field_codec); |
| 1192 | break; |
| 1193 | } |
| 1194 | case 122: { |
| 1195 | uint32Field_.AddEntriesFrom(input, _repeated_uint32Field_codec); |
| 1196 | break; |
| 1197 | } |
| 1198 | case 130: { |
| 1199 | boolField_.AddEntriesFrom(input, _repeated_boolField_codec); |
| 1200 | break; |
| 1201 | } |
| 1202 | case 138: { |
| 1203 | stringField_.AddEntriesFrom(input, _repeated_stringField_codec); |
| 1204 | break; |
| 1205 | } |
| 1206 | case 146: { |
| 1207 | bytesField_.AddEntriesFrom(input, _repeated_bytesField_codec); |
| 1208 | break; |
| 1209 | } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1210 | } |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | } |
| 1215 | |
| 1216 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1217 | public sealed partial class OneofWellKnownTypes : pb::IMessage<OneofWellKnownTypes> { |
| 1218 | private static readonly pb::MessageParser<OneofWellKnownTypes> _parser = new pb::MessageParser<OneofWellKnownTypes>(() => new OneofWellKnownTypes()); |
| 1219 | public static pb::MessageParser<OneofWellKnownTypes> Parser { get { return _parser; } } |
| 1220 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1221 | public static pbr::MessageDescriptor Descriptor { |
| 1222 | get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypes.Descriptor.MessageTypes[2]; } |
| 1223 | } |
| 1224 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 1225 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1226 | get { return Descriptor; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1227 | } |
| 1228 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1229 | public OneofWellKnownTypes() { |
| 1230 | OnConstruction(); |
| 1231 | } |
| 1232 | |
| 1233 | partial void OnConstruction(); |
| 1234 | |
| 1235 | public OneofWellKnownTypes(OneofWellKnownTypes other) : this() { |
| 1236 | switch (other.OneofFieldCase) { |
| 1237 | case OneofFieldOneofCase.AnyField: |
| 1238 | AnyField = other.AnyField.Clone(); |
| 1239 | break; |
| 1240 | case OneofFieldOneofCase.ApiField: |
| 1241 | ApiField = other.ApiField.Clone(); |
| 1242 | break; |
| 1243 | case OneofFieldOneofCase.DurationField: |
| 1244 | DurationField = other.DurationField.Clone(); |
| 1245 | break; |
| 1246 | case OneofFieldOneofCase.EmptyField: |
| 1247 | EmptyField = other.EmptyField.Clone(); |
| 1248 | break; |
| 1249 | case OneofFieldOneofCase.FieldMaskField: |
| 1250 | FieldMaskField = other.FieldMaskField.Clone(); |
| 1251 | break; |
| 1252 | case OneofFieldOneofCase.SourceContextField: |
| 1253 | SourceContextField = other.SourceContextField.Clone(); |
| 1254 | break; |
| 1255 | case OneofFieldOneofCase.StructField: |
| 1256 | StructField = other.StructField.Clone(); |
| 1257 | break; |
| 1258 | case OneofFieldOneofCase.TimestampField: |
| 1259 | TimestampField = other.TimestampField.Clone(); |
| 1260 | break; |
| 1261 | case OneofFieldOneofCase.TypeField: |
| 1262 | TypeField = other.TypeField.Clone(); |
| 1263 | break; |
| 1264 | case OneofFieldOneofCase.DoubleField: |
| 1265 | DoubleField = other.DoubleField; |
| 1266 | break; |
| 1267 | case OneofFieldOneofCase.FloatField: |
| 1268 | FloatField = other.FloatField; |
| 1269 | break; |
| 1270 | case OneofFieldOneofCase.Int64Field: |
| 1271 | Int64Field = other.Int64Field; |
| 1272 | break; |
| 1273 | case OneofFieldOneofCase.Uint64Field: |
| 1274 | Uint64Field = other.Uint64Field; |
| 1275 | break; |
| 1276 | case OneofFieldOneofCase.Int32Field: |
| 1277 | Int32Field = other.Int32Field; |
| 1278 | break; |
| 1279 | case OneofFieldOneofCase.Uint32Field: |
| 1280 | Uint32Field = other.Uint32Field; |
| 1281 | break; |
| 1282 | case OneofFieldOneofCase.BoolField: |
| 1283 | BoolField = other.BoolField; |
| 1284 | break; |
| 1285 | case OneofFieldOneofCase.StringField: |
| 1286 | StringField = other.StringField; |
| 1287 | break; |
| 1288 | case OneofFieldOneofCase.BytesField: |
| 1289 | BytesField = other.BytesField; |
| 1290 | break; |
| 1291 | } |
| 1292 | |
| 1293 | } |
| 1294 | |
| 1295 | public OneofWellKnownTypes Clone() { |
| 1296 | return new OneofWellKnownTypes(this); |
| 1297 | } |
| 1298 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1299 | public const int AnyFieldFieldNumber = 1; |
| 1300 | public global::Google.Protobuf.WellKnownTypes.Any AnyField { |
| 1301 | get { return oneofFieldCase_ == OneofFieldOneofCase.AnyField ? (global::Google.Protobuf.WellKnownTypes.Any) oneofField_ : null; } |
| 1302 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1303 | oneofField_ = value; |
| 1304 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.AnyField; |
| 1305 | } |
| 1306 | } |
| 1307 | |
| 1308 | public const int ApiFieldFieldNumber = 2; |
| 1309 | public global::Google.Protobuf.WellKnownTypes.Api ApiField { |
| 1310 | get { return oneofFieldCase_ == OneofFieldOneofCase.ApiField ? (global::Google.Protobuf.WellKnownTypes.Api) oneofField_ : null; } |
| 1311 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1312 | oneofField_ = value; |
| 1313 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.ApiField; |
| 1314 | } |
| 1315 | } |
| 1316 | |
| 1317 | public const int DurationFieldFieldNumber = 3; |
| 1318 | public global::Google.Protobuf.WellKnownTypes.Duration DurationField { |
| 1319 | get { return oneofFieldCase_ == OneofFieldOneofCase.DurationField ? (global::Google.Protobuf.WellKnownTypes.Duration) oneofField_ : null; } |
| 1320 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1321 | oneofField_ = value; |
| 1322 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.DurationField; |
| 1323 | } |
| 1324 | } |
| 1325 | |
| 1326 | public const int EmptyFieldFieldNumber = 4; |
| 1327 | public global::Google.Protobuf.WellKnownTypes.Empty EmptyField { |
| 1328 | get { return oneofFieldCase_ == OneofFieldOneofCase.EmptyField ? (global::Google.Protobuf.WellKnownTypes.Empty) oneofField_ : null; } |
| 1329 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1330 | oneofField_ = value; |
| 1331 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.EmptyField; |
| 1332 | } |
| 1333 | } |
| 1334 | |
| 1335 | public const int FieldMaskFieldFieldNumber = 5; |
| 1336 | public global::Google.Protobuf.WellKnownTypes.FieldMask FieldMaskField { |
| 1337 | get { return oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField ? (global::Google.Protobuf.WellKnownTypes.FieldMask) oneofField_ : null; } |
| 1338 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1339 | oneofField_ = value; |
| 1340 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.FieldMaskField; |
| 1341 | } |
| 1342 | } |
| 1343 | |
| 1344 | public const int SourceContextFieldFieldNumber = 6; |
| 1345 | public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContextField { |
| 1346 | get { return oneofFieldCase_ == OneofFieldOneofCase.SourceContextField ? (global::Google.Protobuf.WellKnownTypes.SourceContext) oneofField_ : null; } |
| 1347 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1348 | oneofField_ = value; |
| 1349 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.SourceContextField; |
| 1350 | } |
| 1351 | } |
| 1352 | |
| 1353 | public const int StructFieldFieldNumber = 7; |
| 1354 | public global::Google.Protobuf.WellKnownTypes.Struct StructField { |
| 1355 | get { return oneofFieldCase_ == OneofFieldOneofCase.StructField ? (global::Google.Protobuf.WellKnownTypes.Struct) oneofField_ : null; } |
| 1356 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1357 | oneofField_ = value; |
| 1358 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.StructField; |
| 1359 | } |
| 1360 | } |
| 1361 | |
| 1362 | public const int TimestampFieldFieldNumber = 8; |
| 1363 | public global::Google.Protobuf.WellKnownTypes.Timestamp TimestampField { |
| 1364 | get { return oneofFieldCase_ == OneofFieldOneofCase.TimestampField ? (global::Google.Protobuf.WellKnownTypes.Timestamp) oneofField_ : null; } |
| 1365 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1366 | oneofField_ = value; |
| 1367 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.TimestampField; |
| 1368 | } |
| 1369 | } |
| 1370 | |
| 1371 | public const int TypeFieldFieldNumber = 9; |
| 1372 | public global::Google.Protobuf.WellKnownTypes.Type TypeField { |
| 1373 | get { return oneofFieldCase_ == OneofFieldOneofCase.TypeField ? (global::Google.Protobuf.WellKnownTypes.Type) oneofField_ : null; } |
| 1374 | set { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1375 | oneofField_ = value; |
| 1376 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.TypeField; |
| 1377 | } |
| 1378 | } |
| 1379 | |
| 1380 | public const int DoubleFieldFieldNumber = 10; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1381 | private static readonly pb::FieldCodec<double?> _oneof_doubleField_codec = pb::FieldCodec.ForStructWrapper<double>(82); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1382 | public double? DoubleField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1383 | get { return oneofFieldCase_ == OneofFieldOneofCase.DoubleField ? (double?) oneofField_ : (double?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1384 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1385 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1386 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.DoubleField; |
| 1387 | } |
| 1388 | } |
| 1389 | |
| 1390 | public const int FloatFieldFieldNumber = 11; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1391 | private static readonly pb::FieldCodec<float?> _oneof_floatField_codec = pb::FieldCodec.ForStructWrapper<float>(90); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1392 | public float? FloatField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1393 | get { return oneofFieldCase_ == OneofFieldOneofCase.FloatField ? (float?) oneofField_ : (float?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1394 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1395 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1396 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.FloatField; |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | public const int Int64FieldFieldNumber = 12; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1401 | private static readonly pb::FieldCodec<long?> _oneof_int64Field_codec = pb::FieldCodec.ForStructWrapper<long>(98); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1402 | public long? Int64Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1403 | get { return oneofFieldCase_ == OneofFieldOneofCase.Int64Field ? (long?) oneofField_ : (long?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1404 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1405 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1406 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.Int64Field; |
| 1407 | } |
| 1408 | } |
| 1409 | |
| 1410 | public const int Uint64FieldFieldNumber = 13; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1411 | private static readonly pb::FieldCodec<ulong?> _oneof_uint64Field_codec = pb::FieldCodec.ForStructWrapper<ulong>(106); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1412 | public ulong? Uint64Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1413 | get { return oneofFieldCase_ == OneofFieldOneofCase.Uint64Field ? (ulong?) oneofField_ : (ulong?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1414 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1415 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1416 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.Uint64Field; |
| 1417 | } |
| 1418 | } |
| 1419 | |
| 1420 | public const int Int32FieldFieldNumber = 14; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1421 | private static readonly pb::FieldCodec<int?> _oneof_int32Field_codec = pb::FieldCodec.ForStructWrapper<int>(114); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1422 | public int? Int32Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1423 | get { return oneofFieldCase_ == OneofFieldOneofCase.Int32Field ? (int?) oneofField_ : (int?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1424 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1425 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1426 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.Int32Field; |
| 1427 | } |
| 1428 | } |
| 1429 | |
| 1430 | public const int Uint32FieldFieldNumber = 15; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1431 | private static readonly pb::FieldCodec<uint?> _oneof_uint32Field_codec = pb::FieldCodec.ForStructWrapper<uint>(122); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1432 | public uint? Uint32Field { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1433 | get { return oneofFieldCase_ == OneofFieldOneofCase.Uint32Field ? (uint?) oneofField_ : (uint?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1434 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1435 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1436 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.Uint32Field; |
| 1437 | } |
| 1438 | } |
| 1439 | |
| 1440 | public const int BoolFieldFieldNumber = 16; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1441 | private static readonly pb::FieldCodec<bool?> _oneof_boolField_codec = pb::FieldCodec.ForStructWrapper<bool>(130); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1442 | public bool? BoolField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1443 | get { return oneofFieldCase_ == OneofFieldOneofCase.BoolField ? (bool?) oneofField_ : (bool?) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1444 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1445 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1446 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.BoolField; |
| 1447 | } |
| 1448 | } |
| 1449 | |
| 1450 | public const int StringFieldFieldNumber = 17; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1451 | private static readonly pb::FieldCodec<string> _oneof_stringField_codec = pb::FieldCodec.ForClassWrapper<string>(138); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1452 | public string StringField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1453 | get { return oneofFieldCase_ == OneofFieldOneofCase.StringField ? (string) oneofField_ : (string) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1454 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1455 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1456 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.StringField; |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | public const int BytesFieldFieldNumber = 18; |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1461 | private static readonly pb::FieldCodec<pb::ByteString> _oneof_bytesField_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(146); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1462 | public pb::ByteString BytesField { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1463 | get { return oneofFieldCase_ == OneofFieldOneofCase.BytesField ? (pb::ByteString) oneofField_ : (pb::ByteString) null; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1464 | set { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1465 | oneofField_ = value; |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1466 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.BytesField; |
| 1467 | } |
| 1468 | } |
| 1469 | |
| 1470 | private object oneofField_; |
| 1471 | public enum OneofFieldOneofCase { |
| 1472 | None = 0, |
| 1473 | AnyField = 1, |
| 1474 | ApiField = 2, |
| 1475 | DurationField = 3, |
| 1476 | EmptyField = 4, |
| 1477 | FieldMaskField = 5, |
| 1478 | SourceContextField = 6, |
| 1479 | StructField = 7, |
| 1480 | TimestampField = 8, |
| 1481 | TypeField = 9, |
| 1482 | DoubleField = 10, |
| 1483 | FloatField = 11, |
| 1484 | Int64Field = 12, |
| 1485 | Uint64Field = 13, |
| 1486 | Int32Field = 14, |
| 1487 | Uint32Field = 15, |
| 1488 | BoolField = 16, |
| 1489 | StringField = 17, |
| 1490 | BytesField = 18, |
| 1491 | } |
| 1492 | private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None; |
| 1493 | public OneofFieldOneofCase OneofFieldCase { |
| 1494 | get { return oneofFieldCase_; } |
| 1495 | } |
| 1496 | |
| 1497 | public void ClearOneofField() { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1498 | oneofFieldCase_ = OneofFieldOneofCase.None; |
| 1499 | oneofField_ = null; |
| 1500 | } |
| 1501 | |
| 1502 | public override bool Equals(object other) { |
| 1503 | return Equals(other as OneofWellKnownTypes); |
| 1504 | } |
| 1505 | |
| 1506 | public bool Equals(OneofWellKnownTypes other) { |
| 1507 | if (ReferenceEquals(other, null)) { |
| 1508 | return false; |
| 1509 | } |
| 1510 | if (ReferenceEquals(other, this)) { |
| 1511 | return true; |
| 1512 | } |
| 1513 | if (!object.Equals(AnyField, other.AnyField)) return false; |
| 1514 | if (!object.Equals(ApiField, other.ApiField)) return false; |
| 1515 | if (!object.Equals(DurationField, other.DurationField)) return false; |
| 1516 | if (!object.Equals(EmptyField, other.EmptyField)) return false; |
| 1517 | if (!object.Equals(FieldMaskField, other.FieldMaskField)) return false; |
| 1518 | if (!object.Equals(SourceContextField, other.SourceContextField)) return false; |
| 1519 | if (!object.Equals(StructField, other.StructField)) return false; |
| 1520 | if (!object.Equals(TimestampField, other.TimestampField)) return false; |
| 1521 | if (!object.Equals(TypeField, other.TypeField)) return false; |
| 1522 | if (DoubleField != other.DoubleField) return false; |
| 1523 | if (FloatField != other.FloatField) return false; |
| 1524 | if (Int64Field != other.Int64Field) return false; |
| 1525 | if (Uint64Field != other.Uint64Field) return false; |
| 1526 | if (Int32Field != other.Int32Field) return false; |
| 1527 | if (Uint32Field != other.Uint32Field) return false; |
| 1528 | if (BoolField != other.BoolField) return false; |
| 1529 | if (StringField != other.StringField) return false; |
| 1530 | if (BytesField != other.BytesField) return false; |
| 1531 | return true; |
| 1532 | } |
| 1533 | |
| 1534 | public override int GetHashCode() { |
| 1535 | int hash = 1; |
| 1536 | if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) hash ^= AnyField.GetHashCode(); |
| 1537 | if (oneofFieldCase_ == OneofFieldOneofCase.ApiField) hash ^= ApiField.GetHashCode(); |
| 1538 | if (oneofFieldCase_ == OneofFieldOneofCase.DurationField) hash ^= DurationField.GetHashCode(); |
| 1539 | if (oneofFieldCase_ == OneofFieldOneofCase.EmptyField) hash ^= EmptyField.GetHashCode(); |
| 1540 | if (oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField) hash ^= FieldMaskField.GetHashCode(); |
| 1541 | if (oneofFieldCase_ == OneofFieldOneofCase.SourceContextField) hash ^= SourceContextField.GetHashCode(); |
| 1542 | if (oneofFieldCase_ == OneofFieldOneofCase.StructField) hash ^= StructField.GetHashCode(); |
| 1543 | if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) hash ^= TimestampField.GetHashCode(); |
| 1544 | if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) hash ^= TypeField.GetHashCode(); |
| 1545 | if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) hash ^= DoubleField.GetHashCode(); |
| 1546 | if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) hash ^= FloatField.GetHashCode(); |
| 1547 | if (oneofFieldCase_ == OneofFieldOneofCase.Int64Field) hash ^= Int64Field.GetHashCode(); |
| 1548 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint64Field) hash ^= Uint64Field.GetHashCode(); |
| 1549 | if (oneofFieldCase_ == OneofFieldOneofCase.Int32Field) hash ^= Int32Field.GetHashCode(); |
| 1550 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint32Field) hash ^= Uint32Field.GetHashCode(); |
| 1551 | if (oneofFieldCase_ == OneofFieldOneofCase.BoolField) hash ^= BoolField.GetHashCode(); |
| 1552 | if (oneofFieldCase_ == OneofFieldOneofCase.StringField) hash ^= StringField.GetHashCode(); |
| 1553 | if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) hash ^= BytesField.GetHashCode(); |
| 1554 | return hash; |
| 1555 | } |
| 1556 | |
| 1557 | public override string ToString() { |
| 1558 | return pb::JsonFormatter.Default.Format(this); |
| 1559 | } |
| 1560 | |
| 1561 | public void WriteTo(pb::CodedOutputStream output) { |
| 1562 | if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) { |
| 1563 | output.WriteRawTag(10); |
| 1564 | output.WriteMessage(AnyField); |
| 1565 | } |
| 1566 | if (oneofFieldCase_ == OneofFieldOneofCase.ApiField) { |
| 1567 | output.WriteRawTag(18); |
| 1568 | output.WriteMessage(ApiField); |
| 1569 | } |
| 1570 | if (oneofFieldCase_ == OneofFieldOneofCase.DurationField) { |
| 1571 | output.WriteRawTag(26); |
| 1572 | output.WriteMessage(DurationField); |
| 1573 | } |
| 1574 | if (oneofFieldCase_ == OneofFieldOneofCase.EmptyField) { |
| 1575 | output.WriteRawTag(34); |
| 1576 | output.WriteMessage(EmptyField); |
| 1577 | } |
| 1578 | if (oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField) { |
| 1579 | output.WriteRawTag(42); |
| 1580 | output.WriteMessage(FieldMaskField); |
| 1581 | } |
| 1582 | if (oneofFieldCase_ == OneofFieldOneofCase.SourceContextField) { |
| 1583 | output.WriteRawTag(50); |
| 1584 | output.WriteMessage(SourceContextField); |
| 1585 | } |
| 1586 | if (oneofFieldCase_ == OneofFieldOneofCase.StructField) { |
| 1587 | output.WriteRawTag(58); |
| 1588 | output.WriteMessage(StructField); |
| 1589 | } |
| 1590 | if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) { |
| 1591 | output.WriteRawTag(66); |
| 1592 | output.WriteMessage(TimestampField); |
| 1593 | } |
| 1594 | if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) { |
| 1595 | output.WriteRawTag(74); |
| 1596 | output.WriteMessage(TypeField); |
| 1597 | } |
| 1598 | if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1599 | _oneof_doubleField_codec.WriteTagAndValue(output, (double?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1600 | } |
| 1601 | if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1602 | _oneof_floatField_codec.WriteTagAndValue(output, (float?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1603 | } |
| 1604 | if (oneofFieldCase_ == OneofFieldOneofCase.Int64Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1605 | _oneof_int64Field_codec.WriteTagAndValue(output, (long?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1606 | } |
| 1607 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint64Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1608 | _oneof_uint64Field_codec.WriteTagAndValue(output, (ulong?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1609 | } |
| 1610 | if (oneofFieldCase_ == OneofFieldOneofCase.Int32Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1611 | _oneof_int32Field_codec.WriteTagAndValue(output, (int?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1612 | } |
| 1613 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint32Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1614 | _oneof_uint32Field_codec.WriteTagAndValue(output, (uint?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1615 | } |
| 1616 | if (oneofFieldCase_ == OneofFieldOneofCase.BoolField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1617 | _oneof_boolField_codec.WriteTagAndValue(output, (bool?) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1618 | } |
| 1619 | if (oneofFieldCase_ == OneofFieldOneofCase.StringField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1620 | _oneof_stringField_codec.WriteTagAndValue(output, (string) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1621 | } |
| 1622 | if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1623 | _oneof_bytesField_codec.WriteTagAndValue(output, (pb::ByteString) oneofField_); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1624 | } |
| 1625 | } |
| 1626 | |
| 1627 | public int CalculateSize() { |
| 1628 | int size = 0; |
| 1629 | if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) { |
| 1630 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(AnyField); |
| 1631 | } |
| 1632 | if (oneofFieldCase_ == OneofFieldOneofCase.ApiField) { |
| 1633 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(ApiField); |
| 1634 | } |
| 1635 | if (oneofFieldCase_ == OneofFieldOneofCase.DurationField) { |
| 1636 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(DurationField); |
| 1637 | } |
| 1638 | if (oneofFieldCase_ == OneofFieldOneofCase.EmptyField) { |
| 1639 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(EmptyField); |
| 1640 | } |
| 1641 | if (oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField) { |
| 1642 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(FieldMaskField); |
| 1643 | } |
| 1644 | if (oneofFieldCase_ == OneofFieldOneofCase.SourceContextField) { |
| 1645 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContextField); |
| 1646 | } |
| 1647 | if (oneofFieldCase_ == OneofFieldOneofCase.StructField) { |
| 1648 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructField); |
| 1649 | } |
| 1650 | if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) { |
| 1651 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimestampField); |
| 1652 | } |
| 1653 | if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) { |
| 1654 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypeField); |
| 1655 | } |
| 1656 | if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1657 | size += _oneof_doubleField_codec.CalculateSizeWithTag(DoubleField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1658 | } |
| 1659 | if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1660 | size += _oneof_floatField_codec.CalculateSizeWithTag(FloatField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1661 | } |
| 1662 | if (oneofFieldCase_ == OneofFieldOneofCase.Int64Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1663 | size += _oneof_int64Field_codec.CalculateSizeWithTag(Int64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1664 | } |
| 1665 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint64Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1666 | size += _oneof_uint64Field_codec.CalculateSizeWithTag(Uint64Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1667 | } |
| 1668 | if (oneofFieldCase_ == OneofFieldOneofCase.Int32Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1669 | size += _oneof_int32Field_codec.CalculateSizeWithTag(Int32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1670 | } |
| 1671 | if (oneofFieldCase_ == OneofFieldOneofCase.Uint32Field) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1672 | size += _oneof_uint32Field_codec.CalculateSizeWithTag(Uint32Field); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1673 | } |
| 1674 | if (oneofFieldCase_ == OneofFieldOneofCase.BoolField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1675 | size += _oneof_boolField_codec.CalculateSizeWithTag(BoolField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1676 | } |
| 1677 | if (oneofFieldCase_ == OneofFieldOneofCase.StringField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1678 | size += _oneof_stringField_codec.CalculateSizeWithTag(StringField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1679 | } |
| 1680 | if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1681 | size += _oneof_bytesField_codec.CalculateSizeWithTag(BytesField); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1682 | } |
| 1683 | return size; |
| 1684 | } |
| 1685 | |
| 1686 | public void MergeFrom(OneofWellKnownTypes other) { |
| 1687 | if (other == null) { |
| 1688 | return; |
| 1689 | } |
| 1690 | switch (other.OneofFieldCase) { |
| 1691 | case OneofFieldOneofCase.AnyField: |
| 1692 | AnyField = other.AnyField; |
| 1693 | break; |
| 1694 | case OneofFieldOneofCase.ApiField: |
| 1695 | ApiField = other.ApiField; |
| 1696 | break; |
| 1697 | case OneofFieldOneofCase.DurationField: |
| 1698 | DurationField = other.DurationField; |
| 1699 | break; |
| 1700 | case OneofFieldOneofCase.EmptyField: |
| 1701 | EmptyField = other.EmptyField; |
| 1702 | break; |
| 1703 | case OneofFieldOneofCase.FieldMaskField: |
| 1704 | FieldMaskField = other.FieldMaskField; |
| 1705 | break; |
| 1706 | case OneofFieldOneofCase.SourceContextField: |
| 1707 | SourceContextField = other.SourceContextField; |
| 1708 | break; |
| 1709 | case OneofFieldOneofCase.StructField: |
| 1710 | StructField = other.StructField; |
| 1711 | break; |
| 1712 | case OneofFieldOneofCase.TimestampField: |
| 1713 | TimestampField = other.TimestampField; |
| 1714 | break; |
| 1715 | case OneofFieldOneofCase.TypeField: |
| 1716 | TypeField = other.TypeField; |
| 1717 | break; |
| 1718 | case OneofFieldOneofCase.DoubleField: |
| 1719 | DoubleField = other.DoubleField; |
| 1720 | break; |
| 1721 | case OneofFieldOneofCase.FloatField: |
| 1722 | FloatField = other.FloatField; |
| 1723 | break; |
| 1724 | case OneofFieldOneofCase.Int64Field: |
| 1725 | Int64Field = other.Int64Field; |
| 1726 | break; |
| 1727 | case OneofFieldOneofCase.Uint64Field: |
| 1728 | Uint64Field = other.Uint64Field; |
| 1729 | break; |
| 1730 | case OneofFieldOneofCase.Int32Field: |
| 1731 | Int32Field = other.Int32Field; |
| 1732 | break; |
| 1733 | case OneofFieldOneofCase.Uint32Field: |
| 1734 | Uint32Field = other.Uint32Field; |
| 1735 | break; |
| 1736 | case OneofFieldOneofCase.BoolField: |
| 1737 | BoolField = other.BoolField; |
| 1738 | break; |
| 1739 | case OneofFieldOneofCase.StringField: |
| 1740 | StringField = other.StringField; |
| 1741 | break; |
| 1742 | case OneofFieldOneofCase.BytesField: |
| 1743 | BytesField = other.BytesField; |
| 1744 | break; |
| 1745 | } |
| 1746 | |
| 1747 | } |
| 1748 | |
| 1749 | public void MergeFrom(pb::CodedInputStream input) { |
| 1750 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 1751 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1752 | switch(tag) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1753 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 1754 | input.SkipLastField(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1755 | break; |
| 1756 | case 10: { |
| 1757 | global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any(); |
| 1758 | if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) { |
| 1759 | subBuilder.MergeFrom(AnyField); |
| 1760 | } |
| 1761 | input.ReadMessage(subBuilder); |
| 1762 | AnyField = subBuilder; |
| 1763 | break; |
| 1764 | } |
| 1765 | case 18: { |
| 1766 | global::Google.Protobuf.WellKnownTypes.Api subBuilder = new global::Google.Protobuf.WellKnownTypes.Api(); |
| 1767 | if (oneofFieldCase_ == OneofFieldOneofCase.ApiField) { |
| 1768 | subBuilder.MergeFrom(ApiField); |
| 1769 | } |
| 1770 | input.ReadMessage(subBuilder); |
| 1771 | ApiField = subBuilder; |
| 1772 | break; |
| 1773 | } |
| 1774 | case 26: { |
| 1775 | global::Google.Protobuf.WellKnownTypes.Duration subBuilder = new global::Google.Protobuf.WellKnownTypes.Duration(); |
| 1776 | if (oneofFieldCase_ == OneofFieldOneofCase.DurationField) { |
| 1777 | subBuilder.MergeFrom(DurationField); |
| 1778 | } |
| 1779 | input.ReadMessage(subBuilder); |
| 1780 | DurationField = subBuilder; |
| 1781 | break; |
| 1782 | } |
| 1783 | case 34: { |
| 1784 | global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); |
| 1785 | if (oneofFieldCase_ == OneofFieldOneofCase.EmptyField) { |
| 1786 | subBuilder.MergeFrom(EmptyField); |
| 1787 | } |
| 1788 | input.ReadMessage(subBuilder); |
| 1789 | EmptyField = subBuilder; |
| 1790 | break; |
| 1791 | } |
| 1792 | case 42: { |
| 1793 | global::Google.Protobuf.WellKnownTypes.FieldMask subBuilder = new global::Google.Protobuf.WellKnownTypes.FieldMask(); |
| 1794 | if (oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField) { |
| 1795 | subBuilder.MergeFrom(FieldMaskField); |
| 1796 | } |
| 1797 | input.ReadMessage(subBuilder); |
| 1798 | FieldMaskField = subBuilder; |
| 1799 | break; |
| 1800 | } |
| 1801 | case 50: { |
| 1802 | global::Google.Protobuf.WellKnownTypes.SourceContext subBuilder = new global::Google.Protobuf.WellKnownTypes.SourceContext(); |
| 1803 | if (oneofFieldCase_ == OneofFieldOneofCase.SourceContextField) { |
| 1804 | subBuilder.MergeFrom(SourceContextField); |
| 1805 | } |
| 1806 | input.ReadMessage(subBuilder); |
| 1807 | SourceContextField = subBuilder; |
| 1808 | break; |
| 1809 | } |
| 1810 | case 58: { |
| 1811 | global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct(); |
| 1812 | if (oneofFieldCase_ == OneofFieldOneofCase.StructField) { |
| 1813 | subBuilder.MergeFrom(StructField); |
| 1814 | } |
| 1815 | input.ReadMessage(subBuilder); |
| 1816 | StructField = subBuilder; |
| 1817 | break; |
| 1818 | } |
| 1819 | case 66: { |
| 1820 | global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp(); |
| 1821 | if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) { |
| 1822 | subBuilder.MergeFrom(TimestampField); |
| 1823 | } |
| 1824 | input.ReadMessage(subBuilder); |
| 1825 | TimestampField = subBuilder; |
| 1826 | break; |
| 1827 | } |
| 1828 | case 74: { |
| 1829 | global::Google.Protobuf.WellKnownTypes.Type subBuilder = new global::Google.Protobuf.WellKnownTypes.Type(); |
| 1830 | if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) { |
| 1831 | subBuilder.MergeFrom(TypeField); |
| 1832 | } |
| 1833 | input.ReadMessage(subBuilder); |
| 1834 | TypeField = subBuilder; |
| 1835 | break; |
| 1836 | } |
| 1837 | case 82: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1838 | DoubleField = _oneof_doubleField_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1839 | break; |
| 1840 | } |
| 1841 | case 90: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1842 | FloatField = _oneof_floatField_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1843 | break; |
| 1844 | } |
| 1845 | case 98: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1846 | Int64Field = _oneof_int64Field_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1847 | break; |
| 1848 | } |
| 1849 | case 106: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1850 | Uint64Field = _oneof_uint64Field_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1851 | break; |
| 1852 | } |
| 1853 | case 114: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1854 | Int32Field = _oneof_int32Field_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1855 | break; |
| 1856 | } |
| 1857 | case 122: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1858 | Uint32Field = _oneof_uint32Field_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1859 | break; |
| 1860 | } |
| 1861 | case 130: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1862 | BoolField = _oneof_boolField_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1863 | break; |
| 1864 | } |
| 1865 | case 138: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1866 | StringField = _oneof_stringField_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1867 | break; |
| 1868 | } |
| 1869 | case 146: { |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1870 | BytesField = _oneof_bytesField_codec.Read(input); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1871 | break; |
| 1872 | } |
| 1873 | } |
| 1874 | } |
| 1875 | } |
| 1876 | |
| 1877 | } |
| 1878 | |
| 1879 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1880 | public sealed partial class MapWellKnownTypes : pb::IMessage<MapWellKnownTypes> { |
| 1881 | private static readonly pb::MessageParser<MapWellKnownTypes> _parser = new pb::MessageParser<MapWellKnownTypes>(() => new MapWellKnownTypes()); |
| 1882 | public static pb::MessageParser<MapWellKnownTypes> Parser { get { return _parser; } } |
| 1883 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1884 | public static pbr::MessageDescriptor Descriptor { |
| 1885 | get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypes.Descriptor.MessageTypes[3]; } |
| 1886 | } |
| 1887 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 1888 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1889 | get { return Descriptor; } |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1890 | } |
| 1891 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1892 | public MapWellKnownTypes() { |
| 1893 | OnConstruction(); |
| 1894 | } |
| 1895 | |
| 1896 | partial void OnConstruction(); |
| 1897 | |
| 1898 | public MapWellKnownTypes(MapWellKnownTypes other) : this() { |
| 1899 | anyField_ = other.anyField_.Clone(); |
| 1900 | apiField_ = other.apiField_.Clone(); |
| 1901 | durationField_ = other.durationField_.Clone(); |
| 1902 | emptyField_ = other.emptyField_.Clone(); |
| 1903 | fieldMaskField_ = other.fieldMaskField_.Clone(); |
| 1904 | sourceContextField_ = other.sourceContextField_.Clone(); |
| 1905 | structField_ = other.structField_.Clone(); |
| 1906 | timestampField_ = other.timestampField_.Clone(); |
| 1907 | typeField_ = other.typeField_.Clone(); |
| 1908 | doubleField_ = other.doubleField_.Clone(); |
| 1909 | floatField_ = other.floatField_.Clone(); |
| 1910 | int64Field_ = other.int64Field_.Clone(); |
| 1911 | uint64Field_ = other.uint64Field_.Clone(); |
| 1912 | int32Field_ = other.int32Field_.Clone(); |
| 1913 | uint32Field_ = other.uint32Field_.Clone(); |
| 1914 | boolField_ = other.boolField_.Clone(); |
| 1915 | stringField_ = other.stringField_.Clone(); |
| 1916 | bytesField_ = other.bytesField_.Clone(); |
| 1917 | } |
| 1918 | |
| 1919 | public MapWellKnownTypes Clone() { |
| 1920 | return new MapWellKnownTypes(this); |
| 1921 | } |
| 1922 | |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1923 | public const int AnyFieldFieldNumber = 1; |
| 1924 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>.Codec _map_anyField_codec |
| 1925 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Any.Parser), 10); |
| 1926 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any> anyField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>(); |
| 1927 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any> AnyField { |
| 1928 | get { return anyField_; } |
| 1929 | } |
| 1930 | |
| 1931 | public const int ApiFieldFieldNumber = 2; |
| 1932 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>.Codec _map_apiField_codec |
| 1933 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Api.Parser), 18); |
| 1934 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api> apiField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>(); |
| 1935 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api> ApiField { |
| 1936 | get { return apiField_; } |
| 1937 | } |
| 1938 | |
| 1939 | public const int DurationFieldFieldNumber = 3; |
| 1940 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>.Codec _map_durationField_codec |
| 1941 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Duration.Parser), 26); |
| 1942 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration> durationField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>(); |
| 1943 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration> DurationField { |
| 1944 | get { return durationField_; } |
| 1945 | } |
| 1946 | |
| 1947 | public const int EmptyFieldFieldNumber = 4; |
| 1948 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>.Codec _map_emptyField_codec |
| 1949 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Empty.Parser), 34); |
| 1950 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty> emptyField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>(); |
| 1951 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty> EmptyField { |
| 1952 | get { return emptyField_; } |
| 1953 | } |
| 1954 | |
| 1955 | public const int FieldMaskFieldFieldNumber = 5; |
| 1956 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>.Codec _map_fieldMaskField_codec |
| 1957 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser), 42); |
| 1958 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask> fieldMaskField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>(); |
| 1959 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask> FieldMaskField { |
| 1960 | get { return fieldMaskField_; } |
| 1961 | } |
| 1962 | |
| 1963 | public const int SourceContextFieldFieldNumber = 6; |
| 1964 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>.Codec _map_sourceContextField_codec |
| 1965 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.SourceContext.Parser), 50); |
| 1966 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext> sourceContextField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>(); |
| 1967 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext> SourceContextField { |
| 1968 | get { return sourceContextField_; } |
| 1969 | } |
| 1970 | |
| 1971 | public const int StructFieldFieldNumber = 7; |
| 1972 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>.Codec _map_structField_codec |
| 1973 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Struct.Parser), 58); |
| 1974 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct> structField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>(); |
| 1975 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct> StructField { |
| 1976 | get { return structField_; } |
| 1977 | } |
| 1978 | |
| 1979 | public const int TimestampFieldFieldNumber = 8; |
| 1980 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>.Codec _map_timestampField_codec |
| 1981 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser), 66); |
| 1982 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp> timestampField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>(); |
| 1983 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp> TimestampField { |
| 1984 | get { return timestampField_; } |
| 1985 | } |
| 1986 | |
| 1987 | public const int TypeFieldFieldNumber = 9; |
| 1988 | private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>.Codec _map_typeField_codec |
| 1989 | = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Type.Parser), 74); |
| 1990 | private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type> typeField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>(); |
| 1991 | public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type> TypeField { |
| 1992 | get { return typeField_; } |
| 1993 | } |
| 1994 | |
| 1995 | public const int DoubleFieldFieldNumber = 10; |
| 1996 | private static readonly pbc::MapField<int, double?>.Codec _map_doubleField_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 1997 | = new pbc::MapField<int, double?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<double>(18), 82); |
| 1998 | private readonly pbc::MapField<int, double?> doubleField_ = new pbc::MapField<int, double?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 1999 | public pbc::MapField<int, double?> DoubleField { |
| 2000 | get { return doubleField_; } |
| 2001 | } |
| 2002 | |
| 2003 | public const int FloatFieldFieldNumber = 11; |
| 2004 | private static readonly pbc::MapField<int, float?>.Codec _map_floatField_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2005 | = new pbc::MapField<int, float?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<float>(18), 90); |
| 2006 | private readonly pbc::MapField<int, float?> floatField_ = new pbc::MapField<int, float?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2007 | public pbc::MapField<int, float?> FloatField { |
| 2008 | get { return floatField_; } |
| 2009 | } |
| 2010 | |
| 2011 | public const int Int64FieldFieldNumber = 12; |
| 2012 | private static readonly pbc::MapField<int, long?>.Codec _map_int64Field_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2013 | = new pbc::MapField<int, long?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<long>(18), 98); |
| 2014 | private readonly pbc::MapField<int, long?> int64Field_ = new pbc::MapField<int, long?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2015 | public pbc::MapField<int, long?> Int64Field { |
| 2016 | get { return int64Field_; } |
| 2017 | } |
| 2018 | |
| 2019 | public const int Uint64FieldFieldNumber = 13; |
| 2020 | private static readonly pbc::MapField<int, ulong?>.Codec _map_uint64Field_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2021 | = new pbc::MapField<int, ulong?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<ulong>(18), 106); |
| 2022 | private readonly pbc::MapField<int, ulong?> uint64Field_ = new pbc::MapField<int, ulong?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2023 | public pbc::MapField<int, ulong?> Uint64Field { |
| 2024 | get { return uint64Field_; } |
| 2025 | } |
| 2026 | |
| 2027 | public const int Int32FieldFieldNumber = 14; |
| 2028 | private static readonly pbc::MapField<int, int?>.Codec _map_int32Field_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2029 | = new pbc::MapField<int, int?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<int>(18), 114); |
| 2030 | private readonly pbc::MapField<int, int?> int32Field_ = new pbc::MapField<int, int?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2031 | public pbc::MapField<int, int?> Int32Field { |
| 2032 | get { return int32Field_; } |
| 2033 | } |
| 2034 | |
| 2035 | public const int Uint32FieldFieldNumber = 15; |
| 2036 | private static readonly pbc::MapField<int, uint?>.Codec _map_uint32Field_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2037 | = new pbc::MapField<int, uint?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<uint>(18), 122); |
| 2038 | private readonly pbc::MapField<int, uint?> uint32Field_ = new pbc::MapField<int, uint?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2039 | public pbc::MapField<int, uint?> Uint32Field { |
| 2040 | get { return uint32Field_; } |
| 2041 | } |
| 2042 | |
| 2043 | public const int BoolFieldFieldNumber = 16; |
| 2044 | private static readonly pbc::MapField<int, bool?>.Codec _map_boolField_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2045 | = new pbc::MapField<int, bool?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<bool>(18), 130); |
| 2046 | private readonly pbc::MapField<int, bool?> boolField_ = new pbc::MapField<int, bool?>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2047 | public pbc::MapField<int, bool?> BoolField { |
| 2048 | get { return boolField_; } |
| 2049 | } |
| 2050 | |
| 2051 | public const int StringFieldFieldNumber = 17; |
| 2052 | private static readonly pbc::MapField<int, string>.Codec _map_stringField_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2053 | = new pbc::MapField<int, string>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForClassWrapper<string>(18), 138); |
| 2054 | private readonly pbc::MapField<int, string> stringField_ = new pbc::MapField<int, string>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2055 | public pbc::MapField<int, string> StringField { |
| 2056 | get { return stringField_; } |
| 2057 | } |
| 2058 | |
| 2059 | public const int BytesFieldFieldNumber = 18; |
| 2060 | private static readonly pbc::MapField<int, pb::ByteString>.Codec _map_bytesField_codec |
Jon Skeet | 8a0312b | 2015-07-16 17:03:06 +0100 | [diff] [blame] | 2061 | = new pbc::MapField<int, pb::ByteString>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForClassWrapper<pb::ByteString>(18), 146); |
| 2062 | private readonly pbc::MapField<int, pb::ByteString> bytesField_ = new pbc::MapField<int, pb::ByteString>(true); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2063 | public pbc::MapField<int, pb::ByteString> BytesField { |
| 2064 | get { return bytesField_; } |
| 2065 | } |
| 2066 | |
| 2067 | public override bool Equals(object other) { |
| 2068 | return Equals(other as MapWellKnownTypes); |
| 2069 | } |
| 2070 | |
| 2071 | public bool Equals(MapWellKnownTypes other) { |
| 2072 | if (ReferenceEquals(other, null)) { |
| 2073 | return false; |
| 2074 | } |
| 2075 | if (ReferenceEquals(other, this)) { |
| 2076 | return true; |
| 2077 | } |
| 2078 | if (!AnyField.Equals(other.AnyField)) return false; |
| 2079 | if (!ApiField.Equals(other.ApiField)) return false; |
| 2080 | if (!DurationField.Equals(other.DurationField)) return false; |
| 2081 | if (!EmptyField.Equals(other.EmptyField)) return false; |
| 2082 | if (!FieldMaskField.Equals(other.FieldMaskField)) return false; |
| 2083 | if (!SourceContextField.Equals(other.SourceContextField)) return false; |
| 2084 | if (!StructField.Equals(other.StructField)) return false; |
| 2085 | if (!TimestampField.Equals(other.TimestampField)) return false; |
| 2086 | if (!TypeField.Equals(other.TypeField)) return false; |
| 2087 | if (!DoubleField.Equals(other.DoubleField)) return false; |
| 2088 | if (!FloatField.Equals(other.FloatField)) return false; |
| 2089 | if (!Int64Field.Equals(other.Int64Field)) return false; |
| 2090 | if (!Uint64Field.Equals(other.Uint64Field)) return false; |
| 2091 | if (!Int32Field.Equals(other.Int32Field)) return false; |
| 2092 | if (!Uint32Field.Equals(other.Uint32Field)) return false; |
| 2093 | if (!BoolField.Equals(other.BoolField)) return false; |
| 2094 | if (!StringField.Equals(other.StringField)) return false; |
| 2095 | if (!BytesField.Equals(other.BytesField)) return false; |
| 2096 | return true; |
| 2097 | } |
| 2098 | |
| 2099 | public override int GetHashCode() { |
| 2100 | int hash = 1; |
| 2101 | hash ^= AnyField.GetHashCode(); |
| 2102 | hash ^= ApiField.GetHashCode(); |
| 2103 | hash ^= DurationField.GetHashCode(); |
| 2104 | hash ^= EmptyField.GetHashCode(); |
| 2105 | hash ^= FieldMaskField.GetHashCode(); |
| 2106 | hash ^= SourceContextField.GetHashCode(); |
| 2107 | hash ^= StructField.GetHashCode(); |
| 2108 | hash ^= TimestampField.GetHashCode(); |
| 2109 | hash ^= TypeField.GetHashCode(); |
| 2110 | hash ^= DoubleField.GetHashCode(); |
| 2111 | hash ^= FloatField.GetHashCode(); |
| 2112 | hash ^= Int64Field.GetHashCode(); |
| 2113 | hash ^= Uint64Field.GetHashCode(); |
| 2114 | hash ^= Int32Field.GetHashCode(); |
| 2115 | hash ^= Uint32Field.GetHashCode(); |
| 2116 | hash ^= BoolField.GetHashCode(); |
| 2117 | hash ^= StringField.GetHashCode(); |
| 2118 | hash ^= BytesField.GetHashCode(); |
| 2119 | return hash; |
| 2120 | } |
| 2121 | |
| 2122 | public override string ToString() { |
| 2123 | return pb::JsonFormatter.Default.Format(this); |
| 2124 | } |
| 2125 | |
| 2126 | public void WriteTo(pb::CodedOutputStream output) { |
| 2127 | anyField_.WriteTo(output, _map_anyField_codec); |
| 2128 | apiField_.WriteTo(output, _map_apiField_codec); |
| 2129 | durationField_.WriteTo(output, _map_durationField_codec); |
| 2130 | emptyField_.WriteTo(output, _map_emptyField_codec); |
| 2131 | fieldMaskField_.WriteTo(output, _map_fieldMaskField_codec); |
| 2132 | sourceContextField_.WriteTo(output, _map_sourceContextField_codec); |
| 2133 | structField_.WriteTo(output, _map_structField_codec); |
| 2134 | timestampField_.WriteTo(output, _map_timestampField_codec); |
| 2135 | typeField_.WriteTo(output, _map_typeField_codec); |
| 2136 | doubleField_.WriteTo(output, _map_doubleField_codec); |
| 2137 | floatField_.WriteTo(output, _map_floatField_codec); |
| 2138 | int64Field_.WriteTo(output, _map_int64Field_codec); |
| 2139 | uint64Field_.WriteTo(output, _map_uint64Field_codec); |
| 2140 | int32Field_.WriteTo(output, _map_int32Field_codec); |
| 2141 | uint32Field_.WriteTo(output, _map_uint32Field_codec); |
| 2142 | boolField_.WriteTo(output, _map_boolField_codec); |
| 2143 | stringField_.WriteTo(output, _map_stringField_codec); |
| 2144 | bytesField_.WriteTo(output, _map_bytesField_codec); |
| 2145 | } |
| 2146 | |
| 2147 | public int CalculateSize() { |
| 2148 | int size = 0; |
| 2149 | size += anyField_.CalculateSize(_map_anyField_codec); |
| 2150 | size += apiField_.CalculateSize(_map_apiField_codec); |
| 2151 | size += durationField_.CalculateSize(_map_durationField_codec); |
| 2152 | size += emptyField_.CalculateSize(_map_emptyField_codec); |
| 2153 | size += fieldMaskField_.CalculateSize(_map_fieldMaskField_codec); |
| 2154 | size += sourceContextField_.CalculateSize(_map_sourceContextField_codec); |
| 2155 | size += structField_.CalculateSize(_map_structField_codec); |
| 2156 | size += timestampField_.CalculateSize(_map_timestampField_codec); |
| 2157 | size += typeField_.CalculateSize(_map_typeField_codec); |
| 2158 | size += doubleField_.CalculateSize(_map_doubleField_codec); |
| 2159 | size += floatField_.CalculateSize(_map_floatField_codec); |
| 2160 | size += int64Field_.CalculateSize(_map_int64Field_codec); |
| 2161 | size += uint64Field_.CalculateSize(_map_uint64Field_codec); |
| 2162 | size += int32Field_.CalculateSize(_map_int32Field_codec); |
| 2163 | size += uint32Field_.CalculateSize(_map_uint32Field_codec); |
| 2164 | size += boolField_.CalculateSize(_map_boolField_codec); |
| 2165 | size += stringField_.CalculateSize(_map_stringField_codec); |
| 2166 | size += bytesField_.CalculateSize(_map_bytesField_codec); |
| 2167 | return size; |
| 2168 | } |
| 2169 | |
| 2170 | public void MergeFrom(MapWellKnownTypes other) { |
| 2171 | if (other == null) { |
| 2172 | return; |
| 2173 | } |
| 2174 | anyField_.Add(other.anyField_); |
| 2175 | apiField_.Add(other.apiField_); |
| 2176 | durationField_.Add(other.durationField_); |
| 2177 | emptyField_.Add(other.emptyField_); |
| 2178 | fieldMaskField_.Add(other.fieldMaskField_); |
| 2179 | sourceContextField_.Add(other.sourceContextField_); |
| 2180 | structField_.Add(other.structField_); |
| 2181 | timestampField_.Add(other.timestampField_); |
| 2182 | typeField_.Add(other.typeField_); |
| 2183 | doubleField_.Add(other.doubleField_); |
| 2184 | floatField_.Add(other.floatField_); |
| 2185 | int64Field_.Add(other.int64Field_); |
| 2186 | uint64Field_.Add(other.uint64Field_); |
| 2187 | int32Field_.Add(other.int32Field_); |
| 2188 | uint32Field_.Add(other.uint32Field_); |
| 2189 | boolField_.Add(other.boolField_); |
| 2190 | stringField_.Add(other.stringField_); |
| 2191 | bytesField_.Add(other.bytesField_); |
| 2192 | } |
| 2193 | |
| 2194 | public void MergeFrom(pb::CodedInputStream input) { |
| 2195 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 2196 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2197 | switch(tag) { |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2198 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 2199 | input.SkipLastField(); |
Jon Skeet | b2ac868 | 2015-07-15 13:17:42 +0100 | [diff] [blame] | 2200 | break; |
| 2201 | case 10: { |
| 2202 | anyField_.AddEntriesFrom(input, _map_anyField_codec); |
| 2203 | break; |
| 2204 | } |
| 2205 | case 18: { |
| 2206 | apiField_.AddEntriesFrom(input, _map_apiField_codec); |
| 2207 | break; |
| 2208 | } |
| 2209 | case 26: { |
| 2210 | durationField_.AddEntriesFrom(input, _map_durationField_codec); |
| 2211 | break; |
| 2212 | } |
| 2213 | case 34: { |
| 2214 | emptyField_.AddEntriesFrom(input, _map_emptyField_codec); |
| 2215 | break; |
| 2216 | } |
| 2217 | case 42: { |
| 2218 | fieldMaskField_.AddEntriesFrom(input, _map_fieldMaskField_codec); |
| 2219 | break; |
| 2220 | } |
| 2221 | case 50: { |
| 2222 | sourceContextField_.AddEntriesFrom(input, _map_sourceContextField_codec); |
| 2223 | break; |
| 2224 | } |
| 2225 | case 58: { |
| 2226 | structField_.AddEntriesFrom(input, _map_structField_codec); |
| 2227 | break; |
| 2228 | } |
| 2229 | case 66: { |
| 2230 | timestampField_.AddEntriesFrom(input, _map_timestampField_codec); |
| 2231 | break; |
| 2232 | } |
| 2233 | case 74: { |
| 2234 | typeField_.AddEntriesFrom(input, _map_typeField_codec); |
| 2235 | break; |
| 2236 | } |
| 2237 | case 82: { |
| 2238 | doubleField_.AddEntriesFrom(input, _map_doubleField_codec); |
| 2239 | break; |
| 2240 | } |
| 2241 | case 90: { |
| 2242 | floatField_.AddEntriesFrom(input, _map_floatField_codec); |
| 2243 | break; |
| 2244 | } |
| 2245 | case 98: { |
| 2246 | int64Field_.AddEntriesFrom(input, _map_int64Field_codec); |
| 2247 | break; |
| 2248 | } |
| 2249 | case 106: { |
| 2250 | uint64Field_.AddEntriesFrom(input, _map_uint64Field_codec); |
| 2251 | break; |
| 2252 | } |
| 2253 | case 114: { |
| 2254 | int32Field_.AddEntriesFrom(input, _map_int32Field_codec); |
| 2255 | break; |
| 2256 | } |
| 2257 | case 122: { |
| 2258 | uint32Field_.AddEntriesFrom(input, _map_uint32Field_codec); |
| 2259 | break; |
| 2260 | } |
| 2261 | case 130: { |
| 2262 | boolField_.AddEntriesFrom(input, _map_boolField_codec); |
| 2263 | break; |
| 2264 | } |
| 2265 | case 138: { |
| 2266 | stringField_.AddEntriesFrom(input, _map_stringField_codec); |
| 2267 | break; |
| 2268 | } |
| 2269 | case 146: { |
| 2270 | bytesField_.AddEntriesFrom(input, _map_bytesField_codec); |
| 2271 | break; |
| 2272 | } |
| 2273 | } |
| 2274 | } |
| 2275 | } |
| 2276 | |
| 2277 | } |
| 2278 | |
| 2279 | #endregion |
| 2280 | |
| 2281 | } |
| 2282 | |
| 2283 | #endregion Designer generated code |