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 private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type()); 99 private pb::UnknownFieldSet _unknownFields; 100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 public static pb::MessageParser<Type> Parser { get { return _parser; } } 102 103 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 104 public static pbr::MessageDescriptor Descriptor { 105 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[0]; } 106 } 107 108 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 109 pbr::MessageDescriptor pb::IMessage.Descriptor { 110 get { return Descriptor; } 111 } 112 113 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Type()114 public Type() { 115 OnConstruction(); 116 } 117 OnConstruction()118 partial void OnConstruction(); 119 120 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Type(Type other)121 public Type(Type other) : this() { 122 name_ = other.name_; 123 fields_ = other.fields_.Clone(); 124 oneofs_ = other.oneofs_.Clone(); 125 options_ = other.options_.Clone(); 126 sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; 127 syntax_ = other.syntax_; 128 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 129 } 130 131 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()132 public Type Clone() { 133 return new Type(this); 134 } 135 136 /// <summary>Field number for the "name" field.</summary> 137 public const int NameFieldNumber = 1; 138 private string name_ = ""; 139 /// <summary> 140 /// The fully qualified message name. 141 /// </summary> 142 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 143 public string Name { 144 get { return name_; } 145 set { 146 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 147 } 148 } 149 150 /// <summary>Field number for the "fields" field.</summary> 151 public const int FieldsFieldNumber = 2; 152 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fields_codec 153 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser); 154 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field>(); 155 /// <summary> 156 /// The list of fields. 157 /// </summary> 158 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 159 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fields { 160 get { return fields_; } 161 } 162 163 /// <summary>Field number for the "oneofs" field.</summary> 164 public const int OneofsFieldNumber = 3; 165 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec 166 = pb::FieldCodec.ForString(26); 167 private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField<string>(); 168 /// <summary> 169 /// The list of types appearing in `oneof` definitions in this type. 170 /// </summary> 171 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 172 public pbc::RepeatedField<string> Oneofs { 173 get { return oneofs_; } 174 } 175 176 /// <summary>Field number for the "options" field.</summary> 177 public const int OptionsFieldNumber = 4; 178 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 179 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser); 180 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 181 /// <summary> 182 /// The protocol buffer options. 183 /// </summary> 184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 185 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 186 get { return options_; } 187 } 188 189 /// <summary>Field number for the "source_context" field.</summary> 190 public const int SourceContextFieldNumber = 5; 191 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; 192 /// <summary> 193 /// The source context. 194 /// </summary> 195 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 196 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { 197 get { return sourceContext_; } 198 set { 199 sourceContext_ = value; 200 } 201 } 202 203 /// <summary>Field number for the "syntax" field.</summary> 204 public const int SyntaxFieldNumber = 6; 205 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; 206 /// <summary> 207 /// The source syntax. 208 /// </summary> 209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 210 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { 211 get { return syntax_; } 212 set { 213 syntax_ = value; 214 } 215 } 216 217 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)218 public override bool Equals(object other) { 219 return Equals(other as Type); 220 } 221 222 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(Type other)223 public bool Equals(Type other) { 224 if (ReferenceEquals(other, null)) { 225 return false; 226 } 227 if (ReferenceEquals(other, this)) { 228 return true; 229 } 230 if (Name != other.Name) return false; 231 if(!fields_.Equals(other.fields_)) return false; 232 if(!oneofs_.Equals(other.oneofs_)) return false; 233 if(!options_.Equals(other.options_)) return false; 234 if (!object.Equals(SourceContext, other.SourceContext)) return false; 235 if (Syntax != other.Syntax) return false; 236 return Equals(_unknownFields, other._unknownFields); 237 } 238 239 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()240 public override int GetHashCode() { 241 int hash = 1; 242 if (Name.Length != 0) hash ^= Name.GetHashCode(); 243 hash ^= fields_.GetHashCode(); 244 hash ^= oneofs_.GetHashCode(); 245 hash ^= options_.GetHashCode(); 246 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); 247 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); 248 if (_unknownFields != null) { 249 hash ^= _unknownFields.GetHashCode(); 250 } 251 return hash; 252 } 253 254 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()255 public override string ToString() { 256 return pb::JsonFormatter.ToDiagnosticString(this); 257 } 258 259 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)260 public void WriteTo(pb::CodedOutputStream output) { 261 if (Name.Length != 0) { 262 output.WriteRawTag(10); 263 output.WriteString(Name); 264 } 265 fields_.WriteTo(output, _repeated_fields_codec); 266 oneofs_.WriteTo(output, _repeated_oneofs_codec); 267 options_.WriteTo(output, _repeated_options_codec); 268 if (sourceContext_ != null) { 269 output.WriteRawTag(42); 270 output.WriteMessage(SourceContext); 271 } 272 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 273 output.WriteRawTag(48); 274 output.WriteEnum((int) Syntax); 275 } 276 if (_unknownFields != null) { 277 _unknownFields.WriteTo(output); 278 } 279 } 280 281 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()282 public int CalculateSize() { 283 int size = 0; 284 if (Name.Length != 0) { 285 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 286 } 287 size += fields_.CalculateSize(_repeated_fields_codec); 288 size += oneofs_.CalculateSize(_repeated_oneofs_codec); 289 size += options_.CalculateSize(_repeated_options_codec); 290 if (sourceContext_ != null) { 291 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); 292 } 293 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 294 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); 295 } 296 if (_unknownFields != null) { 297 size += _unknownFields.CalculateSize(); 298 } 299 return size; 300 } 301 302 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(Type other)303 public void MergeFrom(Type other) { 304 if (other == null) { 305 return; 306 } 307 if (other.Name.Length != 0) { 308 Name = other.Name; 309 } 310 fields_.Add(other.fields_); 311 oneofs_.Add(other.oneofs_); 312 options_.Add(other.options_); 313 if (other.sourceContext_ != null) { 314 if (sourceContext_ == null) { 315 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 316 } 317 SourceContext.MergeFrom(other.SourceContext); 318 } 319 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 320 Syntax = other.Syntax; 321 } 322 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 323 } 324 325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)326 public void MergeFrom(pb::CodedInputStream input) { 327 uint tag; 328 while ((tag = input.ReadTag()) != 0) { 329 switch(tag) { 330 default: 331 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 332 break; 333 case 10: { 334 Name = input.ReadString(); 335 break; 336 } 337 case 18: { 338 fields_.AddEntriesFrom(input, _repeated_fields_codec); 339 break; 340 } 341 case 26: { 342 oneofs_.AddEntriesFrom(input, _repeated_oneofs_codec); 343 break; 344 } 345 case 34: { 346 options_.AddEntriesFrom(input, _repeated_options_codec); 347 break; 348 } 349 case 42: { 350 if (sourceContext_ == null) { 351 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 352 } 353 input.ReadMessage(SourceContext); 354 break; 355 } 356 case 48: { 357 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 358 break; 359 } 360 } 361 } 362 } 363 364 } 365 366 /// <summary> 367 /// A single field of a message type. 368 /// </summary> 369 public sealed partial class Field : pb::IMessage<Field> { 370 private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field()); 371 private pb::UnknownFieldSet _unknownFields; 372 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 373 public static pb::MessageParser<Field> Parser { get { return _parser; } } 374 375 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 376 public static pbr::MessageDescriptor Descriptor { 377 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[1]; } 378 } 379 380 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 381 pbr::MessageDescriptor pb::IMessage.Descriptor { 382 get { return Descriptor; } 383 } 384 385 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Field()386 public Field() { 387 OnConstruction(); 388 } 389 OnConstruction()390 partial void OnConstruction(); 391 392 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Field(Field other)393 public Field(Field other) : this() { 394 kind_ = other.kind_; 395 cardinality_ = other.cardinality_; 396 number_ = other.number_; 397 name_ = other.name_; 398 typeUrl_ = other.typeUrl_; 399 oneofIndex_ = other.oneofIndex_; 400 packed_ = other.packed_; 401 options_ = other.options_.Clone(); 402 jsonName_ = other.jsonName_; 403 defaultValue_ = other.defaultValue_; 404 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 405 } 406 407 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()408 public Field Clone() { 409 return new Field(this); 410 } 411 412 /// <summary>Field number for the "kind" field.</summary> 413 public const int KindFieldNumber = 1; 414 private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown; 415 /// <summary> 416 /// The field type. 417 /// </summary> 418 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 419 public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { 420 get { return kind_; } 421 set { 422 kind_ = value; 423 } 424 } 425 426 /// <summary>Field number for the "cardinality" field.</summary> 427 public const int CardinalityFieldNumber = 2; 428 private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown; 429 /// <summary> 430 /// The field cardinality. 431 /// </summary> 432 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 433 public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { 434 get { return cardinality_; } 435 set { 436 cardinality_ = value; 437 } 438 } 439 440 /// <summary>Field number for the "number" field.</summary> 441 public const int NumberFieldNumber = 3; 442 private int number_; 443 /// <summary> 444 /// The field number. 445 /// </summary> 446 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 447 public int Number { 448 get { return number_; } 449 set { 450 number_ = value; 451 } 452 } 453 454 /// <summary>Field number for the "name" field.</summary> 455 public const int NameFieldNumber = 4; 456 private string name_ = ""; 457 /// <summary> 458 /// The field name. 459 /// </summary> 460 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 461 public string Name { 462 get { return name_; } 463 set { 464 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 465 } 466 } 467 468 /// <summary>Field number for the "type_url" field.</summary> 469 public const int TypeUrlFieldNumber = 6; 470 private string typeUrl_ = ""; 471 /// <summary> 472 /// The field type URL, without the scheme, for message or enumeration 473 /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. 474 /// </summary> 475 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 476 public string TypeUrl { 477 get { return typeUrl_; } 478 set { 479 typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 480 } 481 } 482 483 /// <summary>Field number for the "oneof_index" field.</summary> 484 public const int OneofIndexFieldNumber = 7; 485 private int oneofIndex_; 486 /// <summary> 487 /// The index of the field type in `Type.oneofs`, for message or enumeration 488 /// types. The first type has index 1; zero means the type is not in the list. 489 /// </summary> 490 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 491 public int OneofIndex { 492 get { return oneofIndex_; } 493 set { 494 oneofIndex_ = value; 495 } 496 } 497 498 /// <summary>Field number for the "packed" field.</summary> 499 public const int PackedFieldNumber = 8; 500 private bool packed_; 501 /// <summary> 502 /// Whether to use alternative packed wire representation. 503 /// </summary> 504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 505 public bool Packed { 506 get { return packed_; } 507 set { 508 packed_ = value; 509 } 510 } 511 512 /// <summary>Field number for the "options" field.</summary> 513 public const int OptionsFieldNumber = 9; 514 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 515 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser); 516 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 517 /// <summary> 518 /// The protocol buffer options. 519 /// </summary> 520 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 521 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 522 get { return options_; } 523 } 524 525 /// <summary>Field number for the "json_name" field.</summary> 526 public const int JsonNameFieldNumber = 10; 527 private string jsonName_ = ""; 528 /// <summary> 529 /// The field JSON name. 530 /// </summary> 531 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 532 public string JsonName { 533 get { return jsonName_; } 534 set { 535 jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 536 } 537 } 538 539 /// <summary>Field number for the "default_value" field.</summary> 540 public const int DefaultValueFieldNumber = 11; 541 private string defaultValue_ = ""; 542 /// <summary> 543 /// The string value of the default value of this field. Proto2 syntax only. 544 /// </summary> 545 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 546 public string DefaultValue { 547 get { return defaultValue_; } 548 set { 549 defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 550 } 551 } 552 553 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)554 public override bool Equals(object other) { 555 return Equals(other as Field); 556 } 557 558 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(Field other)559 public bool Equals(Field other) { 560 if (ReferenceEquals(other, null)) { 561 return false; 562 } 563 if (ReferenceEquals(other, this)) { 564 return true; 565 } 566 if (Kind != other.Kind) return false; 567 if (Cardinality != other.Cardinality) return false; 568 if (Number != other.Number) return false; 569 if (Name != other.Name) return false; 570 if (TypeUrl != other.TypeUrl) return false; 571 if (OneofIndex != other.OneofIndex) return false; 572 if (Packed != other.Packed) return false; 573 if(!options_.Equals(other.options_)) return false; 574 if (JsonName != other.JsonName) return false; 575 if (DefaultValue != other.DefaultValue) return false; 576 return Equals(_unknownFields, other._unknownFields); 577 } 578 579 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()580 public override int GetHashCode() { 581 int hash = 1; 582 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) hash ^= Kind.GetHashCode(); 583 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) hash ^= Cardinality.GetHashCode(); 584 if (Number != 0) hash ^= Number.GetHashCode(); 585 if (Name.Length != 0) hash ^= Name.GetHashCode(); 586 if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); 587 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); 588 if (Packed != false) hash ^= Packed.GetHashCode(); 589 hash ^= options_.GetHashCode(); 590 if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); 591 if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); 592 if (_unknownFields != null) { 593 hash ^= _unknownFields.GetHashCode(); 594 } 595 return hash; 596 } 597 598 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()599 public override string ToString() { 600 return pb::JsonFormatter.ToDiagnosticString(this); 601 } 602 603 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)604 public void WriteTo(pb::CodedOutputStream output) { 605 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 606 output.WriteRawTag(8); 607 output.WriteEnum((int) Kind); 608 } 609 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 610 output.WriteRawTag(16); 611 output.WriteEnum((int) Cardinality); 612 } 613 if (Number != 0) { 614 output.WriteRawTag(24); 615 output.WriteInt32(Number); 616 } 617 if (Name.Length != 0) { 618 output.WriteRawTag(34); 619 output.WriteString(Name); 620 } 621 if (TypeUrl.Length != 0) { 622 output.WriteRawTag(50); 623 output.WriteString(TypeUrl); 624 } 625 if (OneofIndex != 0) { 626 output.WriteRawTag(56); 627 output.WriteInt32(OneofIndex); 628 } 629 if (Packed != false) { 630 output.WriteRawTag(64); 631 output.WriteBool(Packed); 632 } 633 options_.WriteTo(output, _repeated_options_codec); 634 if (JsonName.Length != 0) { 635 output.WriteRawTag(82); 636 output.WriteString(JsonName); 637 } 638 if (DefaultValue.Length != 0) { 639 output.WriteRawTag(90); 640 output.WriteString(DefaultValue); 641 } 642 if (_unknownFields != null) { 643 _unknownFields.WriteTo(output); 644 } 645 } 646 647 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()648 public int CalculateSize() { 649 int size = 0; 650 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 651 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); 652 } 653 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 654 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); 655 } 656 if (Number != 0) { 657 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); 658 } 659 if (Name.Length != 0) { 660 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 661 } 662 if (TypeUrl.Length != 0) { 663 size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl); 664 } 665 if (OneofIndex != 0) { 666 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); 667 } 668 if (Packed != false) { 669 size += 1 + 1; 670 } 671 size += options_.CalculateSize(_repeated_options_codec); 672 if (JsonName.Length != 0) { 673 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); 674 } 675 if (DefaultValue.Length != 0) { 676 size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); 677 } 678 if (_unknownFields != null) { 679 size += _unknownFields.CalculateSize(); 680 } 681 return size; 682 } 683 684 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(Field other)685 public void MergeFrom(Field other) { 686 if (other == null) { 687 return; 688 } 689 if (other.Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { 690 Kind = other.Kind; 691 } 692 if (other.Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { 693 Cardinality = other.Cardinality; 694 } 695 if (other.Number != 0) { 696 Number = other.Number; 697 } 698 if (other.Name.Length != 0) { 699 Name = other.Name; 700 } 701 if (other.TypeUrl.Length != 0) { 702 TypeUrl = other.TypeUrl; 703 } 704 if (other.OneofIndex != 0) { 705 OneofIndex = other.OneofIndex; 706 } 707 if (other.Packed != false) { 708 Packed = other.Packed; 709 } 710 options_.Add(other.options_); 711 if (other.JsonName.Length != 0) { 712 JsonName = other.JsonName; 713 } 714 if (other.DefaultValue.Length != 0) { 715 DefaultValue = other.DefaultValue; 716 } 717 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 718 } 719 720 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)721 public void MergeFrom(pb::CodedInputStream input) { 722 uint tag; 723 while ((tag = input.ReadTag()) != 0) { 724 switch(tag) { 725 default: 726 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 727 break; 728 case 8: { 729 Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); 730 break; 731 } 732 case 16: { 733 Cardinality = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); 734 break; 735 } 736 case 24: { 737 Number = input.ReadInt32(); 738 break; 739 } 740 case 34: { 741 Name = input.ReadString(); 742 break; 743 } 744 case 50: { 745 TypeUrl = input.ReadString(); 746 break; 747 } 748 case 56: { 749 OneofIndex = input.ReadInt32(); 750 break; 751 } 752 case 64: { 753 Packed = input.ReadBool(); 754 break; 755 } 756 case 74: { 757 options_.AddEntriesFrom(input, _repeated_options_codec); 758 break; 759 } 760 case 82: { 761 JsonName = input.ReadString(); 762 break; 763 } 764 case 90: { 765 DefaultValue = input.ReadString(); 766 break; 767 } 768 } 769 } 770 } 771 772 #region Nested types 773 /// <summary>Container for nested types declared in the Field message type.</summary> 774 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 775 public static partial class Types { 776 /// <summary> 777 /// Basic field types. 778 /// </summary> 779 public enum Kind { 780 /// <summary> 781 /// Field type unknown. 782 /// </summary> 783 [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, 784 /// <summary> 785 /// Field type double. 786 /// </summary> 787 [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, 788 /// <summary> 789 /// Field type float. 790 /// </summary> 791 [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, 792 /// <summary> 793 /// Field type int64. 794 /// </summary> 795 [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, 796 /// <summary> 797 /// Field type uint64. 798 /// </summary> 799 [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, 800 /// <summary> 801 /// Field type int32. 802 /// </summary> 803 [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, 804 /// <summary> 805 /// Field type fixed64. 806 /// </summary> 807 [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, 808 /// <summary> 809 /// Field type fixed32. 810 /// </summary> 811 [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, 812 /// <summary> 813 /// Field type bool. 814 /// </summary> 815 [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, 816 /// <summary> 817 /// Field type string. 818 /// </summary> 819 [pbr::OriginalName("TYPE_STRING")] TypeString = 9, 820 /// <summary> 821 /// Field type group. Proto2 syntax only, and deprecated. 822 /// </summary> 823 [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, 824 /// <summary> 825 /// Field type message. 826 /// </summary> 827 [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, 828 /// <summary> 829 /// Field type bytes. 830 /// </summary> 831 [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, 832 /// <summary> 833 /// Field type uint32. 834 /// </summary> 835 [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, 836 /// <summary> 837 /// Field type enum. 838 /// </summary> 839 [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, 840 /// <summary> 841 /// Field type sfixed32. 842 /// </summary> 843 [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, 844 /// <summary> 845 /// Field type sfixed64. 846 /// </summary> 847 [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, 848 /// <summary> 849 /// Field type sint32. 850 /// </summary> 851 [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, 852 /// <summary> 853 /// Field type sint64. 854 /// </summary> 855 [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, 856 } 857 858 /// <summary> 859 /// Whether a field is optional, required, or repeated. 860 /// </summary> 861 public enum Cardinality { 862 /// <summary> 863 /// For fields with unknown cardinality. 864 /// </summary> 865 [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, 866 /// <summary> 867 /// For optional fields. 868 /// </summary> 869 [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, 870 /// <summary> 871 /// For required fields. Proto2 syntax only. 872 /// </summary> 873 [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, 874 /// <summary> 875 /// For repeated fields. 876 /// </summary> 877 [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, 878 } 879 880 } 881 #endregion 882 883 } 884 885 /// <summary> 886 /// Enum type definition. 887 /// </summary> 888 public sealed partial class Enum : pb::IMessage<Enum> { 889 private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum()); 890 private pb::UnknownFieldSet _unknownFields; 891 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 892 public static pb::MessageParser<Enum> Parser { get { return _parser; } } 893 894 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 895 public static pbr::MessageDescriptor Descriptor { 896 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[2]; } 897 } 898 899 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 900 pbr::MessageDescriptor pb::IMessage.Descriptor { 901 get { return Descriptor; } 902 } 903 904 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Enum()905 public Enum() { 906 OnConstruction(); 907 } 908 OnConstruction()909 partial void OnConstruction(); 910 911 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Enum(Enum other)912 public Enum(Enum other) : this() { 913 name_ = other.name_; 914 enumvalue_ = other.enumvalue_.Clone(); 915 options_ = other.options_.Clone(); 916 sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; 917 syntax_ = other.syntax_; 918 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 919 } 920 921 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()922 public Enum Clone() { 923 return new Enum(this); 924 } 925 926 /// <summary>Field number for the "name" field.</summary> 927 public const int NameFieldNumber = 1; 928 private string name_ = ""; 929 /// <summary> 930 /// Enum type name. 931 /// </summary> 932 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 933 public string Name { 934 get { return name_; } 935 set { 936 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 937 } 938 } 939 940 /// <summary>Field number for the "enumvalue" field.</summary> 941 public const int EnumvalueFieldNumber = 2; 942 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated_enumvalue_codec 943 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser); 944 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>(); 945 /// <summary> 946 /// Enum value definitions. 947 /// </summary> 948 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 949 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> Enumvalue { 950 get { return enumvalue_; } 951 } 952 953 /// <summary>Field number for the "options" field.</summary> 954 public const int OptionsFieldNumber = 3; 955 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 956 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); 957 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 958 /// <summary> 959 /// Protocol buffer options. 960 /// </summary> 961 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 962 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 963 get { return options_; } 964 } 965 966 /// <summary>Field number for the "source_context" field.</summary> 967 public const int SourceContextFieldNumber = 4; 968 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; 969 /// <summary> 970 /// The source context. 971 /// </summary> 972 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 973 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { 974 get { return sourceContext_; } 975 set { 976 sourceContext_ = value; 977 } 978 } 979 980 /// <summary>Field number for the "syntax" field.</summary> 981 public const int SyntaxFieldNumber = 5; 982 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; 983 /// <summary> 984 /// The source syntax. 985 /// </summary> 986 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 987 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { 988 get { return syntax_; } 989 set { 990 syntax_ = value; 991 } 992 } 993 994 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)995 public override bool Equals(object other) { 996 return Equals(other as Enum); 997 } 998 999 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(Enum other)1000 public bool Equals(Enum other) { 1001 if (ReferenceEquals(other, null)) { 1002 return false; 1003 } 1004 if (ReferenceEquals(other, this)) { 1005 return true; 1006 } 1007 if (Name != other.Name) return false; 1008 if(!enumvalue_.Equals(other.enumvalue_)) return false; 1009 if(!options_.Equals(other.options_)) return false; 1010 if (!object.Equals(SourceContext, other.SourceContext)) return false; 1011 if (Syntax != other.Syntax) return false; 1012 return Equals(_unknownFields, other._unknownFields); 1013 } 1014 1015 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()1016 public override int GetHashCode() { 1017 int hash = 1; 1018 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1019 hash ^= enumvalue_.GetHashCode(); 1020 hash ^= options_.GetHashCode(); 1021 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); 1022 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); 1023 if (_unknownFields != null) { 1024 hash ^= _unknownFields.GetHashCode(); 1025 } 1026 return hash; 1027 } 1028 1029 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()1030 public override string ToString() { 1031 return pb::JsonFormatter.ToDiagnosticString(this); 1032 } 1033 1034 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)1035 public void WriteTo(pb::CodedOutputStream output) { 1036 if (Name.Length != 0) { 1037 output.WriteRawTag(10); 1038 output.WriteString(Name); 1039 } 1040 enumvalue_.WriteTo(output, _repeated_enumvalue_codec); 1041 options_.WriteTo(output, _repeated_options_codec); 1042 if (sourceContext_ != null) { 1043 output.WriteRawTag(34); 1044 output.WriteMessage(SourceContext); 1045 } 1046 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1047 output.WriteRawTag(40); 1048 output.WriteEnum((int) Syntax); 1049 } 1050 if (_unknownFields != null) { 1051 _unknownFields.WriteTo(output); 1052 } 1053 } 1054 1055 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()1056 public int CalculateSize() { 1057 int size = 0; 1058 if (Name.Length != 0) { 1059 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 1060 } 1061 size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); 1062 size += options_.CalculateSize(_repeated_options_codec); 1063 if (sourceContext_ != null) { 1064 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); 1065 } 1066 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1067 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); 1068 } 1069 if (_unknownFields != null) { 1070 size += _unknownFields.CalculateSize(); 1071 } 1072 return size; 1073 } 1074 1075 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(Enum other)1076 public void MergeFrom(Enum other) { 1077 if (other == null) { 1078 return; 1079 } 1080 if (other.Name.Length != 0) { 1081 Name = other.Name; 1082 } 1083 enumvalue_.Add(other.enumvalue_); 1084 options_.Add(other.options_); 1085 if (other.sourceContext_ != null) { 1086 if (sourceContext_ == null) { 1087 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 1088 } 1089 SourceContext.MergeFrom(other.SourceContext); 1090 } 1091 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { 1092 Syntax = other.Syntax; 1093 } 1094 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1095 } 1096 1097 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)1098 public void MergeFrom(pb::CodedInputStream input) { 1099 uint tag; 1100 while ((tag = input.ReadTag()) != 0) { 1101 switch(tag) { 1102 default: 1103 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1104 break; 1105 case 10: { 1106 Name = input.ReadString(); 1107 break; 1108 } 1109 case 18: { 1110 enumvalue_.AddEntriesFrom(input, _repeated_enumvalue_codec); 1111 break; 1112 } 1113 case 26: { 1114 options_.AddEntriesFrom(input, _repeated_options_codec); 1115 break; 1116 } 1117 case 34: { 1118 if (sourceContext_ == null) { 1119 SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); 1120 } 1121 input.ReadMessage(SourceContext); 1122 break; 1123 } 1124 case 40: { 1125 Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); 1126 break; 1127 } 1128 } 1129 } 1130 } 1131 1132 } 1133 1134 /// <summary> 1135 /// Enum value definition. 1136 /// </summary> 1137 public sealed partial class EnumValue : pb::IMessage<EnumValue> { 1138 private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue()); 1139 private pb::UnknownFieldSet _unknownFields; 1140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1141 public static pb::MessageParser<EnumValue> Parser { get { return _parser; } } 1142 1143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1144 public static pbr::MessageDescriptor Descriptor { 1145 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[3]; } 1146 } 1147 1148 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1149 pbr::MessageDescriptor pb::IMessage.Descriptor { 1150 get { return Descriptor; } 1151 } 1152 1153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] EnumValue()1154 public EnumValue() { 1155 OnConstruction(); 1156 } 1157 OnConstruction()1158 partial void OnConstruction(); 1159 1160 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] EnumValue(EnumValue other)1161 public EnumValue(EnumValue other) : this() { 1162 name_ = other.name_; 1163 number_ = other.number_; 1164 options_ = other.options_.Clone(); 1165 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1166 } 1167 1168 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()1169 public EnumValue Clone() { 1170 return new EnumValue(this); 1171 } 1172 1173 /// <summary>Field number for the "name" field.</summary> 1174 public const int NameFieldNumber = 1; 1175 private string name_ = ""; 1176 /// <summary> 1177 /// Enum value name. 1178 /// </summary> 1179 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1180 public string Name { 1181 get { return name_; } 1182 set { 1183 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1184 } 1185 } 1186 1187 /// <summary>Field number for the "number" field.</summary> 1188 public const int NumberFieldNumber = 2; 1189 private int number_; 1190 /// <summary> 1191 /// Enum value number. 1192 /// </summary> 1193 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1194 public int Number { 1195 get { return number_; } 1196 set { 1197 number_ = value; 1198 } 1199 } 1200 1201 /// <summary>Field number for the "options" field.</summary> 1202 public const int OptionsFieldNumber = 3; 1203 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec 1204 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); 1205 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>(); 1206 /// <summary> 1207 /// Protocol buffer options. 1208 /// </summary> 1209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1210 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options { 1211 get { return options_; } 1212 } 1213 1214 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)1215 public override bool Equals(object other) { 1216 return Equals(other as EnumValue); 1217 } 1218 1219 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(EnumValue other)1220 public bool Equals(EnumValue other) { 1221 if (ReferenceEquals(other, null)) { 1222 return false; 1223 } 1224 if (ReferenceEquals(other, this)) { 1225 return true; 1226 } 1227 if (Name != other.Name) return false; 1228 if (Number != other.Number) return false; 1229 if(!options_.Equals(other.options_)) return false; 1230 return Equals(_unknownFields, other._unknownFields); 1231 } 1232 1233 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()1234 public override int GetHashCode() { 1235 int hash = 1; 1236 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1237 if (Number != 0) hash ^= Number.GetHashCode(); 1238 hash ^= options_.GetHashCode(); 1239 if (_unknownFields != null) { 1240 hash ^= _unknownFields.GetHashCode(); 1241 } 1242 return hash; 1243 } 1244 1245 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()1246 public override string ToString() { 1247 return pb::JsonFormatter.ToDiagnosticString(this); 1248 } 1249 1250 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)1251 public void WriteTo(pb::CodedOutputStream output) { 1252 if (Name.Length != 0) { 1253 output.WriteRawTag(10); 1254 output.WriteString(Name); 1255 } 1256 if (Number != 0) { 1257 output.WriteRawTag(16); 1258 output.WriteInt32(Number); 1259 } 1260 options_.WriteTo(output, _repeated_options_codec); 1261 if (_unknownFields != null) { 1262 _unknownFields.WriteTo(output); 1263 } 1264 } 1265 1266 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()1267 public int CalculateSize() { 1268 int size = 0; 1269 if (Name.Length != 0) { 1270 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 1271 } 1272 if (Number != 0) { 1273 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); 1274 } 1275 size += options_.CalculateSize(_repeated_options_codec); 1276 if (_unknownFields != null) { 1277 size += _unknownFields.CalculateSize(); 1278 } 1279 return size; 1280 } 1281 1282 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(EnumValue other)1283 public void MergeFrom(EnumValue other) { 1284 if (other == null) { 1285 return; 1286 } 1287 if (other.Name.Length != 0) { 1288 Name = other.Name; 1289 } 1290 if (other.Number != 0) { 1291 Number = other.Number; 1292 } 1293 options_.Add(other.options_); 1294 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1295 } 1296 1297 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)1298 public void MergeFrom(pb::CodedInputStream input) { 1299 uint tag; 1300 while ((tag = input.ReadTag()) != 0) { 1301 switch(tag) { 1302 default: 1303 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1304 break; 1305 case 10: { 1306 Name = input.ReadString(); 1307 break; 1308 } 1309 case 16: { 1310 Number = input.ReadInt32(); 1311 break; 1312 } 1313 case 26: { 1314 options_.AddEntriesFrom(input, _repeated_options_codec); 1315 break; 1316 } 1317 } 1318 } 1319 } 1320 1321 } 1322 1323 /// <summary> 1324 /// A protocol buffer option, which can be attached to a message, field, 1325 /// enumeration, etc. 1326 /// </summary> 1327 public sealed partial class Option : pb::IMessage<Option> { 1328 private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option()); 1329 private pb::UnknownFieldSet _unknownFields; 1330 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1331 public static pb::MessageParser<Option> Parser { get { return _parser; } } 1332 1333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1334 public static pbr::MessageDescriptor Descriptor { 1335 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor.MessageTypes[4]; } 1336 } 1337 1338 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1339 pbr::MessageDescriptor pb::IMessage.Descriptor { 1340 get { return Descriptor; } 1341 } 1342 1343 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Option()1344 public Option() { 1345 OnConstruction(); 1346 } 1347 OnConstruction()1348 partial void OnConstruction(); 1349 1350 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Option(Option other)1351 public Option(Option other) : this() { 1352 name_ = other.name_; 1353 value_ = other.value_ != null ? other.value_.Clone() : null; 1354 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1355 } 1356 1357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()1358 public Option Clone() { 1359 return new Option(this); 1360 } 1361 1362 /// <summary>Field number for the "name" field.</summary> 1363 public const int NameFieldNumber = 1; 1364 private string name_ = ""; 1365 /// <summary> 1366 /// The option's name. For protobuf built-in options (options defined in 1367 /// descriptor.proto), this is the short name. For example, `"map_entry"`. 1368 /// For custom options, it should be the fully-qualified name. For example, 1369 /// `"google.api.http"`. 1370 /// </summary> 1371 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1372 public string Name { 1373 get { return name_; } 1374 set { 1375 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1376 } 1377 } 1378 1379 /// <summary>Field number for the "value" field.</summary> 1380 public const int ValueFieldNumber = 2; 1381 private global::Google.Protobuf.WellKnownTypes.Any value_; 1382 /// <summary> 1383 /// The option's value packed in an Any message. If the value is a primitive, 1384 /// the corresponding wrapper type defined in google/protobuf/wrappers.proto 1385 /// should be used. If the value is an enum, it should be stored as an int32 1386 /// value using the google.protobuf.Int32Value type. 1387 /// </summary> 1388 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1389 public global::Google.Protobuf.WellKnownTypes.Any Value { 1390 get { return value_; } 1391 set { 1392 value_ = value; 1393 } 1394 } 1395 1396 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)1397 public override bool Equals(object other) { 1398 return Equals(other as Option); 1399 } 1400 1401 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(Option other)1402 public bool Equals(Option other) { 1403 if (ReferenceEquals(other, null)) { 1404 return false; 1405 } 1406 if (ReferenceEquals(other, this)) { 1407 return true; 1408 } 1409 if (Name != other.Name) return false; 1410 if (!object.Equals(Value, other.Value)) return false; 1411 return Equals(_unknownFields, other._unknownFields); 1412 } 1413 1414 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()1415 public override int GetHashCode() { 1416 int hash = 1; 1417 if (Name.Length != 0) hash ^= Name.GetHashCode(); 1418 if (value_ != null) hash ^= Value.GetHashCode(); 1419 if (_unknownFields != null) { 1420 hash ^= _unknownFields.GetHashCode(); 1421 } 1422 return hash; 1423 } 1424 1425 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()1426 public override string ToString() { 1427 return pb::JsonFormatter.ToDiagnosticString(this); 1428 } 1429 1430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)1431 public void WriteTo(pb::CodedOutputStream output) { 1432 if (Name.Length != 0) { 1433 output.WriteRawTag(10); 1434 output.WriteString(Name); 1435 } 1436 if (value_ != null) { 1437 output.WriteRawTag(18); 1438 output.WriteMessage(Value); 1439 } 1440 if (_unknownFields != null) { 1441 _unknownFields.WriteTo(output); 1442 } 1443 } 1444 1445 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()1446 public int CalculateSize() { 1447 int size = 0; 1448 if (Name.Length != 0) { 1449 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 1450 } 1451 if (value_ != null) { 1452 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); 1453 } 1454 if (_unknownFields != null) { 1455 size += _unknownFields.CalculateSize(); 1456 } 1457 return size; 1458 } 1459 1460 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(Option other)1461 public void MergeFrom(Option other) { 1462 if (other == null) { 1463 return; 1464 } 1465 if (other.Name.Length != 0) { 1466 Name = other.Name; 1467 } 1468 if (other.value_ != null) { 1469 if (value_ == null) { 1470 Value = new global::Google.Protobuf.WellKnownTypes.Any(); 1471 } 1472 Value.MergeFrom(other.Value); 1473 } 1474 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1475 } 1476 1477 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)1478 public void MergeFrom(pb::CodedInputStream input) { 1479 uint tag; 1480 while ((tag = input.ReadTag()) != 0) { 1481 switch(tag) { 1482 default: 1483 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1484 break; 1485 case 10: { 1486 Name = input.ReadString(); 1487 break; 1488 } 1489 case 18: { 1490 if (value_ == null) { 1491 Value = new global::Google.Protobuf.WellKnownTypes.Any(); 1492 } 1493 input.ReadMessage(Value); 1494 break; 1495 } 1496 } 1497 } 1498 } 1499 1500 } 1501 1502 #endregion 1503 1504 } 1505 1506 #endregion Designer generated code 1507