1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: google/protobuf/type.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.WellKnownTypes { 13 14 /// <summary>Holder for reflection information generated from google/protobuf/type.proto</summary> 15 public static partial class TypeReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for google/protobuf/type.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 TypeReflection()24 static TypeReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVm", 28 "Ghlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvGiRnb29nbGUvcHJvdG9idWYv", 29 "c291cmNlX2NvbnRleHQucHJvdG8i6AEKBFR5cGUSDAoEbmFtZRgBIAEoCRIm", 30 "CgZmaWVsZHMYAiADKAsyFi5nb29nbGUucHJvdG9idWYuRmllbGQSDgoGb25l", 31 "b2ZzGAMgAygJEigKB29wdGlvbnMYBCADKAsyFy5nb29nbGUucHJvdG9idWYu", 32 "T3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3Rv", 33 "YnVmLlNvdXJjZUNvbnRleHQSJwoGc3ludGF4GAYgASgOMhcuZ29vZ2xlLnBy", 34 "b3RvYnVmLlN5bnRheBIPCgdlZGl0aW9uGAcgASgJItUFCgVGaWVsZBIpCgRr", 35 "aW5kGAEgASgOMhsuZ29vZ2xlLnByb3RvYnVmLkZpZWxkLktpbmQSNwoLY2Fy", 36 "ZGluYWxpdHkYAiABKA4yIi5nb29nbGUucHJvdG9idWYuRmllbGQuQ2FyZGlu", 37 "YWxpdHkSDgoGbnVtYmVyGAMgASgFEgwKBG5hbWUYBCABKAkSEAoIdHlwZV91", 38 "cmwYBiABKAkSEwoLb25lb2ZfaW5kZXgYByABKAUSDgoGcGFja2VkGAggASgI", 39 "EigKB29wdGlvbnMYCSADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEhEK", 40 "CWpzb25fbmFtZRgKIAEoCRIVCg1kZWZhdWx0X3ZhbHVlGAsgASgJIsgCCgRL", 41 "aW5kEhAKDFRZUEVfVU5LTk9XThAAEg8KC1RZUEVfRE9VQkxFEAESDgoKVFlQ", 42 "RV9GTE9BVBACEg4KClRZUEVfSU5UNjQQAxIPCgtUWVBFX1VJTlQ2NBAEEg4K", 43 "ClRZUEVfSU5UMzIQBRIQCgxUWVBFX0ZJWEVENjQQBhIQCgxUWVBFX0ZJWEVE", 44 "MzIQBxINCglUWVBFX0JPT0wQCBIPCgtUWVBFX1NUUklORxAJEg4KClRZUEVf", 45 "R1JPVVAQChIQCgxUWVBFX01FU1NBR0UQCxIOCgpUWVBFX0JZVEVTEAwSDwoL", 46 "VFlQRV9VSU5UMzIQDRINCglUWVBFX0VOVU0QDhIRCg1UWVBFX1NGSVhFRDMy", 47 "EA8SEQoNVFlQRV9TRklYRUQ2NBAQEg8KC1RZUEVfU0lOVDMyEBESDwoLVFlQ", 48 "RV9TSU5UNjQQEiJ0CgtDYXJkaW5hbGl0eRIXChNDQVJESU5BTElUWV9VTktO", 49 "T1dOEAASGAoUQ0FSRElOQUxJVFlfT1BUSU9OQUwQARIYChRDQVJESU5BTElU", 50 "WV9SRVFVSVJFRBACEhgKFENBUkRJTkFMSVRZX1JFUEVBVEVEEAMi3wEKBEVu", 51 "dW0SDAoEbmFtZRgBIAEoCRItCgllbnVtdmFsdWUYAiADKAsyGi5nb29nbGUu", 52 "cHJvdG9idWYuRW51bVZhbHVlEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUu", 53 "cHJvdG9idWYuT3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAQgASgLMh4uZ29v", 54 "Z2xlLnByb3RvYnVmLlNvdXJjZUNvbnRleHQSJwoGc3ludGF4GAUgASgOMhcu", 55 "Z29vZ2xlLnByb3RvYnVmLlN5bnRheBIPCgdlZGl0aW9uGAYgASgJIlMKCUVu", 56 "dW1WYWx1ZRIMCgRuYW1lGAEgASgJEg4KBm51bWJlchgCIAEoBRIoCgdvcHRp", 57 "b25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbiI7CgZPcHRpb24S", 58 "DAoEbmFtZRgBIAEoCRIjCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5wcm90b2J1", 59 "Zi5BbnkqQwoGU3ludGF4EhEKDVNZTlRBWF9QUk9UTzIQABIRCg1TWU5UQVhf", 60 "UFJPVE8zEAESEwoPU1lOVEFYX0VESVRJT05TEAJCewoTY29tLmdvb2dsZS5w", 61 "cm90b2J1ZkIJVHlwZVByb3RvUAFaLWdvb2dsZS5nb2xhbmcub3JnL3Byb3Rv", 62 "YnVmL3R5cGVzL2tub3duL3R5cGVwYvgBAaICA0dQQqoCHkdvb2dsZS5Qcm90", 63 "b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z")); 64 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 65 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, }, 66 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.Syntax), }, null, new pbr::GeneratedClrTypeInfo[] { 67 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Type), global::Google.Protobuf.WellKnownTypes.Type.Parser, new[]{ "Name", "Fields", "Oneofs", "Options", "SourceContext", "Syntax", "Edition" }, null, null, null, null), 68 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Field), global::Google.Protobuf.WellKnownTypes.Field.Parser, new[]{ "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options", "JsonName", "DefaultValue" }, null, new[]{ typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) }, null, null), 69 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Enum), global::Google.Protobuf.WellKnownTypes.Enum.Parser, new[]{ "Name", "Enumvalue", "Options", "SourceContext", "Syntax", "Edition" }, null, null, null, null), 70 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.EnumValue), global::Google.Protobuf.WellKnownTypes.EnumValue.Parser, new[]{ "Name", "Number", "Options" }, null, null, null, null), 71 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Option), global::Google.Protobuf.WellKnownTypes.Option.Parser, new[]{ "Name", "Value" }, null, null, null, null) 72 })); 73 } 74 #endregion 75 76 } 77 #region Enums 78 /// <summary> 79 /// The syntax in which a protocol buffer element is defined. 80 /// </summary> 81 public enum Syntax { 82 /// <summary> 83 /// Syntax `proto2`. 84 /// </summary> 85 [pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0, 86 /// <summary> 87 /// Syntax `proto3`. 88 /// </summary> 89 [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, 90 /// <summary> 91 /// Syntax `editions`. 92 /// </summary> 93 [pbr::OriginalName("SYNTAX_EDITIONS")] Editions = 2, 94 } 95 96 #endregion 97 98 #region Messages 99 /// <summary> 100 /// A protocol buffer message type. 101 /// </summary> 102 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 103 public sealed partial class Type : pb::IMessage<Type> 104 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 105 , pb::IBufferMessage 106 #endif 107 { 108 private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type()); 109 private pb::UnknownFieldSet _unknownFields; 110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 111 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 112 public static pb::MessageParser<Type> Parser { get { return _parser; } } 113 114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 115 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 116 public static pbr::MessageDescriptor Descriptor { 117 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[0]; } 118 } 119 120 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 121 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 122 pbr::MessageDescriptor pb::IMessage.Descriptor { 123 get { return Descriptor; } 124 } 125 126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 127 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Type()128 public Type() { 129 OnConstruction(); 130 } 131 OnConstruction()132 partial void OnConstruction(); 133 134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 135 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Type(Type other)136 public Type(Type other) : this() { 137 name_ = other.name_; 138 fields_ = other.fields_.Clone(); 139 oneofs_ = other.oneofs_.Clone(); 140 options_ = other.options_.Clone(); 141 sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; 142 syntax_ = other.syntax_; 143 edition_ = other.edition_; 144 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 145 } 146 147 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 148 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()149 public Type Clone() { 150 return new Type(this); 151 } 152 153 /// <summary>Field number for the "name" field.</summary> 154 public const int NameFieldNumber = 1; 155 private string name_ = ""; 156 /// <summary> 157 /// The fully qualified message name. 158 /// </summary> 159 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 160 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 161 public string Name { 162 get { return name_; } 163 set { 164 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 165 } 166 } 167 168 /// <summary>Field number for the "fields" field.</summary> 169 public const int FieldsFieldNumber = 2; 170 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fields_codec 171 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser); 172 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field>(); 173 /// <summary> 174 /// The list of fields. 175 /// </summary> 176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 177 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 178 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fields { 179 get { return fields_; } 180 } 181 182 /// <summary>Field number for the "oneofs" field.</summary> 183 public const int OneofsFieldNumber = 3; 184 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec 185 = pb::FieldCodec.ForString(26); 186 private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField<string>(); 187 /// <summary> 188 /// The list of types appearing in `oneof` definitions in this type. 189 /// </summary> 190 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 191 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 192 public pbc::RepeatedField<string> Oneofs { 193 get { return oneofs_; } 194 } 195 196 /// <summary>Field number for the "options" field.</summary> 197 public const int OptionsFieldNumber = 4; 198 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 199 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser); 200 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 201 /// <summary> 202 /// The protocol buffer options. 203 /// </summary> 204 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 205 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 206 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 207 get { return options_; } 208 } 209 210 /// <summary>Field number for the "source_context" field.</summary> 211 public const int SourceContextFieldNumber = 5; 212 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; 213 /// <summary> 214 /// The source context. 215 /// </summary> 216 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 217 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 218 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { 219 get { return sourceContext_; } 220 set { 221 sourceContext_ = value; 222 } 223 } 224 225 /// <summary>Field number for the "syntax" field.</summary> 226 public const int SyntaxFieldNumber = 6; 227 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; 228 /// <summary> 229 /// The source syntax. 230 /// </summary> 231 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 232 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 233 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { 234 get { return syntax_; } 235 set { 236 syntax_ = value; 237 } 238 } 239 240 /// <summary>Field number for the "edition" field.</summary> 241 public const int EditionFieldNumber = 7; 242 private string edition_ = ""; 243 /// <summary> 244 /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. 245 /// </summary> 246 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 247 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 248 public string Edition { 249 get { return edition_; } 250 set { 251 edition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 252 } 253 } 254 255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 256 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)257 public override bool Equals(object other) { 258 return Equals(other as Type); 259 } 260 261 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 262 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Type other)263 public bool Equals(Type other) { 264 if (ReferenceEquals(other, null)) { 265 return false; 266 } 267 if (ReferenceEquals(other, this)) { 268 return true; 269 } 270 if (Name != other.Name) return false; 271 if(!fields_.Equals(other.fields_)) return false; 272 if(!oneofs_.Equals(other.oneofs_)) return false; 273 if(!options_.Equals(other.options_)) return false; 274 if (!object.Equals(SourceContext, other.SourceContext)) return false; 275 if (Syntax != other.Syntax) return false; 276 if (Edition != other.Edition) return false; 277 return Equals(_unknownFields, other._unknownFields); 278 } 279 280 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 281 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()282 public override int GetHashCode() { 283 int hash = 1; 284 if (Name.Length != 0) hash ^= Name.GetHashCode(); 285 hash ^= fields_.GetHashCode(); 286 hash ^= oneofs_.GetHashCode(); 287 hash ^= options_.GetHashCode(); 288 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); 289 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); 290 if (Edition.Length != 0) hash ^= Edition.GetHashCode(); 291 if (_unknownFields != null) { 292 hash ^= _unknownFields.GetHashCode(); 293 } 294 return hash; 295 } 296 297 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 298 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()299 public override string ToString() { 300 return pb::JsonFormatter.ToDiagnosticString(this); 301 } 302 303 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 304 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)305 public void WriteTo(pb::CodedOutputStream output) { 306 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 307 output.WriteRawMessage(this); 308 #else 309 if (Name.Length != 0) { 310 output.WriteRawTag(10); 311 output.WriteString(Name); 312 } 313 fields_.WriteTo(output, _repeated_fields_codec); 314 oneofs_.WriteTo(output, _repeated_oneofs_codec); 315 options_.WriteTo(output, _repeated_options_codec); 316 if (sourceContext_ != null) { 317 output.WriteRawTag(42); 318 output.WriteMessage(SourceContext); 319 } 320 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 321 output.WriteRawTag(48); 322 output.WriteEnum((int) Syntax); 323 } 324 if (Edition.Length != 0) { 325 output.WriteRawTag(58); 326 output.WriteString(Edition); 327 } 328 if (_unknownFields != null) { 329 _unknownFields.WriteTo(output); 330 } 331 #endif 332 } 333 334 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 335 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 336 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)337 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 338 if (Name.Length != 0) { 339 output.WriteRawTag(10); 340 output.WriteString(Name); 341 } 342 fields_.WriteTo(ref output, _repeated_fields_codec); 343 oneofs_.WriteTo(ref output, _repeated_oneofs_codec); 344 options_.WriteTo(ref output, _repeated_options_codec); 345 if (sourceContext_ != null) { 346 output.WriteRawTag(42); 347 output.WriteMessage(SourceContext); 348 } 349 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 350 output.WriteRawTag(48); 351 output.WriteEnum((int) Syntax); 352 } 353 if (Edition.Length != 0) { 354 output.WriteRawTag(58); 355 output.WriteString(Edition); 356 } 357 if (_unknownFields != null) { 358 _unknownFields.WriteTo(ref output); 359 } 360 } 361 #endif 362 363 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 364 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()365 public int CalculateSize() { 366 int size = 0; 367 if (Name.Length != 0) { 368 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 369 } 370 size += fields_.CalculateSize(_repeated_fields_codec); 371 size += oneofs_.CalculateSize(_repeated_oneofs_codec); 372 size += options_.CalculateSize(_repeated_options_codec); 373 if (sourceContext_ != null) { 374 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); 375 } 376 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 377 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); 378 } 379 if (Edition.Length != 0) { 380 size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); 381 } 382 if (_unknownFields != null) { 383 size += _unknownFields.CalculateSize(); 384 } 385 return size; 386 } 387 388 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 389 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Type other)390 public void MergeFrom(Type other) { 391 if (other == null) { 392 return; 393 } 394 if (other.Name.Length != 0) { 395 Name = other.Name; 396 } 397 fields_.Add(other.fields_); 398 oneofs_.Add(other.oneofs_); 399 options_.Add(other.options_); 400 if (other.sourceContext_ != null) { 401 if (sourceContext_ == null) { 402 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 403 } 404 SourceContext.MergeFrom(other.SourceContext); 405 } 406 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 407 Syntax = other.Syntax; 408 } 409 if (other.Edition.Length != 0) { 410 Edition = other.Edition; 411 } 412 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 413 } 414 415 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 416 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)417 public void MergeFrom(pb::CodedInputStream input) { 418 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 419 input.ReadRawMessage(this); 420 #else 421 uint tag; 422 while ((tag = input.ReadTag()) != 0) { 423 if ((tag & 7) == 4) { 424 // Abort on any end group tag. 425 return; 426 } 427 switch(tag) { 428 default: 429 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 430 break; 431 case 10: { 432 Name = input.ReadString(); 433 break; 434 } 435 case 18: { 436 fields_.AddEntriesFrom(input, _repeated_fields_codec); 437 break; 438 } 439 case 26: { 440 oneofs_.AddEntriesFrom(input, _repeated_oneofs_codec); 441 break; 442 } 443 case 34: { 444 options_.AddEntriesFrom(input, _repeated_options_codec); 445 break; 446 } 447 case 42: { 448 if (sourceContext_ == null) { 449 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 450 } 451 input.ReadMessage(SourceContext); 452 break; 453 } 454 case 48: { 455 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 456 break; 457 } 458 case 58: { 459 Edition = input.ReadString(); 460 break; 461 } 462 } 463 } 464 #endif 465 } 466 467 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 468 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 469 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)470 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 471 uint tag; 472 while ((tag = input.ReadTag()) != 0) { 473 if ((tag & 7) == 4) { 474 // Abort on any end group tag. 475 return; 476 } 477 switch(tag) { 478 default: 479 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 480 break; 481 case 10: { 482 Name = input.ReadString(); 483 break; 484 } 485 case 18: { 486 fields_.AddEntriesFrom(ref input, _repeated_fields_codec); 487 break; 488 } 489 case 26: { 490 oneofs_.AddEntriesFrom(ref input, _repeated_oneofs_codec); 491 break; 492 } 493 case 34: { 494 options_.AddEntriesFrom(ref input, _repeated_options_codec); 495 break; 496 } 497 case 42: { 498 if (sourceContext_ == null) { 499 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 500 } 501 input.ReadMessage(SourceContext); 502 break; 503 } 504 case 48: { 505 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 506 break; 507 } 508 case 58: { 509 Edition = input.ReadString(); 510 break; 511 } 512 } 513 } 514 } 515 #endif 516 517 } 518 519 /// <summary> 520 /// A single field of a message type. 521 /// </summary> 522 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 523 public sealed partial class Field : pb::IMessage<Field> 524 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 525 , pb::IBufferMessage 526 #endif 527 { 528 private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field()); 529 private pb::UnknownFieldSet _unknownFields; 530 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 531 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 532 public static pb::MessageParser<Field> Parser { get { return _parser; } } 533 534 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 535 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 536 public static pbr::MessageDescriptor Descriptor { 537 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[1]; } 538 } 539 540 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 541 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 542 pbr::MessageDescriptor pb::IMessage.Descriptor { 543 get { return Descriptor; } 544 } 545 546 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 547 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Field()548 public Field() { 549 OnConstruction(); 550 } 551 OnConstruction()552 partial void OnConstruction(); 553 554 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 555 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Field(Field other)556 public Field(Field other) : this() { 557 kind_ = other.kind_; 558 cardinality_ = other.cardinality_; 559 number_ = other.number_; 560 name_ = other.name_; 561 typeUrl_ = other.typeUrl_; 562 oneofIndex_ = other.oneofIndex_; 563 packed_ = other.packed_; 564 options_ = other.options_.Clone(); 565 jsonName_ = other.jsonName_; 566 defaultValue_ = other.defaultValue_; 567 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 568 } 569 570 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 571 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()572 public Field Clone() { 573 return new Field(this); 574 } 575 576 /// <summary>Field number for the "kind" field.</summary> 577 public const int KindFieldNumber = 1; 578 private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown; 579 /// <summary> 580 /// The field type. 581 /// </summary> 582 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 583 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 584 public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { 585 get { return kind_; } 586 set { 587 kind_ = value; 588 } 589 } 590 591 /// <summary>Field number for the "cardinality" field.</summary> 592 public const int CardinalityFieldNumber = 2; 593 private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown; 594 /// <summary> 595 /// The field cardinality. 596 /// </summary> 597 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 598 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 599 public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { 600 get { return cardinality_; } 601 set { 602 cardinality_ = value; 603 } 604 } 605 606 /// <summary>Field number for the "number" field.</summary> 607 public const int NumberFieldNumber = 3; 608 private int number_; 609 /// <summary> 610 /// The field number. 611 /// </summary> 612 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 613 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 614 public int Number { 615 get { return number_; } 616 set { 617 number_ = value; 618 } 619 } 620 621 /// <summary>Field number for the "name" field.</summary> 622 public const int NameFieldNumber = 4; 623 private string name_ = ""; 624 /// <summary> 625 /// The field name. 626 /// </summary> 627 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 628 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 629 public string Name { 630 get { return name_; } 631 set { 632 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 633 } 634 } 635 636 /// <summary>Field number for the "type_url" field.</summary> 637 public const int TypeUrlFieldNumber = 6; 638 private string typeUrl_ = ""; 639 /// <summary> 640 /// The field type URL, without the scheme, for message or enumeration 641 /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. 642 /// </summary> 643 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 644 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 645 public string TypeUrl { 646 get { return typeUrl_; } 647 set { 648 typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 649 } 650 } 651 652 /// <summary>Field number for the "oneof_index" field.</summary> 653 public const int OneofIndexFieldNumber = 7; 654 private int oneofIndex_; 655 /// <summary> 656 /// The index of the field type in `Type.oneofs`, for message or enumeration 657 /// types. The first type has index 1; zero means the type is not in the list. 658 /// </summary> 659 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 660 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 661 public int OneofIndex { 662 get { return oneofIndex_; } 663 set { 664 oneofIndex_ = value; 665 } 666 } 667 668 /// <summary>Field number for the "packed" field.</summary> 669 public const int PackedFieldNumber = 8; 670 private bool packed_; 671 /// <summary> 672 /// Whether to use alternative packed wire representation. 673 /// </summary> 674 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 675 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 676 public bool Packed { 677 get { return packed_; } 678 set { 679 packed_ = value; 680 } 681 } 682 683 /// <summary>Field number for the "options" field.</summary> 684 public const int OptionsFieldNumber = 9; 685 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 686 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser); 687 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 688 /// <summary> 689 /// The protocol buffer options. 690 /// </summary> 691 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 692 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 693 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 694 get { return options_; } 695 } 696 697 /// <summary>Field number for the "json_name" field.</summary> 698 public const int JsonNameFieldNumber = 10; 699 private string jsonName_ = ""; 700 /// <summary> 701 /// The field JSON name. 702 /// </summary> 703 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 704 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 705 public string JsonName { 706 get { return jsonName_; } 707 set { 708 jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 709 } 710 } 711 712 /// <summary>Field number for the "default_value" field.</summary> 713 public const int DefaultValueFieldNumber = 11; 714 private string defaultValue_ = ""; 715 /// <summary> 716 /// The string value of the default value of this field. Proto2 syntax only. 717 /// </summary> 718 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 719 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 720 public string DefaultValue { 721 get { return defaultValue_; } 722 set { 723 defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 724 } 725 } 726 727 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 728 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)729 public override bool Equals(object other) { 730 return Equals(other as Field); 731 } 732 733 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 734 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Field other)735 public bool Equals(Field other) { 736 if (ReferenceEquals(other, null)) { 737 return false; 738 } 739 if (ReferenceEquals(other, this)) { 740 return true; 741 } 742 if (Kind != other.Kind) return false; 743 if (Cardinality != other.Cardinality) return false; 744 if (Number != other.Number) return false; 745 if (Name != other.Name) return false; 746 if (TypeUrl != other.TypeUrl) return false; 747 if (OneofIndex != other.OneofIndex) return false; 748 if (Packed != other.Packed) return false; 749 if(!options_.Equals(other.options_)) return false; 750 if (JsonName != other.JsonName) return false; 751 if (DefaultValue != other.DefaultValue) return false; 752 return Equals(_unknownFields, other._unknownFields); 753 } 754 755 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 756 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()757 public override int GetHashCode() { 758 int hash = 1; 759 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) hash ^= Kind.GetHashCode(); 760 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) hash ^= Cardinality.GetHashCode(); 761 if (Number != 0) hash ^= Number.GetHashCode(); 762 if (Name.Length != 0) hash ^= Name.GetHashCode(); 763 if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); 764 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); 765 if (Packed != false) hash ^= Packed.GetHashCode(); 766 hash ^= options_.GetHashCode(); 767 if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); 768 if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); 769 if (_unknownFields != null) { 770 hash ^= _unknownFields.GetHashCode(); 771 } 772 return hash; 773 } 774 775 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 776 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()777 public override string ToString() { 778 return pb::JsonFormatter.ToDiagnosticString(this); 779 } 780 781 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 782 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)783 public void WriteTo(pb::CodedOutputStream output) { 784 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 785 output.WriteRawMessage(this); 786 #else 787 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 788 output.WriteRawTag(8); 789 output.WriteEnum((int) Kind); 790 } 791 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 792 output.WriteRawTag(16); 793 output.WriteEnum((int) Cardinality); 794 } 795 if (Number != 0) { 796 output.WriteRawTag(24); 797 output.WriteInt32(Number); 798 } 799 if (Name.Length != 0) { 800 output.WriteRawTag(34); 801 output.WriteString(Name); 802 } 803 if (TypeUrl.Length != 0) { 804 output.WriteRawTag(50); 805 output.WriteString(TypeUrl); 806 } 807 if (OneofIndex != 0) { 808 output.WriteRawTag(56); 809 output.WriteInt32(OneofIndex); 810 } 811 if (Packed != false) { 812 output.WriteRawTag(64); 813 output.WriteBool(Packed); 814 } 815 options_.WriteTo(output, _repeated_options_codec); 816 if (JsonName.Length != 0) { 817 output.WriteRawTag(82); 818 output.WriteString(JsonName); 819 } 820 if (DefaultValue.Length != 0) { 821 output.WriteRawTag(90); 822 output.WriteString(DefaultValue); 823 } 824 if (_unknownFields != null) { 825 _unknownFields.WriteTo(output); 826 } 827 #endif 828 } 829 830 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 831 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 832 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)833 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 834 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 835 output.WriteRawTag(8); 836 output.WriteEnum((int) Kind); 837 } 838 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 839 output.WriteRawTag(16); 840 output.WriteEnum((int) Cardinality); 841 } 842 if (Number != 0) { 843 output.WriteRawTag(24); 844 output.WriteInt32(Number); 845 } 846 if (Name.Length != 0) { 847 output.WriteRawTag(34); 848 output.WriteString(Name); 849 } 850 if (TypeUrl.Length != 0) { 851 output.WriteRawTag(50); 852 output.WriteString(TypeUrl); 853 } 854 if (OneofIndex != 0) { 855 output.WriteRawTag(56); 856 output.WriteInt32(OneofIndex); 857 } 858 if (Packed != false) { 859 output.WriteRawTag(64); 860 output.WriteBool(Packed); 861 } 862 options_.WriteTo(ref output, _repeated_options_codec); 863 if (JsonName.Length != 0) { 864 output.WriteRawTag(82); 865 output.WriteString(JsonName); 866 } 867 if (DefaultValue.Length != 0) { 868 output.WriteRawTag(90); 869 output.WriteString(DefaultValue); 870 } 871 if (_unknownFields != null) { 872 _unknownFields.WriteTo(ref output); 873 } 874 } 875 #endif 876 877 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 878 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()879 public int CalculateSize() { 880 int size = 0; 881 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 882 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); 883 } 884 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 885 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); 886 } 887 if (Number != 0) { 888 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); 889 } 890 if (Name.Length != 0) { 891 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 892 } 893 if (TypeUrl.Length != 0) { 894 size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl); 895 } 896 if (OneofIndex != 0) { 897 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); 898 } 899 if (Packed != false) { 900 size += 1 + 1; 901 } 902 size += options_.CalculateSize(_repeated_options_codec); 903 if (JsonName.Length != 0) { 904 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); 905 } 906 if (DefaultValue.Length != 0) { 907 size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); 908 } 909 if (_unknownFields != null) { 910 size += _unknownFields.CalculateSize(); 911 } 912 return size; 913 } 914 915 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 916 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Field other)917 public void MergeFrom(Field other) { 918 if (other == null) { 919 return; 920 } 921 if (other.Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 922 Kind = other.Kind; 923 } 924 if (other.Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 925 Cardinality = other.Cardinality; 926 } 927 if (other.Number != 0) { 928 Number = other.Number; 929 } 930 if (other.Name.Length != 0) { 931 Name = other.Name; 932 } 933 if (other.TypeUrl.Length != 0) { 934 TypeUrl = other.TypeUrl; 935 } 936 if (other.OneofIndex != 0) { 937 OneofIndex = other.OneofIndex; 938 } 939 if (other.Packed != false) { 940 Packed = other.Packed; 941 } 942 options_.Add(other.options_); 943 if (other.JsonName.Length != 0) { 944 JsonName = other.JsonName; 945 } 946 if (other.DefaultValue.Length != 0) { 947 DefaultValue = other.DefaultValue; 948 } 949 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 950 } 951 952 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 953 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)954 public void MergeFrom(pb::CodedInputStream input) { 955 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 956 input.ReadRawMessage(this); 957 #else 958 uint tag; 959 while ((tag = input.ReadTag()) != 0) { 960 if ((tag & 7) == 4) { 961 // Abort on any end group tag. 962 return; 963 } 964 switch(tag) { 965 default: 966 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 967 break; 968 case 8: { 969 Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); 970 break; 971 } 972 case 16: { 973 Cardinality = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); 974 break; 975 } 976 case 24: { 977 Number = input.ReadInt32(); 978 break; 979 } 980 case 34: { 981 Name = input.ReadString(); 982 break; 983 } 984 case 50: { 985 TypeUrl = input.ReadString(); 986 break; 987 } 988 case 56: { 989 OneofIndex = input.ReadInt32(); 990 break; 991 } 992 case 64: { 993 Packed = input.ReadBool(); 994 break; 995 } 996 case 74: { 997 options_.AddEntriesFrom(input, _repeated_options_codec); 998 break; 999 } 1000 case 82: { 1001 JsonName = input.ReadString(); 1002 break; 1003 } 1004 case 90: { 1005 DefaultValue = input.ReadString(); 1006 break; 1007 } 1008 } 1009 } 1010 #endif 1011 } 1012 1013 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1014 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1015 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1016 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1017 uint tag; 1018 while ((tag = input.ReadTag()) != 0) { 1019 if ((tag & 7) == 4) { 1020 // Abort on any end group tag. 1021 return; 1022 } 1023 switch(tag) { 1024 default: 1025 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1026 break; 1027 case 8: { 1028 Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); 1029 break; 1030 } 1031 case 16: { 1032 Cardinality = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); 1033 break; 1034 } 1035 case 24: { 1036 Number = input.ReadInt32(); 1037 break; 1038 } 1039 case 34: { 1040 Name = input.ReadString(); 1041 break; 1042 } 1043 case 50: { 1044 TypeUrl = input.ReadString(); 1045 break; 1046 } 1047 case 56: { 1048 OneofIndex = input.ReadInt32(); 1049 break; 1050 } 1051 case 64: { 1052 Packed = input.ReadBool(); 1053 break; 1054 } 1055 case 74: { 1056 options_.AddEntriesFrom(ref input, _repeated_options_codec); 1057 break; 1058 } 1059 case 82: { 1060 JsonName = input.ReadString(); 1061 break; 1062 } 1063 case 90: { 1064 DefaultValue = input.ReadString(); 1065 break; 1066 } 1067 } 1068 } 1069 } 1070 #endif 1071 1072 #region Nested types 1073 /// <summary>Container for nested types declared in the Field message type.</summary> 1074 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1075 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1076 public static partial class Types { 1077 /// <summary> 1078 /// Basic field types. 1079 /// </summary> 1080 public enum Kind { 1081 /// <summary> 1082 /// Field type unknown. 1083 /// </summary> 1084 [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, 1085 /// <summary> 1086 /// Field type double. 1087 /// </summary> 1088 [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, 1089 /// <summary> 1090 /// Field type float. 1091 /// </summary> 1092 [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, 1093 /// <summary> 1094 /// Field type int64. 1095 /// </summary> 1096 [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, 1097 /// <summary> 1098 /// Field type uint64. 1099 /// </summary> 1100 [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, 1101 /// <summary> 1102 /// Field type int32. 1103 /// </summary> 1104 [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, 1105 /// <summary> 1106 /// Field type fixed64. 1107 /// </summary> 1108 [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, 1109 /// <summary> 1110 /// Field type fixed32. 1111 /// </summary> 1112 [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, 1113 /// <summary> 1114 /// Field type bool. 1115 /// </summary> 1116 [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, 1117 /// <summary> 1118 /// Field type string. 1119 /// </summary> 1120 [pbr::OriginalName("TYPE_STRING")] TypeString = 9, 1121 /// <summary> 1122 /// Field type group. Proto2 syntax only, and deprecated. 1123 /// </summary> 1124 [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, 1125 /// <summary> 1126 /// Field type message. 1127 /// </summary> 1128 [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, 1129 /// <summary> 1130 /// Field type bytes. 1131 /// </summary> 1132 [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, 1133 /// <summary> 1134 /// Field type uint32. 1135 /// </summary> 1136 [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, 1137 /// <summary> 1138 /// Field type enum. 1139 /// </summary> 1140 [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, 1141 /// <summary> 1142 /// Field type sfixed32. 1143 /// </summary> 1144 [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, 1145 /// <summary> 1146 /// Field type sfixed64. 1147 /// </summary> 1148 [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, 1149 /// <summary> 1150 /// Field type sint32. 1151 /// </summary> 1152 [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, 1153 /// <summary> 1154 /// Field type sint64. 1155 /// </summary> 1156 [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, 1157 } 1158 1159 /// <summary> 1160 /// Whether a field is optional, required, or repeated. 1161 /// </summary> 1162 public enum Cardinality { 1163 /// <summary> 1164 /// For fields with unknown cardinality. 1165 /// </summary> 1166 [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, 1167 /// <summary> 1168 /// For optional fields. 1169 /// </summary> 1170 [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, 1171 /// <summary> 1172 /// For required fields. Proto2 syntax only. 1173 /// </summary> 1174 [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, 1175 /// <summary> 1176 /// For repeated fields. 1177 /// </summary> 1178 [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, 1179 } 1180 1181 } 1182 #endregion 1183 1184 } 1185 1186 /// <summary> 1187 /// Enum type definition. 1188 /// </summary> 1189 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 1190 public sealed partial class Enum : pb::IMessage<Enum> 1191 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1192 , pb::IBufferMessage 1193 #endif 1194 { 1195 private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum()); 1196 private pb::UnknownFieldSet _unknownFields; 1197 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1198 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1199 public static pb::MessageParser<Enum> Parser { get { return _parser; } } 1200 1201 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1202 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1203 public static pbr::MessageDescriptor Descriptor { 1204 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[2]; } 1205 } 1206 1207 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1208 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1209 pbr::MessageDescriptor pb::IMessage.Descriptor { 1210 get { return Descriptor; } 1211 } 1212 1213 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1214 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Enum()1215 public Enum() { 1216 OnConstruction(); 1217 } 1218 OnConstruction()1219 partial void OnConstruction(); 1220 1221 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1222 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Enum(Enum other)1223 public Enum(Enum other) : this() { 1224 name_ = other.name_; 1225 enumvalue_ = other.enumvalue_.Clone(); 1226 options_ = other.options_.Clone(); 1227 sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; 1228 syntax_ = other.syntax_; 1229 edition_ = other.edition_; 1230 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1231 } 1232 1233 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1234 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1235 public Enum Clone() { 1236 return new Enum(this); 1237 } 1238 1239 /// <summary>Field number for the "name" field.</summary> 1240 public const int NameFieldNumber = 1; 1241 private string name_ = ""; 1242 /// <summary> 1243 /// Enum type name. 1244 /// </summary> 1245 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1246 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1247 public string Name { 1248 get { return name_; } 1249 set { 1250 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1251 } 1252 } 1253 1254 /// <summary>Field number for the "enumvalue" field.</summary> 1255 public const int EnumvalueFieldNumber = 2; 1256 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated_enumvalue_codec 1257 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser); 1258 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>(); 1259 /// <summary> 1260 /// Enum value definitions. 1261 /// </summary> 1262 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1263 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1264 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> Enumvalue { 1265 get { return enumvalue_; } 1266 } 1267 1268 /// <summary>Field number for the "options" field.</summary> 1269 public const int OptionsFieldNumber = 3; 1270 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 1271 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); 1272 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 1273 /// <summary> 1274 /// Protocol buffer options. 1275 /// </summary> 1276 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1277 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1278 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 1279 get { return options_; } 1280 } 1281 1282 /// <summary>Field number for the "source_context" field.</summary> 1283 public const int SourceContextFieldNumber = 4; 1284 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; 1285 /// <summary> 1286 /// The source context. 1287 /// </summary> 1288 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1289 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1290 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { 1291 get { return sourceContext_; } 1292 set { 1293 sourceContext_ = value; 1294 } 1295 } 1296 1297 /// <summary>Field number for the "syntax" field.</summary> 1298 public const int SyntaxFieldNumber = 5; 1299 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; 1300 /// <summary> 1301 /// The source syntax. 1302 /// </summary> 1303 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1304 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1305 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { 1306 get { return syntax_; } 1307 set { 1308 syntax_ = value; 1309 } 1310 } 1311 1312 /// <summary>Field number for the "edition" field.</summary> 1313 public const int EditionFieldNumber = 6; 1314 private string edition_ = ""; 1315 /// <summary> 1316 /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. 1317 /// </summary> 1318 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1319 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1320 public string Edition { 1321 get { return edition_; } 1322 set { 1323 edition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1324 } 1325 } 1326 1327 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1328 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1329 public override bool Equals(object other) { 1330 return Equals(other as Enum); 1331 } 1332 1333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1334 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Enum other)1335 public bool Equals(Enum other) { 1336 if (ReferenceEquals(other, null)) { 1337 return false; 1338 } 1339 if (ReferenceEquals(other, this)) { 1340 return true; 1341 } 1342 if (Name != other.Name) return false; 1343 if(!enumvalue_.Equals(other.enumvalue_)) return false; 1344 if(!options_.Equals(other.options_)) return false; 1345 if (!object.Equals(SourceContext, other.SourceContext)) return false; 1346 if (Syntax != other.Syntax) return false; 1347 if (Edition != other.Edition) return false; 1348 return Equals(_unknownFields, other._unknownFields); 1349 } 1350 1351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1352 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1353 public override int GetHashCode() { 1354 int hash = 1; 1355 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1356 hash ^= enumvalue_.GetHashCode(); 1357 hash ^= options_.GetHashCode(); 1358 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); 1359 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); 1360 if (Edition.Length != 0) hash ^= Edition.GetHashCode(); 1361 if (_unknownFields != null) { 1362 hash ^= _unknownFields.GetHashCode(); 1363 } 1364 return hash; 1365 } 1366 1367 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1368 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1369 public override string ToString() { 1370 return pb::JsonFormatter.ToDiagnosticString(this); 1371 } 1372 1373 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1374 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1375 public void WriteTo(pb::CodedOutputStream output) { 1376 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1377 output.WriteRawMessage(this); 1378 #else 1379 if (Name.Length != 0) { 1380 output.WriteRawTag(10); 1381 output.WriteString(Name); 1382 } 1383 enumvalue_.WriteTo(output, _repeated_enumvalue_codec); 1384 options_.WriteTo(output, _repeated_options_codec); 1385 if (sourceContext_ != null) { 1386 output.WriteRawTag(34); 1387 output.WriteMessage(SourceContext); 1388 } 1389 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1390 output.WriteRawTag(40); 1391 output.WriteEnum((int) Syntax); 1392 } 1393 if (Edition.Length != 0) { 1394 output.WriteRawTag(50); 1395 output.WriteString(Edition); 1396 } 1397 if (_unknownFields != null) { 1398 _unknownFields.WriteTo(output); 1399 } 1400 #endif 1401 } 1402 1403 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1404 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1405 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1406 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1407 if (Name.Length != 0) { 1408 output.WriteRawTag(10); 1409 output.WriteString(Name); 1410 } 1411 enumvalue_.WriteTo(ref output, _repeated_enumvalue_codec); 1412 options_.WriteTo(ref output, _repeated_options_codec); 1413 if (sourceContext_ != null) { 1414 output.WriteRawTag(34); 1415 output.WriteMessage(SourceContext); 1416 } 1417 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1418 output.WriteRawTag(40); 1419 output.WriteEnum((int) Syntax); 1420 } 1421 if (Edition.Length != 0) { 1422 output.WriteRawTag(50); 1423 output.WriteString(Edition); 1424 } 1425 if (_unknownFields != null) { 1426 _unknownFields.WriteTo(ref output); 1427 } 1428 } 1429 #endif 1430 1431 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1432 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1433 public int CalculateSize() { 1434 int size = 0; 1435 if (Name.Length != 0) { 1436 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 1437 } 1438 size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); 1439 size += options_.CalculateSize(_repeated_options_codec); 1440 if (sourceContext_ != null) { 1441 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); 1442 } 1443 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1444 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); 1445 } 1446 if (Edition.Length != 0) { 1447 size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); 1448 } 1449 if (_unknownFields != null) { 1450 size += _unknownFields.CalculateSize(); 1451 } 1452 return size; 1453 } 1454 1455 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1456 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Enum other)1457 public void MergeFrom(Enum other) { 1458 if (other == null) { 1459 return; 1460 } 1461 if (other.Name.Length != 0) { 1462 Name = other.Name; 1463 } 1464 enumvalue_.Add(other.enumvalue_); 1465 options_.Add(other.options_); 1466 if (other.sourceContext_ != null) { 1467 if (sourceContext_ == null) { 1468 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 1469 } 1470 SourceContext.MergeFrom(other.SourceContext); 1471 } 1472 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1473 Syntax = other.Syntax; 1474 } 1475 if (other.Edition.Length != 0) { 1476 Edition = other.Edition; 1477 } 1478 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1479 } 1480 1481 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1482 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1483 public void MergeFrom(pb::CodedInputStream input) { 1484 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1485 input.ReadRawMessage(this); 1486 #else 1487 uint tag; 1488 while ((tag = input.ReadTag()) != 0) { 1489 if ((tag & 7) == 4) { 1490 // Abort on any end group tag. 1491 return; 1492 } 1493 switch(tag) { 1494 default: 1495 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1496 break; 1497 case 10: { 1498 Name = input.ReadString(); 1499 break; 1500 } 1501 case 18: { 1502 enumvalue_.AddEntriesFrom(input, _repeated_enumvalue_codec); 1503 break; 1504 } 1505 case 26: { 1506 options_.AddEntriesFrom(input, _repeated_options_codec); 1507 break; 1508 } 1509 case 34: { 1510 if (sourceContext_ == null) { 1511 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 1512 } 1513 input.ReadMessage(SourceContext); 1514 break; 1515 } 1516 case 40: { 1517 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 1518 break; 1519 } 1520 case 50: { 1521 Edition = input.ReadString(); 1522 break; 1523 } 1524 } 1525 } 1526 #endif 1527 } 1528 1529 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1530 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1531 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1532 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1533 uint tag; 1534 while ((tag = input.ReadTag()) != 0) { 1535 if ((tag & 7) == 4) { 1536 // Abort on any end group tag. 1537 return; 1538 } 1539 switch(tag) { 1540 default: 1541 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1542 break; 1543 case 10: { 1544 Name = input.ReadString(); 1545 break; 1546 } 1547 case 18: { 1548 enumvalue_.AddEntriesFrom(ref input, _repeated_enumvalue_codec); 1549 break; 1550 } 1551 case 26: { 1552 options_.AddEntriesFrom(ref input, _repeated_options_codec); 1553 break; 1554 } 1555 case 34: { 1556 if (sourceContext_ == null) { 1557 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 1558 } 1559 input.ReadMessage(SourceContext); 1560 break; 1561 } 1562 case 40: { 1563 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 1564 break; 1565 } 1566 case 50: { 1567 Edition = input.ReadString(); 1568 break; 1569 } 1570 } 1571 } 1572 } 1573 #endif 1574 1575 } 1576 1577 /// <summary> 1578 /// Enum value definition. 1579 /// </summary> 1580 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 1581 public sealed partial class EnumValue : pb::IMessage<EnumValue> 1582 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1583 , pb::IBufferMessage 1584 #endif 1585 { 1586 private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue()); 1587 private pb::UnknownFieldSet _unknownFields; 1588 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1589 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1590 public static pb::MessageParser<EnumValue> Parser { get { return _parser; } } 1591 1592 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1593 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1594 public static pbr::MessageDescriptor Descriptor { 1595 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[3]; } 1596 } 1597 1598 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1599 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1600 pbr::MessageDescriptor pb::IMessage.Descriptor { 1601 get { return Descriptor; } 1602 } 1603 1604 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1605 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] EnumValue()1606 public EnumValue() { 1607 OnConstruction(); 1608 } 1609 OnConstruction()1610 partial void OnConstruction(); 1611 1612 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1613 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] EnumValue(EnumValue other)1614 public EnumValue(EnumValue other) : this() { 1615 name_ = other.name_; 1616 number_ = other.number_; 1617 options_ = other.options_.Clone(); 1618 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1619 } 1620 1621 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1622 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1623 public EnumValue Clone() { 1624 return new EnumValue(this); 1625 } 1626 1627 /// <summary>Field number for the "name" field.</summary> 1628 public const int NameFieldNumber = 1; 1629 private string name_ = ""; 1630 /// <summary> 1631 /// Enum value name. 1632 /// </summary> 1633 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1634 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1635 public string Name { 1636 get { return name_; } 1637 set { 1638 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1639 } 1640 } 1641 1642 /// <summary>Field number for the "number" field.</summary> 1643 public const int NumberFieldNumber = 2; 1644 private int number_; 1645 /// <summary> 1646 /// Enum value number. 1647 /// </summary> 1648 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1649 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1650 public int Number { 1651 get { return number_; } 1652 set { 1653 number_ = value; 1654 } 1655 } 1656 1657 /// <summary>Field number for the "options" field.</summary> 1658 public const int OptionsFieldNumber = 3; 1659 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 1660 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); 1661 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 1662 /// <summary> 1663 /// Protocol buffer options. 1664 /// </summary> 1665 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1666 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1667 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 1668 get { return options_; } 1669 } 1670 1671 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1672 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1673 public override bool Equals(object other) { 1674 return Equals(other as EnumValue); 1675 } 1676 1677 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1678 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(EnumValue other)1679 public bool Equals(EnumValue other) { 1680 if (ReferenceEquals(other, null)) { 1681 return false; 1682 } 1683 if (ReferenceEquals(other, this)) { 1684 return true; 1685 } 1686 if (Name != other.Name) return false; 1687 if (Number != other.Number) return false; 1688 if(!options_.Equals(other.options_)) return false; 1689 return Equals(_unknownFields, other._unknownFields); 1690 } 1691 1692 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1693 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1694 public override int GetHashCode() { 1695 int hash = 1; 1696 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1697 if (Number != 0) hash ^= Number.GetHashCode(); 1698 hash ^= options_.GetHashCode(); 1699 if (_unknownFields != null) { 1700 hash ^= _unknownFields.GetHashCode(); 1701 } 1702 return hash; 1703 } 1704 1705 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1706 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1707 public override string ToString() { 1708 return pb::JsonFormatter.ToDiagnosticString(this); 1709 } 1710 1711 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1712 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1713 public void WriteTo(pb::CodedOutputStream output) { 1714 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1715 output.WriteRawMessage(this); 1716 #else 1717 if (Name.Length != 0) { 1718 output.WriteRawTag(10); 1719 output.WriteString(Name); 1720 } 1721 if (Number != 0) { 1722 output.WriteRawTag(16); 1723 output.WriteInt32(Number); 1724 } 1725 options_.WriteTo(output, _repeated_options_codec); 1726 if (_unknownFields != null) { 1727 _unknownFields.WriteTo(output); 1728 } 1729 #endif 1730 } 1731 1732 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1733 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1734 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1735 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1736 if (Name.Length != 0) { 1737 output.WriteRawTag(10); 1738 output.WriteString(Name); 1739 } 1740 if (Number != 0) { 1741 output.WriteRawTag(16); 1742 output.WriteInt32(Number); 1743 } 1744 options_.WriteTo(ref output, _repeated_options_codec); 1745 if (_unknownFields != null) { 1746 _unknownFields.WriteTo(ref output); 1747 } 1748 } 1749 #endif 1750 1751 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1752 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1753 public int CalculateSize() { 1754 int size = 0; 1755 if (Name.Length != 0) { 1756 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 1757 } 1758 if (Number != 0) { 1759 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); 1760 } 1761 size += options_.CalculateSize(_repeated_options_codec); 1762 if (_unknownFields != null) { 1763 size += _unknownFields.CalculateSize(); 1764 } 1765 return size; 1766 } 1767 1768 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1769 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(EnumValue other)1770 public void MergeFrom(EnumValue other) { 1771 if (other == null) { 1772 return; 1773 } 1774 if (other.Name.Length != 0) { 1775 Name = other.Name; 1776 } 1777 if (other.Number != 0) { 1778 Number = other.Number; 1779 } 1780 options_.Add(other.options_); 1781 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1782 } 1783 1784 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1785 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1786 public void MergeFrom(pb::CodedInputStream input) { 1787 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1788 input.ReadRawMessage(this); 1789 #else 1790 uint tag; 1791 while ((tag = input.ReadTag()) != 0) { 1792 if ((tag & 7) == 4) { 1793 // Abort on any end group tag. 1794 return; 1795 } 1796 switch(tag) { 1797 default: 1798 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1799 break; 1800 case 10: { 1801 Name = input.ReadString(); 1802 break; 1803 } 1804 case 16: { 1805 Number = input.ReadInt32(); 1806 break; 1807 } 1808 case 26: { 1809 options_.AddEntriesFrom(input, _repeated_options_codec); 1810 break; 1811 } 1812 } 1813 } 1814 #endif 1815 } 1816 1817 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1818 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1819 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1820 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1821 uint tag; 1822 while ((tag = input.ReadTag()) != 0) { 1823 if ((tag & 7) == 4) { 1824 // Abort on any end group tag. 1825 return; 1826 } 1827 switch(tag) { 1828 default: 1829 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1830 break; 1831 case 10: { 1832 Name = input.ReadString(); 1833 break; 1834 } 1835 case 16: { 1836 Number = input.ReadInt32(); 1837 break; 1838 } 1839 case 26: { 1840 options_.AddEntriesFrom(ref input, _repeated_options_codec); 1841 break; 1842 } 1843 } 1844 } 1845 } 1846 #endif 1847 1848 } 1849 1850 /// <summary> 1851 /// A protocol buffer option, which can be attached to a message, field, 1852 /// enumeration, etc. 1853 /// </summary> 1854 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 1855 public sealed partial class Option : pb::IMessage<Option> 1856 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1857 , pb::IBufferMessage 1858 #endif 1859 { 1860 private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option()); 1861 private pb::UnknownFieldSet _unknownFields; 1862 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1863 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1864 public static pb::MessageParser<Option> Parser { get { return _parser; } } 1865 1866 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1867 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1868 public static pbr::MessageDescriptor Descriptor { 1869 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[4]; } 1870 } 1871 1872 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1873 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1874 pbr::MessageDescriptor pb::IMessage.Descriptor { 1875 get { return Descriptor; } 1876 } 1877 1878 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1879 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Option()1880 public Option() { 1881 OnConstruction(); 1882 } 1883 OnConstruction()1884 partial void OnConstruction(); 1885 1886 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1887 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Option(Option other)1888 public Option(Option other) : this() { 1889 name_ = other.name_; 1890 value_ = other.value_ != null ? other.value_.Clone() : null; 1891 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1892 } 1893 1894 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1895 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1896 public Option Clone() { 1897 return new Option(this); 1898 } 1899 1900 /// <summary>Field number for the "name" field.</summary> 1901 public const int NameFieldNumber = 1; 1902 private string name_ = ""; 1903 /// <summary> 1904 /// The option's name. For protobuf built-in options (options defined in 1905 /// descriptor.proto), this is the short name. For example, `"map_entry"`. 1906 /// For custom options, it should be the fully-qualified name. For example, 1907 /// `"google.api.http"`. 1908 /// </summary> 1909 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1910 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1911 public string Name { 1912 get { return name_; } 1913 set { 1914 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1915 } 1916 } 1917 1918 /// <summary>Field number for the "value" field.</summary> 1919 public const int ValueFieldNumber = 2; 1920 private global::Google.Protobuf.WellKnownTypes.Any value_; 1921 /// <summary> 1922 /// The option's value packed in an Any message. If the value is a primitive, 1923 /// the corresponding wrapper type defined in google/protobuf/wrappers.proto 1924 /// should be used. If the value is an enum, it should be stored as an int32 1925 /// value using the google.protobuf.Int32Value type. 1926 /// </summary> 1927 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1928 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1929 public global::Google.Protobuf.WellKnownTypes.Any Value { 1930 get { return value_; } 1931 set { 1932 value_ = value; 1933 } 1934 } 1935 1936 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1937 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1938 public override bool Equals(object other) { 1939 return Equals(other as Option); 1940 } 1941 1942 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1943 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Option other)1944 public bool Equals(Option other) { 1945 if (ReferenceEquals(other, null)) { 1946 return false; 1947 } 1948 if (ReferenceEquals(other, this)) { 1949 return true; 1950 } 1951 if (Name != other.Name) return false; 1952 if (!object.Equals(Value, other.Value)) return false; 1953 return Equals(_unknownFields, other._unknownFields); 1954 } 1955 1956 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1957 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1958 public override int GetHashCode() { 1959 int hash = 1; 1960 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1961 if (value_ != null) hash ^= Value.GetHashCode(); 1962 if (_unknownFields != null) { 1963 hash ^= _unknownFields.GetHashCode(); 1964 } 1965 return hash; 1966 } 1967 1968 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1969 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1970 public override string ToString() { 1971 return pb::JsonFormatter.ToDiagnosticString(this); 1972 } 1973 1974 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1975 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1976 public void WriteTo(pb::CodedOutputStream output) { 1977 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1978 output.WriteRawMessage(this); 1979 #else 1980 if (Name.Length != 0) { 1981 output.WriteRawTag(10); 1982 output.WriteString(Name); 1983 } 1984 if (value_ != null) { 1985 output.WriteRawTag(18); 1986 output.WriteMessage(Value); 1987 } 1988 if (_unknownFields != null) { 1989 _unknownFields.WriteTo(output); 1990 } 1991 #endif 1992 } 1993 1994 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1995 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1996 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1997 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1998 if (Name.Length != 0) { 1999 output.WriteRawTag(10); 2000 output.WriteString(Name); 2001 } 2002 if (value_ != null) { 2003 output.WriteRawTag(18); 2004 output.WriteMessage(Value); 2005 } 2006 if (_unknownFields != null) { 2007 _unknownFields.WriteTo(ref output); 2008 } 2009 } 2010 #endif 2011 2012 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2013 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()2014 public int CalculateSize() { 2015 int size = 0; 2016 if (Name.Length != 0) { 2017 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 2018 } 2019 if (value_ != null) { 2020 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); 2021 } 2022 if (_unknownFields != null) { 2023 size += _unknownFields.CalculateSize(); 2024 } 2025 return size; 2026 } 2027 2028 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2029 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Option other)2030 public void MergeFrom(Option other) { 2031 if (other == null) { 2032 return; 2033 } 2034 if (other.Name.Length != 0) { 2035 Name = other.Name; 2036 } 2037 if (other.value_ != null) { 2038 if (value_ == null) { 2039 Value = new global::Google.Protobuf.WellKnownTypes.Any(); 2040 } 2041 Value.MergeFrom(other.Value); 2042 } 2043 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 2044 } 2045 2046 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2047 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)2048 public void MergeFrom(pb::CodedInputStream input) { 2049 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2050 input.ReadRawMessage(this); 2051 #else 2052 uint tag; 2053 while ((tag = input.ReadTag()) != 0) { 2054 if ((tag & 7) == 4) { 2055 // Abort on any end group tag. 2056 return; 2057 } 2058 switch(tag) { 2059 default: 2060 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 2061 break; 2062 case 10: { 2063 Name = input.ReadString(); 2064 break; 2065 } 2066 case 18: { 2067 if (value_ == null) { 2068 Value = new global::Google.Protobuf.WellKnownTypes.Any(); 2069 } 2070 input.ReadMessage(Value); 2071 break; 2072 } 2073 } 2074 } 2075 #endif 2076 } 2077 2078 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2079 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2080 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2081 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 2082 uint tag; 2083 while ((tag = input.ReadTag()) != 0) { 2084 if ((tag & 7) == 4) { 2085 // Abort on any end group tag. 2086 return; 2087 } 2088 switch(tag) { 2089 default: 2090 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 2091 break; 2092 case 10: { 2093 Name = input.ReadString(); 2094 break; 2095 } 2096 case 18: { 2097 if (value_ == null) { 2098 Value = new global::Google.Protobuf.WellKnownTypes.Any(); 2099 } 2100 input.ReadMessage(Value); 2101 break; 2102 } 2103 } 2104 } 2105 } 2106 #endif 2107 2108 } 2109 2110 #endregion 2111 2112 } 2113 2114 #endregion Designer generated code 2115