blob: ff2ecc579cc16bb3829737a547926793a4622771 [file] [log] [blame]
Jon Skeet62a4aa52015-07-14 14:26:49 +01001// 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
6using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
8using pbr = global::Google.Protobuf.Reflection;
9using scg = global::System.Collections.Generic;
10namespace Google.Protobuf.WellKnownTypes {
11
12 namespace Proto {
13
14 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
15 public static partial class Type {
16
Jon Skeet62a4aa52015-07-14 14:26:49 +010017 #region Descriptor
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
20 }
21 private static pbr::FileDescriptor descriptor;
22
23 static Type() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVm",
27 "Ghlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvGiRnb29nbGUvcHJvdG9idWYv",
28 "c291cmNlX2NvbnRleHQucHJvdG8irgEKBFR5cGUSDAoEbmFtZRgBIAEoCRIm",
29 "CgZmaWVsZHMYAiADKAsyFi5nb29nbGUucHJvdG9idWYuRmllbGQSDgoGb25l",
30 "b2ZzGAMgAygJEigKB29wdGlvbnMYBCADKAsyFy5nb29nbGUucHJvdG9idWYu",
31 "T3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3Rv",
32 "YnVmLlNvdXJjZUNvbnRleHQimwUKBUZpZWxkEikKBGtpbmQYASABKA4yGy5n",
33 "b29nbGUucHJvdG9idWYuRmllbGQuS2luZBI3CgtjYXJkaW5hbGl0eRgCIAEo",
34 "DjIiLmdvb2dsZS5wcm90b2J1Zi5GaWVsZC5DYXJkaW5hbGl0eRIOCgZudW1i",
35 "ZXIYAyABKAUSDAoEbmFtZRgEIAEoCRIQCgh0eXBlX3VybBgGIAEoCRITCgtv",
36 "bmVvZl9pbmRleBgHIAEoBRIOCgZwYWNrZWQYCCABKAgSKAoHb3B0aW9ucxgJ",
37 "IAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb24iuAIKBEtpbmQSEAoMVFlQ",
38 "RV9VTktOT1dOEAASDwoLVFlQRV9ET1VCTEUQARIOCgpUWVBFX0ZMT0FUEAIS",
39 "DgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlOVDY0EAQSDgoKVFlQRV9JTlQz",
40 "MhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZUEVfRklYRUQzMhAHEg0KCVRZ",
41 "UEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkSEAoMVFlQRV9NRVNTQUdFEAsS",
42 "DgoKVFlQRV9CWVRFUxAMEg8KC1RZUEVfVUlOVDMyEA0SDQoJVFlQRV9FTlVN",
43 "EA4SEQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0ZJWEVENjQQEBIPCgtU",
44 "WVBFX1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIidAoLQ2FyZGluYWxpdHkS",
45 "FwoTQ0FSRElOQUxJVFlfVU5LTk9XThAAEhgKFENBUkRJTkFMSVRZX09QVElP",
46 "TkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRDQVJESU5BTElU",
47 "WV9SRVBFQVRFRBADIqUBCgRFbnVtEgwKBG5hbWUYASABKAkSLQoJZW51bXZh",
48 "bHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1ZRIoCgdvcHRp",
49 "b25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2Cg5zb3VyY2Vf",
50 "Y29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb250ZXh0",
51 "IlMKCUVudW1WYWx1ZRIMCgRuYW1lGAEgASgJEg4KBm51bWJlchgCIAEoBRIo",
52 "CgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbiI7CgZP",
53 "cHRpb24SDAoEbmFtZRgBIAEoCRIjCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5w",
54 "cm90b2J1Zi5BbnlCSQoTY29tLmdvb2dsZS5wcm90b2J1ZkIJVHlwZVByb3Rv",
55 "UAGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy",
Jon Skeet47bf49b2015-07-22 11:39:38 +010056 "b3RvMw=="));
Jon Skeet62a4aa52015-07-14 14:26:49 +010057 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +010058 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Proto.Any.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, },
Jon Skeet47bf49b2015-07-22 11:39:38 +010059 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
60 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Type), new[]{ "Name", "Fields", "Oneofs", "Options", "SourceContext" }, null, null, null),
61 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Field), new[]{ "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options" }, null, new[]{ typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) }, null),
62 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Enum), new[]{ "Name", "Enumvalue", "Options", "SourceContext" }, null, null, null),
63 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.EnumValue), new[]{ "Name", "Number", "Options" }, null, null, null),
64 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Option), new[]{ "Name", "Value" }, null, null, null)
65 }));
Jon Skeet62a4aa52015-07-14 14:26:49 +010066 }
67 #endregion
68
69 }
70 }
71 #region Messages
72 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
73 public sealed partial class Type : pb::IMessage<Type> {
74 private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type());
75 public static pb::MessageParser<Type> Parser { get { return _parser; } }
76
Jon Skeet62a4aa52015-07-14 14:26:49 +010077 public static pbr::MessageDescriptor Descriptor {
78 get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[0]; }
79 }
80
Jon Skeet96cffaa2015-07-20 19:25:07 +010081 pbr::MessageDescriptor pb::IMessage.Descriptor {
82 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010083 }
84
Jon Skeet62a4aa52015-07-14 14:26:49 +010085 public Type() {
86 OnConstruction();
87 }
88
89 partial void OnConstruction();
90
91 public Type(Type other) : this() {
92 name_ = other.name_;
93 fields_ = other.fields_.Clone();
94 oneofs_ = other.oneofs_.Clone();
95 options_ = other.options_.Clone();
96 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
97 }
98
99 public Type Clone() {
100 return new Type(this);
101 }
102
Jon Skeet62a4aa52015-07-14 14:26:49 +0100103 public const int NameFieldNumber = 1;
104 private string name_ = "";
105 public string Name {
106 get { return name_; }
107 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100108 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100109 }
110 }
111
112 public const int FieldsFieldNumber = 2;
113 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fields_codec
114 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser);
115 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field>();
116 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fields {
117 get { return fields_; }
118 }
119
120 public const int OneofsFieldNumber = 3;
121 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec
122 = pb::FieldCodec.ForString(26);
123 private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField<string>();
124 public pbc::RepeatedField<string> Oneofs {
125 get { return oneofs_; }
126 }
127
128 public const int OptionsFieldNumber = 4;
129 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
130 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser);
131 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
132 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
133 get { return options_; }
134 }
135
136 public const int SourceContextFieldNumber = 5;
137 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
138 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
139 get { return sourceContext_; }
140 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100141 sourceContext_ = value;
142 }
143 }
144
145 public override bool Equals(object other) {
146 return Equals(other as Type);
147 }
148
149 public bool Equals(Type other) {
150 if (ReferenceEquals(other, null)) {
151 return false;
152 }
153 if (ReferenceEquals(other, this)) {
154 return true;
155 }
156 if (Name != other.Name) return false;
157 if(!fields_.Equals(other.fields_)) return false;
158 if(!oneofs_.Equals(other.oneofs_)) return false;
159 if(!options_.Equals(other.options_)) return false;
160 if (!object.Equals(SourceContext, other.SourceContext)) return false;
161 return true;
162 }
163
164 public override int GetHashCode() {
165 int hash = 1;
166 if (Name.Length != 0) hash ^= Name.GetHashCode();
167 hash ^= fields_.GetHashCode();
168 hash ^= oneofs_.GetHashCode();
169 hash ^= options_.GetHashCode();
170 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode();
171 return hash;
172 }
173
174 public override string ToString() {
175 return pb::JsonFormatter.Default.Format(this);
176 }
177
178 public void WriteTo(pb::CodedOutputStream output) {
179 if (Name.Length != 0) {
180 output.WriteRawTag(10);
181 output.WriteString(Name);
182 }
183 fields_.WriteTo(output, _repeated_fields_codec);
184 oneofs_.WriteTo(output, _repeated_oneofs_codec);
185 options_.WriteTo(output, _repeated_options_codec);
186 if (sourceContext_ != null) {
187 output.WriteRawTag(42);
188 output.WriteMessage(SourceContext);
189 }
190 }
191
192 public int CalculateSize() {
193 int size = 0;
194 if (Name.Length != 0) {
195 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
196 }
197 size += fields_.CalculateSize(_repeated_fields_codec);
198 size += oneofs_.CalculateSize(_repeated_oneofs_codec);
199 size += options_.CalculateSize(_repeated_options_codec);
200 if (sourceContext_ != null) {
201 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext);
202 }
203 return size;
204 }
205
206 public void MergeFrom(Type other) {
207 if (other == null) {
208 return;
209 }
210 if (other.Name.Length != 0) {
211 Name = other.Name;
212 }
213 fields_.Add(other.fields_);
214 oneofs_.Add(other.oneofs_);
215 options_.Add(other.options_);
216 if (other.sourceContext_ != null) {
217 if (sourceContext_ == null) {
218 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
219 }
220 SourceContext.MergeFrom(other.SourceContext);
221 }
222 }
223
224 public void MergeFrom(pb::CodedInputStream input) {
225 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100226 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100227 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100228 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100229 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100230 break;
231 case 10: {
232 Name = input.ReadString();
233 break;
234 }
235 case 18: {
236 fields_.AddEntriesFrom(input, _repeated_fields_codec);
237 break;
238 }
239 case 26: {
240 oneofs_.AddEntriesFrom(input, _repeated_oneofs_codec);
241 break;
242 }
243 case 34: {
244 options_.AddEntriesFrom(input, _repeated_options_codec);
245 break;
246 }
247 case 42: {
248 if (sourceContext_ == null) {
249 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
250 }
251 input.ReadMessage(sourceContext_);
252 break;
253 }
254 }
255 }
256 }
257
258 }
259
260 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
261 public sealed partial class Field : pb::IMessage<Field> {
262 private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field());
263 public static pb::MessageParser<Field> Parser { get { return _parser; } }
264
Jon Skeet62a4aa52015-07-14 14:26:49 +0100265 public static pbr::MessageDescriptor Descriptor {
266 get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[1]; }
267 }
268
Jon Skeet96cffaa2015-07-20 19:25:07 +0100269 pbr::MessageDescriptor pb::IMessage.Descriptor {
270 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100271 }
272
Jon Skeet62a4aa52015-07-14 14:26:49 +0100273 public Field() {
274 OnConstruction();
275 }
276
277 partial void OnConstruction();
278
279 public Field(Field other) : this() {
280 kind_ = other.kind_;
281 cardinality_ = other.cardinality_;
282 number_ = other.number_;
283 name_ = other.name_;
284 typeUrl_ = other.typeUrl_;
285 oneofIndex_ = other.oneofIndex_;
286 packed_ = other.packed_;
287 options_ = other.options_.Clone();
288 }
289
290 public Field Clone() {
291 return new Field(this);
292 }
293
Jon Skeet62a4aa52015-07-14 14:26:49 +0100294 public const int KindFieldNumber = 1;
295 private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN;
296 public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind {
297 get { return kind_; }
298 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100299 kind_ = value;
300 }
301 }
302
303 public const int CardinalityFieldNumber = 2;
304 private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN;
305 public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality {
306 get { return cardinality_; }
307 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100308 cardinality_ = value;
309 }
310 }
311
312 public const int NumberFieldNumber = 3;
313 private int number_;
314 public int Number {
315 get { return number_; }
316 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100317 number_ = value;
318 }
319 }
320
321 public const int NameFieldNumber = 4;
322 private string name_ = "";
323 public string Name {
324 get { return name_; }
325 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100326 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100327 }
328 }
329
330 public const int TypeUrlFieldNumber = 6;
331 private string typeUrl_ = "";
332 public string TypeUrl {
333 get { return typeUrl_; }
334 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100335 typeUrl_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100336 }
337 }
338
339 public const int OneofIndexFieldNumber = 7;
340 private int oneofIndex_;
341 public int OneofIndex {
342 get { return oneofIndex_; }
343 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100344 oneofIndex_ = value;
345 }
346 }
347
348 public const int PackedFieldNumber = 8;
349 private bool packed_;
350 public bool Packed {
351 get { return packed_; }
352 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100353 packed_ = value;
354 }
355 }
356
357 public const int OptionsFieldNumber = 9;
358 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
359 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser);
360 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
361 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
362 get { return options_; }
363 }
364
365 public override bool Equals(object other) {
366 return Equals(other as Field);
367 }
368
369 public bool Equals(Field other) {
370 if (ReferenceEquals(other, null)) {
371 return false;
372 }
373 if (ReferenceEquals(other, this)) {
374 return true;
375 }
376 if (Kind != other.Kind) return false;
377 if (Cardinality != other.Cardinality) return false;
378 if (Number != other.Number) return false;
379 if (Name != other.Name) return false;
380 if (TypeUrl != other.TypeUrl) return false;
381 if (OneofIndex != other.OneofIndex) return false;
382 if (Packed != other.Packed) return false;
383 if(!options_.Equals(other.options_)) return false;
384 return true;
385 }
386
387 public override int GetHashCode() {
388 int hash = 1;
389 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) hash ^= Kind.GetHashCode();
390 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN) hash ^= Cardinality.GetHashCode();
391 if (Number != 0) hash ^= Number.GetHashCode();
392 if (Name.Length != 0) hash ^= Name.GetHashCode();
393 if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode();
394 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode();
395 if (Packed != false) hash ^= Packed.GetHashCode();
396 hash ^= options_.GetHashCode();
397 return hash;
398 }
399
400 public override string ToString() {
401 return pb::JsonFormatter.Default.Format(this);
402 }
403
404 public void WriteTo(pb::CodedOutputStream output) {
405 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) {
406 output.WriteRawTag(8);
407 output.WriteEnum((int) Kind);
408 }
409 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN) {
410 output.WriteRawTag(16);
411 output.WriteEnum((int) Cardinality);
412 }
413 if (Number != 0) {
414 output.WriteRawTag(24);
415 output.WriteInt32(Number);
416 }
417 if (Name.Length != 0) {
418 output.WriteRawTag(34);
419 output.WriteString(Name);
420 }
421 if (TypeUrl.Length != 0) {
422 output.WriteRawTag(50);
423 output.WriteString(TypeUrl);
424 }
425 if (OneofIndex != 0) {
426 output.WriteRawTag(56);
427 output.WriteInt32(OneofIndex);
428 }
429 if (Packed != false) {
430 output.WriteRawTag(64);
431 output.WriteBool(Packed);
432 }
433 options_.WriteTo(output, _repeated_options_codec);
434 }
435
436 public int CalculateSize() {
437 int size = 0;
438 if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) {
439 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind);
440 }
441 if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN) {
442 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality);
443 }
444 if (Number != 0) {
445 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number);
446 }
447 if (Name.Length != 0) {
448 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
449 }
450 if (TypeUrl.Length != 0) {
451 size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl);
452 }
453 if (OneofIndex != 0) {
454 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex);
455 }
456 if (Packed != false) {
457 size += 1 + 1;
458 }
459 size += options_.CalculateSize(_repeated_options_codec);
460 return size;
461 }
462
463 public void MergeFrom(Field other) {
464 if (other == null) {
465 return;
466 }
467 if (other.Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) {
468 Kind = other.Kind;
469 }
470 if (other.Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN) {
471 Cardinality = other.Cardinality;
472 }
473 if (other.Number != 0) {
474 Number = other.Number;
475 }
476 if (other.Name.Length != 0) {
477 Name = other.Name;
478 }
479 if (other.TypeUrl.Length != 0) {
480 TypeUrl = other.TypeUrl;
481 }
482 if (other.OneofIndex != 0) {
483 OneofIndex = other.OneofIndex;
484 }
485 if (other.Packed != false) {
486 Packed = other.Packed;
487 }
488 options_.Add(other.options_);
489 }
490
491 public void MergeFrom(pb::CodedInputStream input) {
492 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100493 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100494 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100495 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100496 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100497 break;
498 case 8: {
499 kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum();
500 break;
501 }
502 case 16: {
503 cardinality_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum();
504 break;
505 }
506 case 24: {
507 Number = input.ReadInt32();
508 break;
509 }
510 case 34: {
511 Name = input.ReadString();
512 break;
513 }
514 case 50: {
515 TypeUrl = input.ReadString();
516 break;
517 }
518 case 56: {
519 OneofIndex = input.ReadInt32();
520 break;
521 }
522 case 64: {
523 Packed = input.ReadBool();
524 break;
525 }
526 case 74: {
527 options_.AddEntriesFrom(input, _repeated_options_codec);
528 break;
529 }
530 }
531 }
532 }
533
534 #region Nested types
535 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
536 public static partial class Types {
537 public enum Kind {
538 TYPE_UNKNOWN = 0,
539 TYPE_DOUBLE = 1,
540 TYPE_FLOAT = 2,
541 TYPE_INT64 = 3,
542 TYPE_UINT64 = 4,
543 TYPE_INT32 = 5,
544 TYPE_FIXED64 = 6,
545 TYPE_FIXED32 = 7,
546 TYPE_BOOL = 8,
547 TYPE_STRING = 9,
548 TYPE_MESSAGE = 11,
549 TYPE_BYTES = 12,
550 TYPE_UINT32 = 13,
551 TYPE_ENUM = 14,
552 TYPE_SFIXED32 = 15,
553 TYPE_SFIXED64 = 16,
554 TYPE_SINT32 = 17,
555 TYPE_SINT64 = 18,
556 }
557
558 public enum Cardinality {
559 CARDINALITY_UNKNOWN = 0,
560 CARDINALITY_OPTIONAL = 1,
561 CARDINALITY_REQUIRED = 2,
562 CARDINALITY_REPEATED = 3,
563 }
564
565 }
566 #endregion
567
568 }
569
570 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
571 public sealed partial class Enum : pb::IMessage<Enum> {
572 private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum());
573 public static pb::MessageParser<Enum> Parser { get { return _parser; } }
574
Jon Skeet62a4aa52015-07-14 14:26:49 +0100575 public static pbr::MessageDescriptor Descriptor {
576 get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[2]; }
577 }
578
Jon Skeet96cffaa2015-07-20 19:25:07 +0100579 pbr::MessageDescriptor pb::IMessage.Descriptor {
580 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100581 }
582
Jon Skeet62a4aa52015-07-14 14:26:49 +0100583 public Enum() {
584 OnConstruction();
585 }
586
587 partial void OnConstruction();
588
589 public Enum(Enum other) : this() {
590 name_ = other.name_;
591 enumvalue_ = other.enumvalue_.Clone();
592 options_ = other.options_.Clone();
593 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
594 }
595
596 public Enum Clone() {
597 return new Enum(this);
598 }
599
Jon Skeet62a4aa52015-07-14 14:26:49 +0100600 public const int NameFieldNumber = 1;
601 private string name_ = "";
602 public string Name {
603 get { return name_; }
604 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100605 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100606 }
607 }
608
609 public const int EnumvalueFieldNumber = 2;
610 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated_enumvalue_codec
611 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser);
612 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>();
613 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue> Enumvalue {
614 get { return enumvalue_; }
615 }
616
617 public const int OptionsFieldNumber = 3;
618 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
619 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
620 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
621 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
622 get { return options_; }
623 }
624
625 public const int SourceContextFieldNumber = 4;
626 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
627 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
628 get { return sourceContext_; }
629 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100630 sourceContext_ = value;
631 }
632 }
633
634 public override bool Equals(object other) {
635 return Equals(other as Enum);
636 }
637
638 public bool Equals(Enum other) {
639 if (ReferenceEquals(other, null)) {
640 return false;
641 }
642 if (ReferenceEquals(other, this)) {
643 return true;
644 }
645 if (Name != other.Name) return false;
646 if(!enumvalue_.Equals(other.enumvalue_)) return false;
647 if(!options_.Equals(other.options_)) return false;
648 if (!object.Equals(SourceContext, other.SourceContext)) return false;
649 return true;
650 }
651
652 public override int GetHashCode() {
653 int hash = 1;
654 if (Name.Length != 0) hash ^= Name.GetHashCode();
655 hash ^= enumvalue_.GetHashCode();
656 hash ^= options_.GetHashCode();
657 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode();
658 return hash;
659 }
660
661 public override string ToString() {
662 return pb::JsonFormatter.Default.Format(this);
663 }
664
665 public void WriteTo(pb::CodedOutputStream output) {
666 if (Name.Length != 0) {
667 output.WriteRawTag(10);
668 output.WriteString(Name);
669 }
670 enumvalue_.WriteTo(output, _repeated_enumvalue_codec);
671 options_.WriteTo(output, _repeated_options_codec);
672 if (sourceContext_ != null) {
673 output.WriteRawTag(34);
674 output.WriteMessage(SourceContext);
675 }
676 }
677
678 public int CalculateSize() {
679 int size = 0;
680 if (Name.Length != 0) {
681 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
682 }
683 size += enumvalue_.CalculateSize(_repeated_enumvalue_codec);
684 size += options_.CalculateSize(_repeated_options_codec);
685 if (sourceContext_ != null) {
686 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext);
687 }
688 return size;
689 }
690
691 public void MergeFrom(Enum other) {
692 if (other == null) {
693 return;
694 }
695 if (other.Name.Length != 0) {
696 Name = other.Name;
697 }
698 enumvalue_.Add(other.enumvalue_);
699 options_.Add(other.options_);
700 if (other.sourceContext_ != null) {
701 if (sourceContext_ == null) {
702 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
703 }
704 SourceContext.MergeFrom(other.SourceContext);
705 }
706 }
707
708 public void MergeFrom(pb::CodedInputStream input) {
709 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100710 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100711 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100712 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100713 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100714 break;
715 case 10: {
716 Name = input.ReadString();
717 break;
718 }
719 case 18: {
720 enumvalue_.AddEntriesFrom(input, _repeated_enumvalue_codec);
721 break;
722 }
723 case 26: {
724 options_.AddEntriesFrom(input, _repeated_options_codec);
725 break;
726 }
727 case 34: {
728 if (sourceContext_ == null) {
729 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
730 }
731 input.ReadMessage(sourceContext_);
732 break;
733 }
734 }
735 }
736 }
737
738 }
739
740 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
741 public sealed partial class EnumValue : pb::IMessage<EnumValue> {
742 private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue());
743 public static pb::MessageParser<EnumValue> Parser { get { return _parser; } }
744
Jon Skeet62a4aa52015-07-14 14:26:49 +0100745 public static pbr::MessageDescriptor Descriptor {
746 get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[3]; }
747 }
748
Jon Skeet96cffaa2015-07-20 19:25:07 +0100749 pbr::MessageDescriptor pb::IMessage.Descriptor {
750 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100751 }
752
Jon Skeet62a4aa52015-07-14 14:26:49 +0100753 public EnumValue() {
754 OnConstruction();
755 }
756
757 partial void OnConstruction();
758
759 public EnumValue(EnumValue other) : this() {
760 name_ = other.name_;
761 number_ = other.number_;
762 options_ = other.options_.Clone();
763 }
764
765 public EnumValue Clone() {
766 return new EnumValue(this);
767 }
768
Jon Skeet62a4aa52015-07-14 14:26:49 +0100769 public const int NameFieldNumber = 1;
770 private string name_ = "";
771 public string Name {
772 get { return name_; }
773 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100774 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100775 }
776 }
777
778 public const int NumberFieldNumber = 2;
779 private int number_;
780 public int Number {
781 get { return number_; }
782 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100783 number_ = value;
784 }
785 }
786
787 public const int OptionsFieldNumber = 3;
788 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
789 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
790 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
791 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
792 get { return options_; }
793 }
794
795 public override bool Equals(object other) {
796 return Equals(other as EnumValue);
797 }
798
799 public bool Equals(EnumValue other) {
800 if (ReferenceEquals(other, null)) {
801 return false;
802 }
803 if (ReferenceEquals(other, this)) {
804 return true;
805 }
806 if (Name != other.Name) return false;
807 if (Number != other.Number) return false;
808 if(!options_.Equals(other.options_)) return false;
809 return true;
810 }
811
812 public override int GetHashCode() {
813 int hash = 1;
814 if (Name.Length != 0) hash ^= Name.GetHashCode();
815 if (Number != 0) hash ^= Number.GetHashCode();
816 hash ^= options_.GetHashCode();
817 return hash;
818 }
819
820 public override string ToString() {
821 return pb::JsonFormatter.Default.Format(this);
822 }
823
824 public void WriteTo(pb::CodedOutputStream output) {
825 if (Name.Length != 0) {
826 output.WriteRawTag(10);
827 output.WriteString(Name);
828 }
829 if (Number != 0) {
830 output.WriteRawTag(16);
831 output.WriteInt32(Number);
832 }
833 options_.WriteTo(output, _repeated_options_codec);
834 }
835
836 public int CalculateSize() {
837 int size = 0;
838 if (Name.Length != 0) {
839 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
840 }
841 if (Number != 0) {
842 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number);
843 }
844 size += options_.CalculateSize(_repeated_options_codec);
845 return size;
846 }
847
848 public void MergeFrom(EnumValue other) {
849 if (other == null) {
850 return;
851 }
852 if (other.Name.Length != 0) {
853 Name = other.Name;
854 }
855 if (other.Number != 0) {
856 Number = other.Number;
857 }
858 options_.Add(other.options_);
859 }
860
861 public void MergeFrom(pb::CodedInputStream input) {
862 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100863 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100864 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100865 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100866 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100867 break;
868 case 10: {
869 Name = input.ReadString();
870 break;
871 }
872 case 16: {
873 Number = input.ReadInt32();
874 break;
875 }
876 case 26: {
877 options_.AddEntriesFrom(input, _repeated_options_codec);
878 break;
879 }
880 }
881 }
882 }
883
884 }
885
886 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
887 public sealed partial class Option : pb::IMessage<Option> {
888 private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option());
889 public static pb::MessageParser<Option> Parser { get { return _parser; } }
890
Jon Skeet62a4aa52015-07-14 14:26:49 +0100891 public static pbr::MessageDescriptor Descriptor {
892 get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[4]; }
893 }
894
Jon Skeet96cffaa2015-07-20 19:25:07 +0100895 pbr::MessageDescriptor pb::IMessage.Descriptor {
896 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100897 }
898
Jon Skeet62a4aa52015-07-14 14:26:49 +0100899 public Option() {
900 OnConstruction();
901 }
902
903 partial void OnConstruction();
904
905 public Option(Option other) : this() {
906 name_ = other.name_;
907 Value = other.value_ != null ? other.Value.Clone() : null;
908 }
909
910 public Option Clone() {
911 return new Option(this);
912 }
913
Jon Skeet62a4aa52015-07-14 14:26:49 +0100914 public const int NameFieldNumber = 1;
915 private string name_ = "";
916 public string Name {
917 get { return name_; }
918 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100919 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100920 }
921 }
922
923 public const int ValueFieldNumber = 2;
924 private global::Google.Protobuf.WellKnownTypes.Any value_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100925 public global::Google.Protobuf.WellKnownTypes.Any Value {
926 get { return value_; }
927 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100928 value_ = value;
929 }
930 }
931
932 public override bool Equals(object other) {
933 return Equals(other as Option);
934 }
935
936 public bool Equals(Option other) {
937 if (ReferenceEquals(other, null)) {
938 return false;
939 }
940 if (ReferenceEquals(other, this)) {
941 return true;
942 }
943 if (Name != other.Name) return false;
944 if (!object.Equals(Value, other.Value)) return false;
945 return true;
946 }
947
948 public override int GetHashCode() {
949 int hash = 1;
950 if (Name.Length != 0) hash ^= Name.GetHashCode();
951 if (value_ != null) hash ^= Value.GetHashCode();
952 return hash;
953 }
954
955 public override string ToString() {
956 return pb::JsonFormatter.Default.Format(this);
957 }
958
959 public void WriteTo(pb::CodedOutputStream output) {
960 if (Name.Length != 0) {
961 output.WriteRawTag(10);
962 output.WriteString(Name);
963 }
964 if (value_ != null) {
965 output.WriteRawTag(18);
966 output.WriteMessage(Value);
967 }
968 }
969
970 public int CalculateSize() {
971 int size = 0;
972 if (Name.Length != 0) {
973 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
974 }
975 if (value_ != null) {
976 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value);
977 }
978 return size;
979 }
980
981 public void MergeFrom(Option other) {
982 if (other == null) {
983 return;
984 }
985 if (other.Name.Length != 0) {
986 Name = other.Name;
987 }
988 if (other.value_ != null) {
989 if (value_ == null) {
990 value_ = new global::Google.Protobuf.WellKnownTypes.Any();
991 }
992 Value.MergeFrom(other.Value);
993 }
994 }
995
996 public void MergeFrom(pb::CodedInputStream input) {
997 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100998 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100999 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +01001000 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001001 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +01001002 break;
1003 case 10: {
1004 Name = input.ReadString();
1005 break;
1006 }
1007 case 18: {
1008 if (value_ == null) {
1009 value_ = new global::Google.Protobuf.WellKnownTypes.Any();
1010 }
1011 input.ReadMessage(value_);
1012 break;
1013 }
1014 }
1015 }
1016 }
1017
1018 }
1019
1020 #endregion
1021
1022}
1023
1024#endregion Designer generated code