1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: unittest_import.proto 4 // </auto-generated> 5 #pragma warning disable 1591, 0612, 3021 6 #region Designer generated code 7 8 using pb = global::Google.Protobuf; 9 using pbc = global::Google.Protobuf.Collections; 10 using pbr = global::Google.Protobuf.Reflection; 11 using scg = global::System.Collections.Generic; 12 namespace Google.Protobuf.TestProtos.Proto2 { 13 14 /// <summary>Holder for reflection information generated from unittest_import.proto</summary> 15 public static partial class UnittestImportReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for 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 "ChV1bml0dGVzdF9pbXBvcnQucHJvdG8SH3Byb3RvYnVmX3VuaXR0ZXN0X2lt", 28 "cG9ydF9wcm90bzIaHHVuaXR0ZXN0X2ltcG9ydF9wdWJsaWMucHJvdG8iGgoN", 29 "SW1wb3J0TWVzc2FnZRIJCgFkGAEgASgFKjwKCkltcG9ydEVudW0SDgoKSU1Q", 30 "T1JUX0ZPTxAHEg4KCklNUE9SVF9CQVIQCBIOCgpJTVBPUlRfQkFaEAkqMQoQ", 31 "SW1wb3J0RW51bUZvck1hcBILCgdVTktOT1dOEAASBwoDRk9PEAESBwoDQkFS", 32 "EAJCKUgB+AEBqgIhR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3MuUHJvdG8y", 33 "UAA=")); 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 public sealed partial class ImportMessage : pb::IMessage<ImportMessage> 63 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 64 , pb::IBufferMessage 65 #endif 66 { 67 private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage()); 68 private pb::UnknownFieldSet _unknownFields; 69 private int _hasBits0; 70 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 71 public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } } 72 73 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 74 public static pbr::MessageDescriptor Descriptor { 75 get { return global::Google.Protobuf.TestProtos.Proto2.UnittestImportReflection.Descriptor.MessageTypes[0]; } 76 } 77 78 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 79 pbr::MessageDescriptor pb::IMessage.Descriptor { 80 get { return Descriptor; } 81 } 82 83 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ImportMessage()84 public ImportMessage() { 85 OnConstruction(); 86 } 87 OnConstruction()88 partial void OnConstruction(); 89 90 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ImportMessage(ImportMessage other)91 public ImportMessage(ImportMessage other) : this() { 92 _hasBits0 = other._hasBits0; 93 d_ = other.d_; 94 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 95 } 96 97 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()98 public ImportMessage Clone() { 99 return new ImportMessage(this); 100 } 101 102 /// <summary>Field number for the "d" field.</summary> 103 public const int DFieldNumber = 1; 104 private readonly static int DDefaultValue = 0; 105 106 private int d_; 107 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 108 public int D { 109 get { if ((_hasBits0 & 1) != 0) { return d_; } else { return DDefaultValue; } } 110 set { 111 _hasBits0 |= 1; 112 d_ = value; 113 } 114 } 115 /// <summary>Gets whether the "d" field is set</summary> 116 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 117 public bool HasD { 118 get { return (_hasBits0 & 1) != 0; } 119 } 120 /// <summary>Clears the value of the "d" field</summary> 121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ClearD()122 public void ClearD() { 123 _hasBits0 &= ~1; 124 } 125 126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)127 public override bool Equals(object other) { 128 return Equals(other as ImportMessage); 129 } 130 131 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(ImportMessage other)132 public bool Equals(ImportMessage other) { 133 if (ReferenceEquals(other, null)) { 134 return false; 135 } 136 if (ReferenceEquals(other, this)) { 137 return true; 138 } 139 if (D != other.D) return false; 140 return Equals(_unknownFields, other._unknownFields); 141 } 142 143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()144 public override int GetHashCode() { 145 int hash = 1; 146 if (HasD) hash ^= D.GetHashCode(); 147 if (_unknownFields != null) { 148 hash ^= _unknownFields.GetHashCode(); 149 } 150 return hash; 151 } 152 153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()154 public override string ToString() { 155 return pb::JsonFormatter.ToDiagnosticString(this); 156 } 157 158 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)159 public void WriteTo(pb::CodedOutputStream output) { 160 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 161 output.WriteRawMessage(this); 162 #else 163 if (HasD) { 164 output.WriteRawTag(8); 165 output.WriteInt32(D); 166 } 167 if (_unknownFields != null) { 168 _unknownFields.WriteTo(output); 169 } 170 #endif 171 } 172 173 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 174 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)175 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 176 if (HasD) { 177 output.WriteRawTag(8); 178 output.WriteInt32(D); 179 } 180 if (_unknownFields != null) { 181 _unknownFields.WriteTo(ref output); 182 } 183 } 184 #endif 185 186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()187 public int CalculateSize() { 188 int size = 0; 189 if (HasD) { 190 size += 1 + pb::CodedOutputStream.ComputeInt32Size(D); 191 } 192 if (_unknownFields != null) { 193 size += _unknownFields.CalculateSize(); 194 } 195 return size; 196 } 197 198 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(ImportMessage other)199 public void MergeFrom(ImportMessage other) { 200 if (other == null) { 201 return; 202 } 203 if (other.HasD) { 204 D = other.D; 205 } 206 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 207 } 208 209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)210 public void MergeFrom(pb::CodedInputStream input) { 211 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 212 input.ReadRawMessage(this); 213 #else 214 uint tag; 215 while ((tag = input.ReadTag()) != 0) { 216 switch(tag) { 217 default: 218 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 219 break; 220 case 8: { 221 D = input.ReadInt32(); 222 break; 223 } 224 } 225 } 226 #endif 227 } 228 229 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 230 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)231 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 232 uint tag; 233 while ((tag = input.ReadTag()) != 0) { 234 switch(tag) { 235 default: 236 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 237 break; 238 case 8: { 239 D = input.ReadInt32(); 240 break; 241 } 242 } 243 } 244 } 245 #endif 246 247 } 248 249 #endregion 250 251 } 252 253 #endregion Designer generated code 254