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