Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1 | // <auto-generated> |
| 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | // source: unittest_issues.proto |
| 4 | // </auto-generated> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5 | #pragma warning disable 1591, 0612, 3021 |
| 6 | #region Designer generated code |
| 7 | |
| 8 | using pb = global::Google.Protobuf; |
| 9 | using pbc = global::Google.Protobuf.Collections; |
| 10 | using pbr = global::Google.Protobuf.Reflection; |
| 11 | using scg = global::System.Collections.Generic; |
| 12 | namespace UnitTest.Issues.TestProtos { |
| 13 | |
| 14 | /// <summary>Holder for reflection information generated from unittest_issues.proto</summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 15 | public static partial class UnittestIssuesReflection { |
| 16 | |
| 17 | #region Descriptor |
| 18 | /// <summary>File descriptor for unittest_issues.proto</summary> |
| 19 | public static pbr::FileDescriptor Descriptor { |
| 20 | get { return descriptor; } |
| 21 | } |
| 22 | private static pbr::FileDescriptor descriptor; |
| 23 | |
| 24 | static UnittestIssuesReflection() { |
| 25 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 26 | string.Concat( |
| 27 | "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ", |
| 28 | "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh", |
| 29 | "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz", |
| 30 | "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p", |
| 31 | "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO", |
| 32 | "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj", |
| 33 | "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt", |
| 34 | "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC", |
| 35 | "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E", |
| 36 | "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu", |
| 37 | "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1", |
| 38 | "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES", |
| 39 | "NgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0", |
| 40 | "ZWRFbnVtQgIYASIZCglJdGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNl", |
| 41 | "cnZlZE5hbWVzEg0KBXR5cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUa", |
| 42 | "EAoOU29tZU5lc3RlZFR5cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxIT", |
| 43 | "CgtwbGFpbl9pbnQzMhgEIAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghv", |
| 44 | "MV9pbnQzMhgFIAEoBUgAEhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9p", |
| 45 | "bnQzMhgGIAEoBUgBEhMKCW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8y", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 46 | "IksKDFRlc3RKc29uTmFtZRIMCgRuYW1lGAEgASgJEhkKC2Rlc2NyaXB0aW9u", |
| 47 | "GAIgASgJUgRkZXNjEhIKBGd1aWQYAyABKAlSBGV4aWQifwoMT25lb2ZNZXJn", |
| 48 | "aW5nEg4KBHRleHQYASABKAlIABI2CgZuZXN0ZWQYAiABKAsyJC51bml0dGVz", |
| 49 | "dF9pc3N1ZXMuT25lb2ZNZXJnaW5nLk5lc3RlZEgAGh4KBk5lc3RlZBIJCgF4", |
| 50 | "GAEgASgFEgkKAXkYAiABKAVCBwoFdmFsdWUqVQoMTmVnYXRpdmVFbnVtEhYK", |
| 51 | "Ek5FR0FUSVZFX0VOVU1fWkVSTxAAEhYKCUZpdmVCZWxvdxD7//////////8B", |
| 52 | "EhUKCE1pbnVzT25lEP///////////wEqLgoORGVwcmVjYXRlZEVudW0SEwoP", |
| 53 | "REVQUkVDQVRFRF9aRVJPEAASBwoDb25lEAFCHaoCGlVuaXRUZXN0Lklzc3Vl", |
| 54 | "cy5UZXN0UHJvdG9zYgZwcm90bzM=")); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 55 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 56 | new pbr::FileDescriptor[] { }, |
| 57 | new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, new pbr::GeneratedClrTypeInfo[] { |
| 58 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Parser, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice.Parser, null, null, null, null)})}), |
| 59 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null), |
| 60 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser, null, null, null, null), |
| 61 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage), global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Parser, new[]{ "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray" }, null, null, null), |
| 62 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), global::UnitTest.Issues.TestProtos.ItemField.Parser, new[]{ "Item" }, null, null, null), |
| 63 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType.Parser, null, null, null, null)}), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 64 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering.Parser, new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null), |
| 65 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null), |
| 66 | new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested), global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested.Parser, new[]{ "X", "Y" }, null, null, null)}) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 67 | })); |
| 68 | } |
| 69 | #endregion |
| 70 | |
| 71 | } |
| 72 | #region Enums |
| 73 | public enum NegativeEnum { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 74 | [pbr::OriginalName("NEGATIVE_ENUM_ZERO")] Zero = 0, |
| 75 | [pbr::OriginalName("FiveBelow")] FiveBelow = -5, |
| 76 | [pbr::OriginalName("MinusOne")] MinusOne = -1, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | public enum DeprecatedEnum { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 80 | [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0, |
| 81 | [pbr::OriginalName("one")] One = 1, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | #endregion |
| 85 | |
| 86 | #region Messages |
| 87 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 88 | /// Issue 307: when generating doubly-nested types, any references |
| 89 | /// should be of the form A.Types.B.Types.C. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 90 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 91 | public sealed partial class Issue307 : pb::IMessage<Issue307> { |
| 92 | private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 93 | private pb::UnknownFieldSet _unknownFields; |
| 94 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 95 | public static pb::MessageParser<Issue307> Parser { get { return _parser; } } |
| 96 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 97 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 98 | public static pbr::MessageDescriptor Descriptor { |
| 99 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[0]; } |
| 100 | } |
| 101 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 102 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 103 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 104 | get { return Descriptor; } |
| 105 | } |
| 106 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 107 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 108 | public Issue307() { |
| 109 | OnConstruction(); |
| 110 | } |
| 111 | |
| 112 | partial void OnConstruction(); |
| 113 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 114 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 115 | public Issue307(Issue307 other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 116 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 117 | } |
| 118 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 119 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 120 | public Issue307 Clone() { |
| 121 | return new Issue307(this); |
| 122 | } |
| 123 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 124 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 125 | public override bool Equals(object other) { |
| 126 | return Equals(other as Issue307); |
| 127 | } |
| 128 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 130 | public bool Equals(Issue307 other) { |
| 131 | if (ReferenceEquals(other, null)) { |
| 132 | return false; |
| 133 | } |
| 134 | if (ReferenceEquals(other, this)) { |
| 135 | return true; |
| 136 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 137 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 138 | } |
| 139 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 140 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 141 | public override int GetHashCode() { |
| 142 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 143 | if (_unknownFields != null) { |
| 144 | hash ^= _unknownFields.GetHashCode(); |
| 145 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 146 | return hash; |
| 147 | } |
| 148 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 149 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 150 | public override string ToString() { |
| 151 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 152 | } |
| 153 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 154 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 155 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 156 | if (_unknownFields != null) { |
| 157 | _unknownFields.WriteTo(output); |
| 158 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 159 | } |
| 160 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 161 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 162 | public int CalculateSize() { |
| 163 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 164 | if (_unknownFields != null) { |
| 165 | size += _unknownFields.CalculateSize(); |
| 166 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 167 | return size; |
| 168 | } |
| 169 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 170 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 171 | public void MergeFrom(Issue307 other) { |
| 172 | if (other == null) { |
| 173 | return; |
| 174 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 175 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 176 | } |
| 177 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 178 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 179 | public void MergeFrom(pb::CodedInputStream input) { |
| 180 | uint tag; |
| 181 | while ((tag = input.ReadTag()) != 0) { |
| 182 | switch(tag) { |
| 183 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 184 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 185 | break; |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | #region Nested types |
| 191 | /// <summary>Container for nested types declared in the Issue307 message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 192 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 193 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 194 | public sealed partial class NestedOnce : pb::IMessage<NestedOnce> { |
| 195 | private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 196 | private pb::UnknownFieldSet _unknownFields; |
| 197 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 198 | public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } } |
| 199 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 200 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 201 | public static pbr::MessageDescriptor Descriptor { |
| 202 | get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; } |
| 203 | } |
| 204 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 205 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 206 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 207 | get { return Descriptor; } |
| 208 | } |
| 209 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 210 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 211 | public NestedOnce() { |
| 212 | OnConstruction(); |
| 213 | } |
| 214 | |
| 215 | partial void OnConstruction(); |
| 216 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 217 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 218 | public NestedOnce(NestedOnce other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 219 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 220 | } |
| 221 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 222 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 223 | public NestedOnce Clone() { |
| 224 | return new NestedOnce(this); |
| 225 | } |
| 226 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 227 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 228 | public override bool Equals(object other) { |
| 229 | return Equals(other as NestedOnce); |
| 230 | } |
| 231 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 232 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 233 | public bool Equals(NestedOnce other) { |
| 234 | if (ReferenceEquals(other, null)) { |
| 235 | return false; |
| 236 | } |
| 237 | if (ReferenceEquals(other, this)) { |
| 238 | return true; |
| 239 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 240 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 241 | } |
| 242 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 243 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 244 | public override int GetHashCode() { |
| 245 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 246 | if (_unknownFields != null) { |
| 247 | hash ^= _unknownFields.GetHashCode(); |
| 248 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 249 | return hash; |
| 250 | } |
| 251 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 253 | public override string ToString() { |
| 254 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 255 | } |
| 256 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 257 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 258 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 259 | if (_unknownFields != null) { |
| 260 | _unknownFields.WriteTo(output); |
| 261 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 262 | } |
| 263 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 264 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 265 | public int CalculateSize() { |
| 266 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 267 | if (_unknownFields != null) { |
| 268 | size += _unknownFields.CalculateSize(); |
| 269 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 270 | return size; |
| 271 | } |
| 272 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 273 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 274 | public void MergeFrom(NestedOnce other) { |
| 275 | if (other == null) { |
| 276 | return; |
| 277 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 278 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 279 | } |
| 280 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 281 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 282 | public void MergeFrom(pb::CodedInputStream input) { |
| 283 | uint tag; |
| 284 | while ((tag = input.ReadTag()) != 0) { |
| 285 | switch(tag) { |
| 286 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 287 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 288 | break; |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | #region Nested types |
| 294 | /// <summary>Container for nested types declared in the NestedOnce message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 295 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 296 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 297 | public sealed partial class NestedTwice : pb::IMessage<NestedTwice> { |
| 298 | private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 299 | private pb::UnknownFieldSet _unknownFields; |
| 300 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 301 | public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } } |
| 302 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 304 | public static pbr::MessageDescriptor Descriptor { |
| 305 | get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; } |
| 306 | } |
| 307 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 308 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 309 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 310 | get { return Descriptor; } |
| 311 | } |
| 312 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 313 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 314 | public NestedTwice() { |
| 315 | OnConstruction(); |
| 316 | } |
| 317 | |
| 318 | partial void OnConstruction(); |
| 319 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 320 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 321 | public NestedTwice(NestedTwice other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 322 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 323 | } |
| 324 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 325 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 326 | public NestedTwice Clone() { |
| 327 | return new NestedTwice(this); |
| 328 | } |
| 329 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 330 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 331 | public override bool Equals(object other) { |
| 332 | return Equals(other as NestedTwice); |
| 333 | } |
| 334 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 335 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 336 | public bool Equals(NestedTwice other) { |
| 337 | if (ReferenceEquals(other, null)) { |
| 338 | return false; |
| 339 | } |
| 340 | if (ReferenceEquals(other, this)) { |
| 341 | return true; |
| 342 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 343 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 344 | } |
| 345 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 346 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 347 | public override int GetHashCode() { |
| 348 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 349 | if (_unknownFields != null) { |
| 350 | hash ^= _unknownFields.GetHashCode(); |
| 351 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 352 | return hash; |
| 353 | } |
| 354 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 355 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 356 | public override string ToString() { |
| 357 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 358 | } |
| 359 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 360 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 361 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 362 | if (_unknownFields != null) { |
| 363 | _unknownFields.WriteTo(output); |
| 364 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 365 | } |
| 366 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 367 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 368 | public int CalculateSize() { |
| 369 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 370 | if (_unknownFields != null) { |
| 371 | size += _unknownFields.CalculateSize(); |
| 372 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 373 | return size; |
| 374 | } |
| 375 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 376 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 377 | public void MergeFrom(NestedTwice other) { |
| 378 | if (other == null) { |
| 379 | return; |
| 380 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 381 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 382 | } |
| 383 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 384 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 385 | public void MergeFrom(pb::CodedInputStream input) { |
| 386 | uint tag; |
| 387 | while ((tag = input.ReadTag()) != 0) { |
| 388 | switch(tag) { |
| 389 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 390 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 391 | break; |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | } |
| 397 | |
| 398 | } |
| 399 | #endregion |
| 400 | |
| 401 | } |
| 402 | |
| 403 | } |
| 404 | #endregion |
| 405 | |
| 406 | } |
| 407 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 408 | public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage> { |
| 409 | private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 410 | private pb::UnknownFieldSet _unknownFields; |
| 411 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 412 | public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } } |
| 413 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 414 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 415 | public static pbr::MessageDescriptor Descriptor { |
| 416 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[1]; } |
| 417 | } |
| 418 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 419 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 420 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 421 | get { return Descriptor; } |
| 422 | } |
| 423 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 424 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 425 | public NegativeEnumMessage() { |
| 426 | OnConstruction(); |
| 427 | } |
| 428 | |
| 429 | partial void OnConstruction(); |
| 430 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 431 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 432 | public NegativeEnumMessage(NegativeEnumMessage other) : this() { |
| 433 | value_ = other.value_; |
| 434 | values_ = other.values_.Clone(); |
| 435 | packedValues_ = other.packedValues_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 436 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 437 | } |
| 438 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 439 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 440 | public NegativeEnumMessage Clone() { |
| 441 | return new NegativeEnumMessage(this); |
| 442 | } |
| 443 | |
| 444 | /// <summary>Field number for the "value" field.</summary> |
| 445 | public const int ValueFieldNumber = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 446 | private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = 0; |
| 447 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 448 | public global::UnitTest.Issues.TestProtos.NegativeEnum Value { |
| 449 | get { return value_; } |
| 450 | set { |
| 451 | value_ = value; |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | /// <summary>Field number for the "values" field.</summary> |
| 456 | public const int ValuesFieldNumber = 2; |
| 457 | private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec |
| 458 | = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x); |
| 459 | private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 460 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 461 | public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values { |
| 462 | get { return values_; } |
| 463 | } |
| 464 | |
| 465 | /// <summary>Field number for the "packed_values" field.</summary> |
| 466 | public const int PackedValuesFieldNumber = 3; |
| 467 | private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec |
| 468 | = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x); |
| 469 | private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 470 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 471 | public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues { |
| 472 | get { return packedValues_; } |
| 473 | } |
| 474 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 475 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 476 | public override bool Equals(object other) { |
| 477 | return Equals(other as NegativeEnumMessage); |
| 478 | } |
| 479 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 480 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 481 | public bool Equals(NegativeEnumMessage other) { |
| 482 | if (ReferenceEquals(other, null)) { |
| 483 | return false; |
| 484 | } |
| 485 | if (ReferenceEquals(other, this)) { |
| 486 | return true; |
| 487 | } |
| 488 | if (Value != other.Value) return false; |
| 489 | if(!values_.Equals(other.values_)) return false; |
| 490 | if(!packedValues_.Equals(other.packedValues_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 491 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 492 | } |
| 493 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 494 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 495 | public override int GetHashCode() { |
| 496 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 497 | if (Value != 0) hash ^= Value.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 498 | hash ^= values_.GetHashCode(); |
| 499 | hash ^= packedValues_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 500 | if (_unknownFields != null) { |
| 501 | hash ^= _unknownFields.GetHashCode(); |
| 502 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 503 | return hash; |
| 504 | } |
| 505 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 506 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 507 | public override string ToString() { |
| 508 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 509 | } |
| 510 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 511 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 512 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 513 | if (Value != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 514 | output.WriteRawTag(8); |
| 515 | output.WriteEnum((int) Value); |
| 516 | } |
| 517 | values_.WriteTo(output, _repeated_values_codec); |
| 518 | packedValues_.WriteTo(output, _repeated_packedValues_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 519 | if (_unknownFields != null) { |
| 520 | _unknownFields.WriteTo(output); |
| 521 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 522 | } |
| 523 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 524 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 525 | public int CalculateSize() { |
| 526 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 527 | if (Value != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 528 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); |
| 529 | } |
| 530 | size += values_.CalculateSize(_repeated_values_codec); |
| 531 | size += packedValues_.CalculateSize(_repeated_packedValues_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 532 | if (_unknownFields != null) { |
| 533 | size += _unknownFields.CalculateSize(); |
| 534 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 535 | return size; |
| 536 | } |
| 537 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 538 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 539 | public void MergeFrom(NegativeEnumMessage other) { |
| 540 | if (other == null) { |
| 541 | return; |
| 542 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 543 | if (other.Value != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 544 | Value = other.Value; |
| 545 | } |
| 546 | values_.Add(other.values_); |
| 547 | packedValues_.Add(other.packedValues_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 548 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 549 | } |
| 550 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 551 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 552 | public void MergeFrom(pb::CodedInputStream input) { |
| 553 | uint tag; |
| 554 | while ((tag = input.ReadTag()) != 0) { |
| 555 | switch(tag) { |
| 556 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 557 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 558 | break; |
| 559 | case 8: { |
| 560 | value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum(); |
| 561 | break; |
| 562 | } |
| 563 | case 18: |
| 564 | case 16: { |
| 565 | values_.AddEntriesFrom(input, _repeated_values_codec); |
| 566 | break; |
| 567 | } |
| 568 | case 26: |
| 569 | case 24: { |
| 570 | packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec); |
| 571 | break; |
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | } |
| 578 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 579 | public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> { |
| 580 | private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 581 | private pb::UnknownFieldSet _unknownFields; |
| 582 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 583 | public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } } |
| 584 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 585 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 586 | public static pbr::MessageDescriptor Descriptor { |
| 587 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[2]; } |
| 588 | } |
| 589 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 590 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 591 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 592 | get { return Descriptor; } |
| 593 | } |
| 594 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 595 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 596 | public DeprecatedChild() { |
| 597 | OnConstruction(); |
| 598 | } |
| 599 | |
| 600 | partial void OnConstruction(); |
| 601 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 602 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 603 | public DeprecatedChild(DeprecatedChild other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 604 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 605 | } |
| 606 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 607 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 608 | public DeprecatedChild Clone() { |
| 609 | return new DeprecatedChild(this); |
| 610 | } |
| 611 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 612 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 613 | public override bool Equals(object other) { |
| 614 | return Equals(other as DeprecatedChild); |
| 615 | } |
| 616 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 617 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 618 | public bool Equals(DeprecatedChild other) { |
| 619 | if (ReferenceEquals(other, null)) { |
| 620 | return false; |
| 621 | } |
| 622 | if (ReferenceEquals(other, this)) { |
| 623 | return true; |
| 624 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 625 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 626 | } |
| 627 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 628 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 629 | public override int GetHashCode() { |
| 630 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 631 | if (_unknownFields != null) { |
| 632 | hash ^= _unknownFields.GetHashCode(); |
| 633 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 634 | return hash; |
| 635 | } |
| 636 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 637 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 638 | public override string ToString() { |
| 639 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 640 | } |
| 641 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 642 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 643 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 644 | if (_unknownFields != null) { |
| 645 | _unknownFields.WriteTo(output); |
| 646 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 647 | } |
| 648 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 649 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 650 | public int CalculateSize() { |
| 651 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 652 | if (_unknownFields != null) { |
| 653 | size += _unknownFields.CalculateSize(); |
| 654 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 655 | return size; |
| 656 | } |
| 657 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 658 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 659 | public void MergeFrom(DeprecatedChild other) { |
| 660 | if (other == null) { |
| 661 | return; |
| 662 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 663 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 664 | } |
| 665 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 666 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 667 | public void MergeFrom(pb::CodedInputStream input) { |
| 668 | uint tag; |
| 669 | while ((tag = input.ReadTag()) != 0) { |
| 670 | switch(tag) { |
| 671 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 672 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 673 | break; |
| 674 | } |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | } |
| 679 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 680 | public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage> { |
| 681 | private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 682 | private pb::UnknownFieldSet _unknownFields; |
| 683 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 684 | public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } } |
| 685 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 686 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 687 | public static pbr::MessageDescriptor Descriptor { |
| 688 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[3]; } |
| 689 | } |
| 690 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 691 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 692 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 693 | get { return Descriptor; } |
| 694 | } |
| 695 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 696 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 697 | public DeprecatedFieldsMessage() { |
| 698 | OnConstruction(); |
| 699 | } |
| 700 | |
| 701 | partial void OnConstruction(); |
| 702 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 703 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 704 | public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() { |
| 705 | primitiveValue_ = other.primitiveValue_; |
| 706 | primitiveArray_ = other.primitiveArray_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 707 | messageValue_ = other.messageValue_ != null ? other.messageValue_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 708 | messageArray_ = other.messageArray_.Clone(); |
| 709 | enumValue_ = other.enumValue_; |
| 710 | enumArray_ = other.enumArray_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 711 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 712 | } |
| 713 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 714 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 715 | public DeprecatedFieldsMessage Clone() { |
| 716 | return new DeprecatedFieldsMessage(this); |
| 717 | } |
| 718 | |
| 719 | /// <summary>Field number for the "PrimitiveValue" field.</summary> |
| 720 | public const int PrimitiveValueFieldNumber = 1; |
| 721 | private int primitiveValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 722 | [global::System.ObsoleteAttribute] |
| 723 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 724 | public int PrimitiveValue { |
| 725 | get { return primitiveValue_; } |
| 726 | set { |
| 727 | primitiveValue_ = value; |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | /// <summary>Field number for the "PrimitiveArray" field.</summary> |
| 732 | public const int PrimitiveArrayFieldNumber = 2; |
| 733 | private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec |
| 734 | = pb::FieldCodec.ForInt32(18); |
| 735 | private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 736 | [global::System.ObsoleteAttribute] |
| 737 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 738 | public pbc::RepeatedField<int> PrimitiveArray { |
| 739 | get { return primitiveArray_; } |
| 740 | } |
| 741 | |
| 742 | /// <summary>Field number for the "MessageValue" field.</summary> |
| 743 | public const int MessageValueFieldNumber = 3; |
| 744 | private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 745 | [global::System.ObsoleteAttribute] |
| 746 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 747 | public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue { |
| 748 | get { return messageValue_; } |
| 749 | set { |
| 750 | messageValue_ = value; |
| 751 | } |
| 752 | } |
| 753 | |
| 754 | /// <summary>Field number for the "MessageArray" field.</summary> |
| 755 | public const int MessageArrayFieldNumber = 4; |
| 756 | private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec |
| 757 | = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser); |
| 758 | private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 759 | [global::System.ObsoleteAttribute] |
| 760 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 761 | public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray { |
| 762 | get { return messageArray_; } |
| 763 | } |
| 764 | |
| 765 | /// <summary>Field number for the "EnumValue" field.</summary> |
| 766 | public const int EnumValueFieldNumber = 5; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 767 | private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = 0; |
| 768 | [global::System.ObsoleteAttribute] |
| 769 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 770 | public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue { |
| 771 | get { return enumValue_; } |
| 772 | set { |
| 773 | enumValue_ = value; |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | /// <summary>Field number for the "EnumArray" field.</summary> |
| 778 | public const int EnumArrayFieldNumber = 6; |
| 779 | private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec |
| 780 | = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x); |
| 781 | private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 782 | [global::System.ObsoleteAttribute] |
| 783 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 784 | public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray { |
| 785 | get { return enumArray_; } |
| 786 | } |
| 787 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 788 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 789 | public override bool Equals(object other) { |
| 790 | return Equals(other as DeprecatedFieldsMessage); |
| 791 | } |
| 792 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 793 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 794 | public bool Equals(DeprecatedFieldsMessage other) { |
| 795 | if (ReferenceEquals(other, null)) { |
| 796 | return false; |
| 797 | } |
| 798 | if (ReferenceEquals(other, this)) { |
| 799 | return true; |
| 800 | } |
| 801 | if (PrimitiveValue != other.PrimitiveValue) return false; |
| 802 | if(!primitiveArray_.Equals(other.primitiveArray_)) return false; |
| 803 | if (!object.Equals(MessageValue, other.MessageValue)) return false; |
| 804 | if(!messageArray_.Equals(other.messageArray_)) return false; |
| 805 | if (EnumValue != other.EnumValue) return false; |
| 806 | if(!enumArray_.Equals(other.enumArray_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 807 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 808 | } |
| 809 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 810 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 811 | public override int GetHashCode() { |
| 812 | int hash = 1; |
| 813 | if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode(); |
| 814 | hash ^= primitiveArray_.GetHashCode(); |
| 815 | if (messageValue_ != null) hash ^= MessageValue.GetHashCode(); |
| 816 | hash ^= messageArray_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 817 | if (EnumValue != 0) hash ^= EnumValue.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 818 | hash ^= enumArray_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 819 | if (_unknownFields != null) { |
| 820 | hash ^= _unknownFields.GetHashCode(); |
| 821 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 822 | return hash; |
| 823 | } |
| 824 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 825 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 826 | public override string ToString() { |
| 827 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 828 | } |
| 829 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 830 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 831 | public void WriteTo(pb::CodedOutputStream output) { |
| 832 | if (PrimitiveValue != 0) { |
| 833 | output.WriteRawTag(8); |
| 834 | output.WriteInt32(PrimitiveValue); |
| 835 | } |
| 836 | primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec); |
| 837 | if (messageValue_ != null) { |
| 838 | output.WriteRawTag(26); |
| 839 | output.WriteMessage(MessageValue); |
| 840 | } |
| 841 | messageArray_.WriteTo(output, _repeated_messageArray_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 842 | if (EnumValue != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 843 | output.WriteRawTag(40); |
| 844 | output.WriteEnum((int) EnumValue); |
| 845 | } |
| 846 | enumArray_.WriteTo(output, _repeated_enumArray_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 847 | if (_unknownFields != null) { |
| 848 | _unknownFields.WriteTo(output); |
| 849 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 850 | } |
| 851 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 852 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 853 | public int CalculateSize() { |
| 854 | int size = 0; |
| 855 | if (PrimitiveValue != 0) { |
| 856 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue); |
| 857 | } |
| 858 | size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec); |
| 859 | if (messageValue_ != null) { |
| 860 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue); |
| 861 | } |
| 862 | size += messageArray_.CalculateSize(_repeated_messageArray_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 863 | if (EnumValue != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 864 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue); |
| 865 | } |
| 866 | size += enumArray_.CalculateSize(_repeated_enumArray_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 867 | if (_unknownFields != null) { |
| 868 | size += _unknownFields.CalculateSize(); |
| 869 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 870 | return size; |
| 871 | } |
| 872 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 873 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 874 | public void MergeFrom(DeprecatedFieldsMessage other) { |
| 875 | if (other == null) { |
| 876 | return; |
| 877 | } |
| 878 | if (other.PrimitiveValue != 0) { |
| 879 | PrimitiveValue = other.PrimitiveValue; |
| 880 | } |
| 881 | primitiveArray_.Add(other.primitiveArray_); |
| 882 | if (other.messageValue_ != null) { |
| 883 | if (messageValue_ == null) { |
| 884 | messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild(); |
| 885 | } |
| 886 | MessageValue.MergeFrom(other.MessageValue); |
| 887 | } |
| 888 | messageArray_.Add(other.messageArray_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 889 | if (other.EnumValue != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 890 | EnumValue = other.EnumValue; |
| 891 | } |
| 892 | enumArray_.Add(other.enumArray_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 893 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 894 | } |
| 895 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 896 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 897 | public void MergeFrom(pb::CodedInputStream input) { |
| 898 | uint tag; |
| 899 | while ((tag = input.ReadTag()) != 0) { |
| 900 | switch(tag) { |
| 901 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 902 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 903 | break; |
| 904 | case 8: { |
| 905 | PrimitiveValue = input.ReadInt32(); |
| 906 | break; |
| 907 | } |
| 908 | case 18: |
| 909 | case 16: { |
| 910 | primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec); |
| 911 | break; |
| 912 | } |
| 913 | case 26: { |
| 914 | if (messageValue_ == null) { |
| 915 | messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild(); |
| 916 | } |
| 917 | input.ReadMessage(messageValue_); |
| 918 | break; |
| 919 | } |
| 920 | case 34: { |
| 921 | messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec); |
| 922 | break; |
| 923 | } |
| 924 | case 40: { |
| 925 | enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum(); |
| 926 | break; |
| 927 | } |
| 928 | case 50: |
| 929 | case 48: { |
| 930 | enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec); |
| 931 | break; |
| 932 | } |
| 933 | } |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | } |
| 938 | |
| 939 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 940 | /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45 |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 941 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 942 | public sealed partial class ItemField : pb::IMessage<ItemField> { |
| 943 | private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 944 | private pb::UnknownFieldSet _unknownFields; |
| 945 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 946 | public static pb::MessageParser<ItemField> Parser { get { return _parser; } } |
| 947 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 948 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 949 | public static pbr::MessageDescriptor Descriptor { |
| 950 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[4]; } |
| 951 | } |
| 952 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 953 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 954 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 955 | get { return Descriptor; } |
| 956 | } |
| 957 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 959 | public ItemField() { |
| 960 | OnConstruction(); |
| 961 | } |
| 962 | |
| 963 | partial void OnConstruction(); |
| 964 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 965 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 966 | public ItemField(ItemField other) : this() { |
| 967 | item_ = other.item_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 968 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 969 | } |
| 970 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 971 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 972 | public ItemField Clone() { |
| 973 | return new ItemField(this); |
| 974 | } |
| 975 | |
| 976 | /// <summary>Field number for the "item" field.</summary> |
| 977 | public const int ItemFieldNumber = 1; |
| 978 | private int item_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 979 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 980 | public int Item { |
| 981 | get { return item_; } |
| 982 | set { |
| 983 | item_ = value; |
| 984 | } |
| 985 | } |
| 986 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 987 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 988 | public override bool Equals(object other) { |
| 989 | return Equals(other as ItemField); |
| 990 | } |
| 991 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 992 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 993 | public bool Equals(ItemField other) { |
| 994 | if (ReferenceEquals(other, null)) { |
| 995 | return false; |
| 996 | } |
| 997 | if (ReferenceEquals(other, this)) { |
| 998 | return true; |
| 999 | } |
| 1000 | if (Item != other.Item) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1001 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1002 | } |
| 1003 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1004 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1005 | public override int GetHashCode() { |
| 1006 | int hash = 1; |
| 1007 | if (Item != 0) hash ^= Item.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1008 | if (_unknownFields != null) { |
| 1009 | hash ^= _unknownFields.GetHashCode(); |
| 1010 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1011 | return hash; |
| 1012 | } |
| 1013 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1014 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1015 | public override string ToString() { |
| 1016 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1017 | } |
| 1018 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1019 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1020 | public void WriteTo(pb::CodedOutputStream output) { |
| 1021 | if (Item != 0) { |
| 1022 | output.WriteRawTag(8); |
| 1023 | output.WriteInt32(Item); |
| 1024 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1025 | if (_unknownFields != null) { |
| 1026 | _unknownFields.WriteTo(output); |
| 1027 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1028 | } |
| 1029 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1030 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1031 | public int CalculateSize() { |
| 1032 | int size = 0; |
| 1033 | if (Item != 0) { |
| 1034 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item); |
| 1035 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1036 | if (_unknownFields != null) { |
| 1037 | size += _unknownFields.CalculateSize(); |
| 1038 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1039 | return size; |
| 1040 | } |
| 1041 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1042 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1043 | public void MergeFrom(ItemField other) { |
| 1044 | if (other == null) { |
| 1045 | return; |
| 1046 | } |
| 1047 | if (other.Item != 0) { |
| 1048 | Item = other.Item; |
| 1049 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1050 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1051 | } |
| 1052 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1053 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1054 | public void MergeFrom(pb::CodedInputStream input) { |
| 1055 | uint tag; |
| 1056 | while ((tag = input.ReadTag()) != 0) { |
| 1057 | switch(tag) { |
| 1058 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1059 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1060 | break; |
| 1061 | case 8: { |
| 1062 | Item = input.ReadInt32(); |
| 1063 | break; |
| 1064 | } |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | } |
| 1070 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1071 | public sealed partial class ReservedNames : pb::IMessage<ReservedNames> { |
| 1072 | private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1073 | private pb::UnknownFieldSet _unknownFields; |
| 1074 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1075 | public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } } |
| 1076 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1077 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1078 | public static pbr::MessageDescriptor Descriptor { |
| 1079 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[5]; } |
| 1080 | } |
| 1081 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1082 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1083 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1084 | get { return Descriptor; } |
| 1085 | } |
| 1086 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1087 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1088 | public ReservedNames() { |
| 1089 | OnConstruction(); |
| 1090 | } |
| 1091 | |
| 1092 | partial void OnConstruction(); |
| 1093 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1094 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1095 | public ReservedNames(ReservedNames other) : this() { |
| 1096 | types_ = other.types_; |
| 1097 | descriptor_ = other.descriptor_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1098 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1099 | } |
| 1100 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1101 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1102 | public ReservedNames Clone() { |
| 1103 | return new ReservedNames(this); |
| 1104 | } |
| 1105 | |
| 1106 | /// <summary>Field number for the "types" field.</summary> |
| 1107 | public const int Types_FieldNumber = 1; |
| 1108 | private int types_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1110 | public int Types_ { |
| 1111 | get { return types_; } |
| 1112 | set { |
| 1113 | types_ = value; |
| 1114 | } |
| 1115 | } |
| 1116 | |
| 1117 | /// <summary>Field number for the "descriptor" field.</summary> |
| 1118 | public const int Descriptor_FieldNumber = 2; |
| 1119 | private int descriptor_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1120 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1121 | public int Descriptor_ { |
| 1122 | get { return descriptor_; } |
| 1123 | set { |
| 1124 | descriptor_ = value; |
| 1125 | } |
| 1126 | } |
| 1127 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1128 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1129 | public override bool Equals(object other) { |
| 1130 | return Equals(other as ReservedNames); |
| 1131 | } |
| 1132 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1133 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1134 | public bool Equals(ReservedNames other) { |
| 1135 | if (ReferenceEquals(other, null)) { |
| 1136 | return false; |
| 1137 | } |
| 1138 | if (ReferenceEquals(other, this)) { |
| 1139 | return true; |
| 1140 | } |
| 1141 | if (Types_ != other.Types_) return false; |
| 1142 | if (Descriptor_ != other.Descriptor_) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1143 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1144 | } |
| 1145 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1146 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1147 | public override int GetHashCode() { |
| 1148 | int hash = 1; |
| 1149 | if (Types_ != 0) hash ^= Types_.GetHashCode(); |
| 1150 | if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1151 | if (_unknownFields != null) { |
| 1152 | hash ^= _unknownFields.GetHashCode(); |
| 1153 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1154 | return hash; |
| 1155 | } |
| 1156 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1157 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1158 | public override string ToString() { |
| 1159 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1160 | } |
| 1161 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1162 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1163 | public void WriteTo(pb::CodedOutputStream output) { |
| 1164 | if (Types_ != 0) { |
| 1165 | output.WriteRawTag(8); |
| 1166 | output.WriteInt32(Types_); |
| 1167 | } |
| 1168 | if (Descriptor_ != 0) { |
| 1169 | output.WriteRawTag(16); |
| 1170 | output.WriteInt32(Descriptor_); |
| 1171 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1172 | if (_unknownFields != null) { |
| 1173 | _unknownFields.WriteTo(output); |
| 1174 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1175 | } |
| 1176 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1177 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1178 | public int CalculateSize() { |
| 1179 | int size = 0; |
| 1180 | if (Types_ != 0) { |
| 1181 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_); |
| 1182 | } |
| 1183 | if (Descriptor_ != 0) { |
| 1184 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_); |
| 1185 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1186 | if (_unknownFields != null) { |
| 1187 | size += _unknownFields.CalculateSize(); |
| 1188 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1189 | return size; |
| 1190 | } |
| 1191 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1192 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1193 | public void MergeFrom(ReservedNames other) { |
| 1194 | if (other == null) { |
| 1195 | return; |
| 1196 | } |
| 1197 | if (other.Types_ != 0) { |
| 1198 | Types_ = other.Types_; |
| 1199 | } |
| 1200 | if (other.Descriptor_ != 0) { |
| 1201 | Descriptor_ = other.Descriptor_; |
| 1202 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1203 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1204 | } |
| 1205 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1207 | public void MergeFrom(pb::CodedInputStream input) { |
| 1208 | uint tag; |
| 1209 | while ((tag = input.ReadTag()) != 0) { |
| 1210 | switch(tag) { |
| 1211 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1212 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1213 | break; |
| 1214 | case 8: { |
| 1215 | Types_ = input.ReadInt32(); |
| 1216 | break; |
| 1217 | } |
| 1218 | case 16: { |
| 1219 | Descriptor_ = input.ReadInt32(); |
| 1220 | break; |
| 1221 | } |
| 1222 | } |
| 1223 | } |
| 1224 | } |
| 1225 | |
| 1226 | #region Nested types |
| 1227 | /// <summary>Container for nested types declared in the ReservedNames message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1228 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1229 | public static partial class Types { |
| 1230 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1231 | /// Force a nested type called Types |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1232 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1233 | public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType> { |
| 1234 | private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1235 | private pb::UnknownFieldSet _unknownFields; |
| 1236 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1237 | public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } } |
| 1238 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1239 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1240 | public static pbr::MessageDescriptor Descriptor { |
| 1241 | get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; } |
| 1242 | } |
| 1243 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1245 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1246 | get { return Descriptor; } |
| 1247 | } |
| 1248 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1249 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1250 | public SomeNestedType() { |
| 1251 | OnConstruction(); |
| 1252 | } |
| 1253 | |
| 1254 | partial void OnConstruction(); |
| 1255 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1256 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1257 | public SomeNestedType(SomeNestedType other) : this() { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1258 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1259 | } |
| 1260 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1261 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1262 | public SomeNestedType Clone() { |
| 1263 | return new SomeNestedType(this); |
| 1264 | } |
| 1265 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1266 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1267 | public override bool Equals(object other) { |
| 1268 | return Equals(other as SomeNestedType); |
| 1269 | } |
| 1270 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1271 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1272 | public bool Equals(SomeNestedType other) { |
| 1273 | if (ReferenceEquals(other, null)) { |
| 1274 | return false; |
| 1275 | } |
| 1276 | if (ReferenceEquals(other, this)) { |
| 1277 | return true; |
| 1278 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1279 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1280 | } |
| 1281 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1283 | public override int GetHashCode() { |
| 1284 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1285 | if (_unknownFields != null) { |
| 1286 | hash ^= _unknownFields.GetHashCode(); |
| 1287 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1288 | return hash; |
| 1289 | } |
| 1290 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1291 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1292 | public override string ToString() { |
| 1293 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1294 | } |
| 1295 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1296 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1297 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1298 | if (_unknownFields != null) { |
| 1299 | _unknownFields.WriteTo(output); |
| 1300 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1301 | } |
| 1302 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1304 | public int CalculateSize() { |
| 1305 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1306 | if (_unknownFields != null) { |
| 1307 | size += _unknownFields.CalculateSize(); |
| 1308 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1309 | return size; |
| 1310 | } |
| 1311 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1312 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1313 | public void MergeFrom(SomeNestedType other) { |
| 1314 | if (other == null) { |
| 1315 | return; |
| 1316 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1317 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1318 | } |
| 1319 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1320 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1321 | public void MergeFrom(pb::CodedInputStream input) { |
| 1322 | uint tag; |
| 1323 | while ((tag = input.ReadTag()) != 0) { |
| 1324 | switch(tag) { |
| 1325 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1326 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1327 | break; |
| 1328 | } |
| 1329 | } |
| 1330 | } |
| 1331 | |
| 1332 | } |
| 1333 | |
| 1334 | } |
| 1335 | #endregion |
| 1336 | |
| 1337 | } |
| 1338 | |
| 1339 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1340 | /// These fields are deliberately not declared in numeric |
| 1341 | /// order, and the oneof fields aren't contiguous either. |
| 1342 | /// This allows for reasonably robust tests of JSON output |
| 1343 | /// ordering. |
| 1344 | /// TestFieldOrderings in unittest_proto3.proto is similar, |
| 1345 | /// but doesn't include oneofs. |
| 1346 | /// TODO: Consider adding oneofs to TestFieldOrderings, although |
| 1347 | /// that will require fixing other tests in multiple platforms. |
| 1348 | /// Alternatively, consider just adding this to |
| 1349 | /// unittest_proto3.proto if multiple platforms want it. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1350 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1351 | public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering> { |
| 1352 | private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1353 | private pb::UnknownFieldSet _unknownFields; |
| 1354 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1355 | public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } } |
| 1356 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1357 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1358 | public static pbr::MessageDescriptor Descriptor { |
| 1359 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[6]; } |
| 1360 | } |
| 1361 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1362 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1363 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1364 | get { return Descriptor; } |
| 1365 | } |
| 1366 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1367 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1368 | public TestJsonFieldOrdering() { |
| 1369 | OnConstruction(); |
| 1370 | } |
| 1371 | |
| 1372 | partial void OnConstruction(); |
| 1373 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1374 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1375 | public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() { |
| 1376 | plainInt32_ = other.plainInt32_; |
| 1377 | plainString_ = other.plainString_; |
| 1378 | switch (other.O1Case) { |
| 1379 | case O1OneofCase.O1String: |
| 1380 | O1String = other.O1String; |
| 1381 | break; |
| 1382 | case O1OneofCase.O1Int32: |
| 1383 | O1Int32 = other.O1Int32; |
| 1384 | break; |
| 1385 | } |
| 1386 | |
| 1387 | switch (other.O2Case) { |
| 1388 | case O2OneofCase.O2Int32: |
| 1389 | O2Int32 = other.O2Int32; |
| 1390 | break; |
| 1391 | case O2OneofCase.O2String: |
| 1392 | O2String = other.O2String; |
| 1393 | break; |
| 1394 | } |
| 1395 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1396 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1397 | } |
| 1398 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1399 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1400 | public TestJsonFieldOrdering Clone() { |
| 1401 | return new TestJsonFieldOrdering(this); |
| 1402 | } |
| 1403 | |
| 1404 | /// <summary>Field number for the "plain_int32" field.</summary> |
| 1405 | public const int PlainInt32FieldNumber = 4; |
| 1406 | private int plainInt32_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1407 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1408 | public int PlainInt32 { |
| 1409 | get { return plainInt32_; } |
| 1410 | set { |
| 1411 | plainInt32_ = value; |
| 1412 | } |
| 1413 | } |
| 1414 | |
| 1415 | /// <summary>Field number for the "o1_string" field.</summary> |
| 1416 | public const int O1StringFieldNumber = 2; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1417 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1418 | public string O1String { |
| 1419 | get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; } |
| 1420 | set { |
| 1421 | o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1422 | o1Case_ = O1OneofCase.O1String; |
| 1423 | } |
| 1424 | } |
| 1425 | |
| 1426 | /// <summary>Field number for the "o1_int32" field.</summary> |
| 1427 | public const int O1Int32FieldNumber = 5; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1428 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1429 | public int O1Int32 { |
| 1430 | get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; } |
| 1431 | set { |
| 1432 | o1_ = value; |
| 1433 | o1Case_ = O1OneofCase.O1Int32; |
| 1434 | } |
| 1435 | } |
| 1436 | |
| 1437 | /// <summary>Field number for the "plain_string" field.</summary> |
| 1438 | public const int PlainStringFieldNumber = 1; |
| 1439 | private string plainString_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1440 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1441 | public string PlainString { |
| 1442 | get { return plainString_; } |
| 1443 | set { |
| 1444 | plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1445 | } |
| 1446 | } |
| 1447 | |
| 1448 | /// <summary>Field number for the "o2_int32" field.</summary> |
| 1449 | public const int O2Int32FieldNumber = 6; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1450 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1451 | public int O2Int32 { |
| 1452 | get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; } |
| 1453 | set { |
| 1454 | o2_ = value; |
| 1455 | o2Case_ = O2OneofCase.O2Int32; |
| 1456 | } |
| 1457 | } |
| 1458 | |
| 1459 | /// <summary>Field number for the "o2_string" field.</summary> |
| 1460 | public const int O2StringFieldNumber = 3; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1461 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1462 | public string O2String { |
| 1463 | get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; } |
| 1464 | set { |
| 1465 | o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1466 | o2Case_ = O2OneofCase.O2String; |
| 1467 | } |
| 1468 | } |
| 1469 | |
| 1470 | private object o1_; |
| 1471 | /// <summary>Enum of possible cases for the "o1" oneof.</summary> |
| 1472 | public enum O1OneofCase { |
| 1473 | None = 0, |
| 1474 | O1String = 2, |
| 1475 | O1Int32 = 5, |
| 1476 | } |
| 1477 | private O1OneofCase o1Case_ = O1OneofCase.None; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1478 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1479 | public O1OneofCase O1Case { |
| 1480 | get { return o1Case_; } |
| 1481 | } |
| 1482 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1483 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1484 | public void ClearO1() { |
| 1485 | o1Case_ = O1OneofCase.None; |
| 1486 | o1_ = null; |
| 1487 | } |
| 1488 | |
| 1489 | private object o2_; |
| 1490 | /// <summary>Enum of possible cases for the "o2" oneof.</summary> |
| 1491 | public enum O2OneofCase { |
| 1492 | None = 0, |
| 1493 | O2Int32 = 6, |
| 1494 | O2String = 3, |
| 1495 | } |
| 1496 | private O2OneofCase o2Case_ = O2OneofCase.None; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1497 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1498 | public O2OneofCase O2Case { |
| 1499 | get { return o2Case_; } |
| 1500 | } |
| 1501 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1502 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1503 | public void ClearO2() { |
| 1504 | o2Case_ = O2OneofCase.None; |
| 1505 | o2_ = null; |
| 1506 | } |
| 1507 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1508 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1509 | public override bool Equals(object other) { |
| 1510 | return Equals(other as TestJsonFieldOrdering); |
| 1511 | } |
| 1512 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1513 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1514 | public bool Equals(TestJsonFieldOrdering other) { |
| 1515 | if (ReferenceEquals(other, null)) { |
| 1516 | return false; |
| 1517 | } |
| 1518 | if (ReferenceEquals(other, this)) { |
| 1519 | return true; |
| 1520 | } |
| 1521 | if (PlainInt32 != other.PlainInt32) return false; |
| 1522 | if (O1String != other.O1String) return false; |
| 1523 | if (O1Int32 != other.O1Int32) return false; |
| 1524 | if (PlainString != other.PlainString) return false; |
| 1525 | if (O2Int32 != other.O2Int32) return false; |
| 1526 | if (O2String != other.O2String) return false; |
| 1527 | if (O1Case != other.O1Case) return false; |
| 1528 | if (O2Case != other.O2Case) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1529 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1530 | } |
| 1531 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1532 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1533 | public override int GetHashCode() { |
| 1534 | int hash = 1; |
| 1535 | if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode(); |
| 1536 | if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode(); |
| 1537 | if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode(); |
| 1538 | if (PlainString.Length != 0) hash ^= PlainString.GetHashCode(); |
| 1539 | if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode(); |
| 1540 | if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode(); |
| 1541 | hash ^= (int) o1Case_; |
| 1542 | hash ^= (int) o2Case_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1543 | if (_unknownFields != null) { |
| 1544 | hash ^= _unknownFields.GetHashCode(); |
| 1545 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1546 | return hash; |
| 1547 | } |
| 1548 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1549 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1550 | public override string ToString() { |
| 1551 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1552 | } |
| 1553 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1554 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1555 | public void WriteTo(pb::CodedOutputStream output) { |
| 1556 | if (PlainString.Length != 0) { |
| 1557 | output.WriteRawTag(10); |
| 1558 | output.WriteString(PlainString); |
| 1559 | } |
| 1560 | if (o1Case_ == O1OneofCase.O1String) { |
| 1561 | output.WriteRawTag(18); |
| 1562 | output.WriteString(O1String); |
| 1563 | } |
| 1564 | if (o2Case_ == O2OneofCase.O2String) { |
| 1565 | output.WriteRawTag(26); |
| 1566 | output.WriteString(O2String); |
| 1567 | } |
| 1568 | if (PlainInt32 != 0) { |
| 1569 | output.WriteRawTag(32); |
| 1570 | output.WriteInt32(PlainInt32); |
| 1571 | } |
| 1572 | if (o1Case_ == O1OneofCase.O1Int32) { |
| 1573 | output.WriteRawTag(40); |
| 1574 | output.WriteInt32(O1Int32); |
| 1575 | } |
| 1576 | if (o2Case_ == O2OneofCase.O2Int32) { |
| 1577 | output.WriteRawTag(48); |
| 1578 | output.WriteInt32(O2Int32); |
| 1579 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1580 | if (_unknownFields != null) { |
| 1581 | _unknownFields.WriteTo(output); |
| 1582 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1583 | } |
| 1584 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1585 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1586 | public int CalculateSize() { |
| 1587 | int size = 0; |
| 1588 | if (PlainInt32 != 0) { |
| 1589 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32); |
| 1590 | } |
| 1591 | if (o1Case_ == O1OneofCase.O1String) { |
| 1592 | size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String); |
| 1593 | } |
| 1594 | if (o1Case_ == O1OneofCase.O1Int32) { |
| 1595 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32); |
| 1596 | } |
| 1597 | if (PlainString.Length != 0) { |
| 1598 | size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString); |
| 1599 | } |
| 1600 | if (o2Case_ == O2OneofCase.O2Int32) { |
| 1601 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32); |
| 1602 | } |
| 1603 | if (o2Case_ == O2OneofCase.O2String) { |
| 1604 | size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String); |
| 1605 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1606 | if (_unknownFields != null) { |
| 1607 | size += _unknownFields.CalculateSize(); |
| 1608 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1609 | return size; |
| 1610 | } |
| 1611 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1612 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1613 | public void MergeFrom(TestJsonFieldOrdering other) { |
| 1614 | if (other == null) { |
| 1615 | return; |
| 1616 | } |
| 1617 | if (other.PlainInt32 != 0) { |
| 1618 | PlainInt32 = other.PlainInt32; |
| 1619 | } |
| 1620 | if (other.PlainString.Length != 0) { |
| 1621 | PlainString = other.PlainString; |
| 1622 | } |
| 1623 | switch (other.O1Case) { |
| 1624 | case O1OneofCase.O1String: |
| 1625 | O1String = other.O1String; |
| 1626 | break; |
| 1627 | case O1OneofCase.O1Int32: |
| 1628 | O1Int32 = other.O1Int32; |
| 1629 | break; |
| 1630 | } |
| 1631 | |
| 1632 | switch (other.O2Case) { |
| 1633 | case O2OneofCase.O2Int32: |
| 1634 | O2Int32 = other.O2Int32; |
| 1635 | break; |
| 1636 | case O2OneofCase.O2String: |
| 1637 | O2String = other.O2String; |
| 1638 | break; |
| 1639 | } |
| 1640 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1641 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1642 | } |
| 1643 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1644 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1645 | public void MergeFrom(pb::CodedInputStream input) { |
| 1646 | uint tag; |
| 1647 | while ((tag = input.ReadTag()) != 0) { |
| 1648 | switch(tag) { |
| 1649 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1650 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1651 | break; |
| 1652 | case 10: { |
| 1653 | PlainString = input.ReadString(); |
| 1654 | break; |
| 1655 | } |
| 1656 | case 18: { |
| 1657 | O1String = input.ReadString(); |
| 1658 | break; |
| 1659 | } |
| 1660 | case 26: { |
| 1661 | O2String = input.ReadString(); |
| 1662 | break; |
| 1663 | } |
| 1664 | case 32: { |
| 1665 | PlainInt32 = input.ReadInt32(); |
| 1666 | break; |
| 1667 | } |
| 1668 | case 40: { |
| 1669 | O1Int32 = input.ReadInt32(); |
| 1670 | break; |
| 1671 | } |
| 1672 | case 48: { |
| 1673 | O2Int32 = input.ReadInt32(); |
| 1674 | break; |
| 1675 | } |
| 1676 | } |
| 1677 | } |
| 1678 | } |
| 1679 | |
| 1680 | } |
| 1681 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1682 | public sealed partial class TestJsonName : pb::IMessage<TestJsonName> { |
| 1683 | private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName()); |
| 1684 | private pb::UnknownFieldSet _unknownFields; |
| 1685 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1686 | public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } } |
| 1687 | |
| 1688 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1689 | public static pbr::MessageDescriptor Descriptor { |
| 1690 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[7]; } |
| 1691 | } |
| 1692 | |
| 1693 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1694 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1695 | get { return Descriptor; } |
| 1696 | } |
| 1697 | |
| 1698 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1699 | public TestJsonName() { |
| 1700 | OnConstruction(); |
| 1701 | } |
| 1702 | |
| 1703 | partial void OnConstruction(); |
| 1704 | |
| 1705 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1706 | public TestJsonName(TestJsonName other) : this() { |
| 1707 | name_ = other.name_; |
| 1708 | description_ = other.description_; |
| 1709 | guid_ = other.guid_; |
| 1710 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 1711 | } |
| 1712 | |
| 1713 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1714 | public TestJsonName Clone() { |
| 1715 | return new TestJsonName(this); |
| 1716 | } |
| 1717 | |
| 1718 | /// <summary>Field number for the "name" field.</summary> |
| 1719 | public const int NameFieldNumber = 1; |
| 1720 | private string name_ = ""; |
| 1721 | /// <summary> |
| 1722 | /// Message for testing the effects for of the json_name option |
| 1723 | /// </summary> |
| 1724 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1725 | public string Name { |
| 1726 | get { return name_; } |
| 1727 | set { |
| 1728 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1729 | } |
| 1730 | } |
| 1731 | |
| 1732 | /// <summary>Field number for the "description" field.</summary> |
| 1733 | public const int DescriptionFieldNumber = 2; |
| 1734 | private string description_ = ""; |
| 1735 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1736 | public string Description { |
| 1737 | get { return description_; } |
| 1738 | set { |
| 1739 | description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1740 | } |
| 1741 | } |
| 1742 | |
| 1743 | /// <summary>Field number for the "guid" field.</summary> |
| 1744 | public const int GuidFieldNumber = 3; |
| 1745 | private string guid_ = ""; |
| 1746 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1747 | public string Guid { |
| 1748 | get { return guid_; } |
| 1749 | set { |
| 1750 | guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1751 | } |
| 1752 | } |
| 1753 | |
| 1754 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1755 | public override bool Equals(object other) { |
| 1756 | return Equals(other as TestJsonName); |
| 1757 | } |
| 1758 | |
| 1759 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1760 | public bool Equals(TestJsonName other) { |
| 1761 | if (ReferenceEquals(other, null)) { |
| 1762 | return false; |
| 1763 | } |
| 1764 | if (ReferenceEquals(other, this)) { |
| 1765 | return true; |
| 1766 | } |
| 1767 | if (Name != other.Name) return false; |
| 1768 | if (Description != other.Description) return false; |
| 1769 | if (Guid != other.Guid) return false; |
| 1770 | return Equals(_unknownFields, other._unknownFields); |
| 1771 | } |
| 1772 | |
| 1773 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1774 | public override int GetHashCode() { |
| 1775 | int hash = 1; |
| 1776 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1777 | if (Description.Length != 0) hash ^= Description.GetHashCode(); |
| 1778 | if (Guid.Length != 0) hash ^= Guid.GetHashCode(); |
| 1779 | if (_unknownFields != null) { |
| 1780 | hash ^= _unknownFields.GetHashCode(); |
| 1781 | } |
| 1782 | return hash; |
| 1783 | } |
| 1784 | |
| 1785 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1786 | public override string ToString() { |
| 1787 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1788 | } |
| 1789 | |
| 1790 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1791 | public void WriteTo(pb::CodedOutputStream output) { |
| 1792 | if (Name.Length != 0) { |
| 1793 | output.WriteRawTag(10); |
| 1794 | output.WriteString(Name); |
| 1795 | } |
| 1796 | if (Description.Length != 0) { |
| 1797 | output.WriteRawTag(18); |
| 1798 | output.WriteString(Description); |
| 1799 | } |
| 1800 | if (Guid.Length != 0) { |
| 1801 | output.WriteRawTag(26); |
| 1802 | output.WriteString(Guid); |
| 1803 | } |
| 1804 | if (_unknownFields != null) { |
| 1805 | _unknownFields.WriteTo(output); |
| 1806 | } |
| 1807 | } |
| 1808 | |
| 1809 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1810 | public int CalculateSize() { |
| 1811 | int size = 0; |
| 1812 | if (Name.Length != 0) { |
| 1813 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1814 | } |
| 1815 | if (Description.Length != 0) { |
| 1816 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); |
| 1817 | } |
| 1818 | if (Guid.Length != 0) { |
| 1819 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid); |
| 1820 | } |
| 1821 | if (_unknownFields != null) { |
| 1822 | size += _unknownFields.CalculateSize(); |
| 1823 | } |
| 1824 | return size; |
| 1825 | } |
| 1826 | |
| 1827 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1828 | public void MergeFrom(TestJsonName other) { |
| 1829 | if (other == null) { |
| 1830 | return; |
| 1831 | } |
| 1832 | if (other.Name.Length != 0) { |
| 1833 | Name = other.Name; |
| 1834 | } |
| 1835 | if (other.Description.Length != 0) { |
| 1836 | Description = other.Description; |
| 1837 | } |
| 1838 | if (other.Guid.Length != 0) { |
| 1839 | Guid = other.Guid; |
| 1840 | } |
| 1841 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 1842 | } |
| 1843 | |
| 1844 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1845 | public void MergeFrom(pb::CodedInputStream input) { |
| 1846 | uint tag; |
| 1847 | while ((tag = input.ReadTag()) != 0) { |
| 1848 | switch(tag) { |
| 1849 | default: |
| 1850 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 1851 | break; |
| 1852 | case 10: { |
| 1853 | Name = input.ReadString(); |
| 1854 | break; |
| 1855 | } |
| 1856 | case 18: { |
| 1857 | Description = input.ReadString(); |
| 1858 | break; |
| 1859 | } |
| 1860 | case 26: { |
| 1861 | Guid = input.ReadString(); |
| 1862 | break; |
| 1863 | } |
| 1864 | } |
| 1865 | } |
| 1866 | } |
| 1867 | |
| 1868 | } |
| 1869 | |
| 1870 | /// <summary> |
| 1871 | /// Issue 3200: When merging two messages which use the same |
| 1872 | /// oneof case, which is itself a message type, the submessages should |
| 1873 | /// be merged. |
| 1874 | /// </summary> |
| 1875 | public sealed partial class OneofMerging : pb::IMessage<OneofMerging> { |
| 1876 | private static readonly pb::MessageParser<OneofMerging> _parser = new pb::MessageParser<OneofMerging>(() => new OneofMerging()); |
| 1877 | private pb::UnknownFieldSet _unknownFields; |
| 1878 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1879 | public static pb::MessageParser<OneofMerging> Parser { get { return _parser; } } |
| 1880 | |
| 1881 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1882 | public static pbr::MessageDescriptor Descriptor { |
| 1883 | get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[8]; } |
| 1884 | } |
| 1885 | |
| 1886 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1887 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1888 | get { return Descriptor; } |
| 1889 | } |
| 1890 | |
| 1891 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1892 | public OneofMerging() { |
| 1893 | OnConstruction(); |
| 1894 | } |
| 1895 | |
| 1896 | partial void OnConstruction(); |
| 1897 | |
| 1898 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1899 | public OneofMerging(OneofMerging other) : this() { |
| 1900 | switch (other.ValueCase) { |
| 1901 | case ValueOneofCase.Text: |
| 1902 | Text = other.Text; |
| 1903 | break; |
| 1904 | case ValueOneofCase.Nested: |
| 1905 | Nested = other.Nested.Clone(); |
| 1906 | break; |
| 1907 | } |
| 1908 | |
| 1909 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 1910 | } |
| 1911 | |
| 1912 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1913 | public OneofMerging Clone() { |
| 1914 | return new OneofMerging(this); |
| 1915 | } |
| 1916 | |
| 1917 | /// <summary>Field number for the "text" field.</summary> |
| 1918 | public const int TextFieldNumber = 1; |
| 1919 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1920 | public string Text { |
| 1921 | get { return valueCase_ == ValueOneofCase.Text ? (string) value_ : ""; } |
| 1922 | set { |
| 1923 | value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1924 | valueCase_ = ValueOneofCase.Text; |
| 1925 | } |
| 1926 | } |
| 1927 | |
| 1928 | /// <summary>Field number for the "nested" field.</summary> |
| 1929 | public const int NestedFieldNumber = 2; |
| 1930 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1931 | public global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested Nested { |
| 1932 | get { return valueCase_ == ValueOneofCase.Nested ? (global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested) value_ : null; } |
| 1933 | set { |
| 1934 | value_ = value; |
| 1935 | valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Nested; |
| 1936 | } |
| 1937 | } |
| 1938 | |
| 1939 | private object value_; |
| 1940 | /// <summary>Enum of possible cases for the "value" oneof.</summary> |
| 1941 | public enum ValueOneofCase { |
| 1942 | None = 0, |
| 1943 | Text = 1, |
| 1944 | Nested = 2, |
| 1945 | } |
| 1946 | private ValueOneofCase valueCase_ = ValueOneofCase.None; |
| 1947 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1948 | public ValueOneofCase ValueCase { |
| 1949 | get { return valueCase_; } |
| 1950 | } |
| 1951 | |
| 1952 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1953 | public void ClearValue() { |
| 1954 | valueCase_ = ValueOneofCase.None; |
| 1955 | value_ = null; |
| 1956 | } |
| 1957 | |
| 1958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1959 | public override bool Equals(object other) { |
| 1960 | return Equals(other as OneofMerging); |
| 1961 | } |
| 1962 | |
| 1963 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1964 | public bool Equals(OneofMerging other) { |
| 1965 | if (ReferenceEquals(other, null)) { |
| 1966 | return false; |
| 1967 | } |
| 1968 | if (ReferenceEquals(other, this)) { |
| 1969 | return true; |
| 1970 | } |
| 1971 | if (Text != other.Text) return false; |
| 1972 | if (!object.Equals(Nested, other.Nested)) return false; |
| 1973 | if (ValueCase != other.ValueCase) return false; |
| 1974 | return Equals(_unknownFields, other._unknownFields); |
| 1975 | } |
| 1976 | |
| 1977 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1978 | public override int GetHashCode() { |
| 1979 | int hash = 1; |
| 1980 | if (valueCase_ == ValueOneofCase.Text) hash ^= Text.GetHashCode(); |
| 1981 | if (valueCase_ == ValueOneofCase.Nested) hash ^= Nested.GetHashCode(); |
| 1982 | hash ^= (int) valueCase_; |
| 1983 | if (_unknownFields != null) { |
| 1984 | hash ^= _unknownFields.GetHashCode(); |
| 1985 | } |
| 1986 | return hash; |
| 1987 | } |
| 1988 | |
| 1989 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1990 | public override string ToString() { |
| 1991 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1992 | } |
| 1993 | |
| 1994 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1995 | public void WriteTo(pb::CodedOutputStream output) { |
| 1996 | if (valueCase_ == ValueOneofCase.Text) { |
| 1997 | output.WriteRawTag(10); |
| 1998 | output.WriteString(Text); |
| 1999 | } |
| 2000 | if (valueCase_ == ValueOneofCase.Nested) { |
| 2001 | output.WriteRawTag(18); |
| 2002 | output.WriteMessage(Nested); |
| 2003 | } |
| 2004 | if (_unknownFields != null) { |
| 2005 | _unknownFields.WriteTo(output); |
| 2006 | } |
| 2007 | } |
| 2008 | |
| 2009 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2010 | public int CalculateSize() { |
| 2011 | int size = 0; |
| 2012 | if (valueCase_ == ValueOneofCase.Text) { |
| 2013 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); |
| 2014 | } |
| 2015 | if (valueCase_ == ValueOneofCase.Nested) { |
| 2016 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nested); |
| 2017 | } |
| 2018 | if (_unknownFields != null) { |
| 2019 | size += _unknownFields.CalculateSize(); |
| 2020 | } |
| 2021 | return size; |
| 2022 | } |
| 2023 | |
| 2024 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2025 | public void MergeFrom(OneofMerging other) { |
| 2026 | if (other == null) { |
| 2027 | return; |
| 2028 | } |
| 2029 | switch (other.ValueCase) { |
| 2030 | case ValueOneofCase.Text: |
| 2031 | Text = other.Text; |
| 2032 | break; |
| 2033 | case ValueOneofCase.Nested: |
| 2034 | if (Nested == null) { |
| 2035 | Nested = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested(); |
| 2036 | } |
| 2037 | Nested.MergeFrom(other.Nested); |
| 2038 | break; |
| 2039 | } |
| 2040 | |
| 2041 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 2042 | } |
| 2043 | |
| 2044 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2045 | public void MergeFrom(pb::CodedInputStream input) { |
| 2046 | uint tag; |
| 2047 | while ((tag = input.ReadTag()) != 0) { |
| 2048 | switch(tag) { |
| 2049 | default: |
| 2050 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 2051 | break; |
| 2052 | case 10: { |
| 2053 | Text = input.ReadString(); |
| 2054 | break; |
| 2055 | } |
| 2056 | case 18: { |
| 2057 | global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested(); |
| 2058 | if (valueCase_ == ValueOneofCase.Nested) { |
| 2059 | subBuilder.MergeFrom(Nested); |
| 2060 | } |
| 2061 | input.ReadMessage(subBuilder); |
| 2062 | Nested = subBuilder; |
| 2063 | break; |
| 2064 | } |
| 2065 | } |
| 2066 | } |
| 2067 | } |
| 2068 | |
| 2069 | #region Nested types |
| 2070 | /// <summary>Container for nested types declared in the OneofMerging message type.</summary> |
| 2071 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2072 | public static partial class Types { |
| 2073 | public sealed partial class Nested : pb::IMessage<Nested> { |
| 2074 | private static readonly pb::MessageParser<Nested> _parser = new pb::MessageParser<Nested>(() => new Nested()); |
| 2075 | private pb::UnknownFieldSet _unknownFields; |
| 2076 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2077 | public static pb::MessageParser<Nested> Parser { get { return _parser; } } |
| 2078 | |
| 2079 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2080 | public static pbr::MessageDescriptor Descriptor { |
| 2081 | get { return global::UnitTest.Issues.TestProtos.OneofMerging.Descriptor.NestedTypes[0]; } |
| 2082 | } |
| 2083 | |
| 2084 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2085 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2086 | get { return Descriptor; } |
| 2087 | } |
| 2088 | |
| 2089 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2090 | public Nested() { |
| 2091 | OnConstruction(); |
| 2092 | } |
| 2093 | |
| 2094 | partial void OnConstruction(); |
| 2095 | |
| 2096 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2097 | public Nested(Nested other) : this() { |
| 2098 | x_ = other.x_; |
| 2099 | y_ = other.y_; |
| 2100 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 2101 | } |
| 2102 | |
| 2103 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2104 | public Nested Clone() { |
| 2105 | return new Nested(this); |
| 2106 | } |
| 2107 | |
| 2108 | /// <summary>Field number for the "x" field.</summary> |
| 2109 | public const int XFieldNumber = 1; |
| 2110 | private int x_; |
| 2111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2112 | public int X { |
| 2113 | get { return x_; } |
| 2114 | set { |
| 2115 | x_ = value; |
| 2116 | } |
| 2117 | } |
| 2118 | |
| 2119 | /// <summary>Field number for the "y" field.</summary> |
| 2120 | public const int YFieldNumber = 2; |
| 2121 | private int y_; |
| 2122 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2123 | public int Y { |
| 2124 | get { return y_; } |
| 2125 | set { |
| 2126 | y_ = value; |
| 2127 | } |
| 2128 | } |
| 2129 | |
| 2130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2131 | public override bool Equals(object other) { |
| 2132 | return Equals(other as Nested); |
| 2133 | } |
| 2134 | |
| 2135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2136 | public bool Equals(Nested other) { |
| 2137 | if (ReferenceEquals(other, null)) { |
| 2138 | return false; |
| 2139 | } |
| 2140 | if (ReferenceEquals(other, this)) { |
| 2141 | return true; |
| 2142 | } |
| 2143 | if (X != other.X) return false; |
| 2144 | if (Y != other.Y) return false; |
| 2145 | return Equals(_unknownFields, other._unknownFields); |
| 2146 | } |
| 2147 | |
| 2148 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2149 | public override int GetHashCode() { |
| 2150 | int hash = 1; |
| 2151 | if (X != 0) hash ^= X.GetHashCode(); |
| 2152 | if (Y != 0) hash ^= Y.GetHashCode(); |
| 2153 | if (_unknownFields != null) { |
| 2154 | hash ^= _unknownFields.GetHashCode(); |
| 2155 | } |
| 2156 | return hash; |
| 2157 | } |
| 2158 | |
| 2159 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2160 | public override string ToString() { |
| 2161 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2162 | } |
| 2163 | |
| 2164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2165 | public void WriteTo(pb::CodedOutputStream output) { |
| 2166 | if (X != 0) { |
| 2167 | output.WriteRawTag(8); |
| 2168 | output.WriteInt32(X); |
| 2169 | } |
| 2170 | if (Y != 0) { |
| 2171 | output.WriteRawTag(16); |
| 2172 | output.WriteInt32(Y); |
| 2173 | } |
| 2174 | if (_unknownFields != null) { |
| 2175 | _unknownFields.WriteTo(output); |
| 2176 | } |
| 2177 | } |
| 2178 | |
| 2179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2180 | public int CalculateSize() { |
| 2181 | int size = 0; |
| 2182 | if (X != 0) { |
| 2183 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(X); |
| 2184 | } |
| 2185 | if (Y != 0) { |
| 2186 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y); |
| 2187 | } |
| 2188 | if (_unknownFields != null) { |
| 2189 | size += _unknownFields.CalculateSize(); |
| 2190 | } |
| 2191 | return size; |
| 2192 | } |
| 2193 | |
| 2194 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2195 | public void MergeFrom(Nested other) { |
| 2196 | if (other == null) { |
| 2197 | return; |
| 2198 | } |
| 2199 | if (other.X != 0) { |
| 2200 | X = other.X; |
| 2201 | } |
| 2202 | if (other.Y != 0) { |
| 2203 | Y = other.Y; |
| 2204 | } |
| 2205 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 2206 | } |
| 2207 | |
| 2208 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2209 | public void MergeFrom(pb::CodedInputStream input) { |
| 2210 | uint tag; |
| 2211 | while ((tag = input.ReadTag()) != 0) { |
| 2212 | switch(tag) { |
| 2213 | default: |
| 2214 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 2215 | break; |
| 2216 | case 8: { |
| 2217 | X = input.ReadInt32(); |
| 2218 | break; |
| 2219 | } |
| 2220 | case 16: { |
| 2221 | Y = input.ReadInt32(); |
| 2222 | break; |
| 2223 | } |
| 2224 | } |
| 2225 | } |
| 2226 | } |
| 2227 | |
| 2228 | } |
| 2229 | |
| 2230 | } |
| 2231 | #endregion |
| 2232 | |
| 2233 | } |
| 2234 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2235 | #endregion |
| 2236 | |
| 2237 | } |
| 2238 | |
| 2239 | #endregion Designer generated code |