1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: csharp/protos/unittest_import.proto 4 // </auto-generated> 5 #pragma warning disable 1591, 0612, 3021, 8981 6 #region Designer generated code 7 8 using pb = global::Google.Protobuf; 9 using pbc = global::Google.Protobuf.Collections; 10 using pbr = global::Google.Protobuf.Reflection; 11 using scg = global::System.Collections.Generic; 12 namespace Google.Protobuf.TestProtos.Proto2 { 13 14 /// <summary>Holder for reflection information generated from csharp/protos/unittest_import.proto</summary> 15 public static partial class UnittestImportReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for csharp/protos/unittest_import.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 UnittestImportReflection()24 static UnittestImportReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "CiNjc2hhcnAvcHJvdG9zL3VuaXR0ZXN0X2ltcG9ydC5wcm90bxIfcHJvdG9i", 28 "dWZfdW5pdHRlc3RfaW1wb3J0X3Byb3RvMhoqY3NoYXJwL3Byb3Rvcy91bml0", 29 "dGVzdF9pbXBvcnRfcHVibGljLnByb3RvIhoKDUltcG9ydE1lc3NhZ2USCQoB", 30 "ZBgBIAEoBSo8CgpJbXBvcnRFbnVtEg4KCklNUE9SVF9GT08QBxIOCgpJTVBP", 31 "UlRfQkFSEAgSDgoKSU1QT1JUX0JBWhAJKjEKEEltcG9ydEVudW1Gb3JNYXAS", 32 "CwoHVU5LTk9XThAAEgcKA0ZPTxABEgcKA0JBUhACQilIAfgBAaoCIUdvb2ds", 33 "ZS5Qcm90b2J1Zi5UZXN0UHJvdG9zLlByb3RvMlAA")); 34 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 35 new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.Proto2.UnittestImportPublicReflection.Descriptor, }, 36 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.Proto2.ImportEnum), typeof(global::Google.Protobuf.TestProtos.Proto2.ImportEnumForMap), }, null, new pbr::GeneratedClrTypeInfo[] { 37 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.ImportMessage), global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser, new[]{ "D" }, null, null, null, null) 38 })); 39 } 40 #endregion 41 42 } 43 #region Enums 44 public enum ImportEnum { 45 [pbr::OriginalName("IMPORT_FOO")] ImportFoo = 7, 46 [pbr::OriginalName("IMPORT_BAR")] ImportBar = 8, 47 [pbr::OriginalName("IMPORT_BAZ")] ImportBaz = 9, 48 } 49 50 /// <summary> 51 /// To use an enum in a map, it must has the first value as 0. 52 /// </summary> 53 public enum ImportEnumForMap { 54 [pbr::OriginalName("UNKNOWN")] Unknown = 0, 55 [pbr::OriginalName("FOO")] Foo = 1, 56 [pbr::OriginalName("BAR")] Bar = 2, 57 } 58 59 #endregion 60 61 #region Messages 62 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 63 public sealed partial class ImportMessage : pb::IMessage<ImportMessage> 64 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 65 , pb::IBufferMessage 66 #endif 67 { 68 private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage()); 69 private pb::UnknownFieldSet _unknownFields; 70 private int _hasBits0; 71 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 72 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 73 public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } } 74 75 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 76 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 77 public static pbr::MessageDescriptor Descriptor { 78 get { return global::Google.Protobuf.TestProtos.Proto2.UnittestImportReflection.Descriptor.MessageTypes[0]; } 79 } 80 81 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 82 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 83 pbr::MessageDescriptor pb::IMessage.Descriptor { 84 get { return Descriptor; } 85 } 86 87 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 88 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ImportMessage()89 public ImportMessage() { 90 OnConstruction(); 91 } 92 OnConstruction()93 partial void OnConstruction(); 94 95 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 96 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ImportMessage(ImportMessage other)97 public ImportMessage(ImportMessage other) : this() { 98 _hasBits0 = other._hasBits0; 99 d_ = other.d_; 100 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 101 } 102 103 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 104 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()105 public ImportMessage Clone() { 106 return new ImportMessage(this); 107 } 108 109 /// <summary>Field number for the "d" field.</summary> 110 public const int DFieldNumber = 1; 111 private readonly static int DDefaultValue = 0; 112 113 private int d_; 114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 115 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 116 public int D { 117 get { if ((_hasBits0 & 1) != 0) { return d_; } else { return DDefaultValue; } } 118 set { 119 _hasBits0 |= 1; 120 d_ = value; 121 } 122 } 123 /// <summary>Gets whether the "d" field is set</summary> 124 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 125 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 126 public bool HasD { 127 get { return (_hasBits0 & 1) != 0; } 128 } 129 /// <summary>Clears the value of the "d" field</summary> 130 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 131 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearD()132 public void ClearD() { 133 _hasBits0 &= ~1; 134 } 135 136 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 137 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)138 public override bool Equals(object other) { 139 return Equals(other as ImportMessage); 140 } 141 142 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 143 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(ImportMessage other)144 public bool Equals(ImportMessage other) { 145 if (ReferenceEquals(other, null)) { 146 return false; 147 } 148 if (ReferenceEquals(other, this)) { 149 return true; 150 } 151 if (D != other.D) return false; 152 return Equals(_unknownFields, other._unknownFields); 153 } 154 155 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 156 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()157 public override int GetHashCode() { 158 int hash = 1; 159 if (HasD) hash ^= D.GetHashCode(); 160 if (_unknownFields != null) { 161 hash ^= _unknownFields.GetHashCode(); 162 } 163 return hash; 164 } 165 166 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 167 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()168 public override string ToString() { 169 return pb::JsonFormatter.ToDiagnosticString(this); 170 } 171 172 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 173 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)174 public void WriteTo(pb::CodedOutputStream output) { 175 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 176 output.WriteRawMessage(this); 177 #else 178 if (HasD) { 179 output.WriteRawTag(8); 180 output.WriteInt32(D); 181 } 182 if (_unknownFields != null) { 183 _unknownFields.WriteTo(output); 184 } 185 #endif 186 } 187 188 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 189 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 190 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)191 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 192 if (HasD) { 193 output.WriteRawTag(8); 194 output.WriteInt32(D); 195 } 196 if (_unknownFields != null) { 197 _unknownFields.WriteTo(ref output); 198 } 199 } 200 #endif 201 202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 203 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()204 public int CalculateSize() { 205 int size = 0; 206 if (HasD) { 207 size += 1 + pb::CodedOutputStream.ComputeInt32Size(D); 208 } 209 if (_unknownFields != null) { 210 size += _unknownFields.CalculateSize(); 211 } 212 return size; 213 } 214 215 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 216 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(ImportMessage other)217 public void MergeFrom(ImportMessage other) { 218 if (other == null) { 219 return; 220 } 221 if (other.HasD) { 222 D = other.D; 223 } 224 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 225 } 226 227 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 228 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)229 public void MergeFrom(pb::CodedInputStream input) { 230 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 231 input.ReadRawMessage(this); 232 #else 233 uint tag; 234 while ((tag = input.ReadTag()) != 0) { 235 if ((tag & 7) == 4) { 236 // Abort on any end group tag. 237 return; 238 } 239 switch(tag) { 240 default: 241 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 242 break; 243 case 8: { 244 D = input.ReadInt32(); 245 break; 246 } 247 } 248 } 249 #endif 250 } 251 252 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 253 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 254 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)255 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 256 uint tag; 257 while ((tag = input.ReadTag()) != 0) { 258 if ((tag & 7) == 4) { 259 // Abort on any end group tag. 260 return; 261 } 262 switch(tag) { 263 default: 264 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 265 break; 266 case 8: { 267 D = input.ReadInt32(); 268 break; 269 } 270 } 271 } 272 } 273 #endif 274 275 } 276 277 #endregion 278 279 } 280 281 #endregion Designer generated code 282