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