blob: 1e8a8236b160e91d822130c236c0afb576173936 [file] [log] [blame]
Jon Skeet62a4aa52015-07-14 14:26:49 +01001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/struct.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 Struct {
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 Struct() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i",
27 "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i",
28 "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB",
29 "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC",
30 "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv",
31 "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM",
32 "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K",
33 "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI",
34 "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW",
35 "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW",
36 "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W",
37 "QUxVRRAAQk4KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAGg",
38 "AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy",
Jon Skeet47bf49b2015-07-22 11:39:38 +010039 "b3RvMw=="));
Jon Skeet62a4aa52015-07-14 14:26:49 +010040 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +010041 new pbr::FileDescriptor[] { },
Jon Skeet47bf49b2015-07-22 11:39:38 +010042 new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, new pbr::GeneratedCodeInfo[] {
43 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), new[]{ "Fields" }, null, null, new pbr::GeneratedCodeInfo[] { null, }),
44 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Value), new[]{ "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" }, new[]{ "Kind" }, null, null),
45 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), new[]{ "Values" }, null, null, null)
46 }));
Jon Skeet62a4aa52015-07-14 14:26:49 +010047 }
48 #endregion
49
50 }
51 }
52 #region Enums
53 public enum NullValue {
54 NULL_VALUE = 0,
55 }
56
57 #endregion
58
59 #region Messages
60 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
61 public sealed partial class Struct : pb::IMessage<Struct> {
62 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
63 public static pb::MessageParser<Struct> Parser { get { return _parser; } }
64
Jon Skeet62a4aa52015-07-14 14:26:49 +010065 public static pbr::MessageDescriptor Descriptor {
66 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[0]; }
67 }
68
Jon Skeet96cffaa2015-07-20 19:25:07 +010069 pbr::MessageDescriptor pb::IMessage.Descriptor {
70 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010071 }
72
Jon Skeet62a4aa52015-07-14 14:26:49 +010073 public Struct() {
74 OnConstruction();
75 }
76
77 partial void OnConstruction();
78
79 public Struct(Struct other) : this() {
80 fields_ = other.fields_.Clone();
81 }
82
83 public Struct Clone() {
84 return new Struct(this);
85 }
86
Jon Skeet62a4aa52015-07-14 14:26:49 +010087 public const int FieldsFieldNumber = 1;
88 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec
89 = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 10);
90 private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>();
91 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
92 get { return fields_; }
93 }
94
95 public override bool Equals(object other) {
96 return Equals(other as Struct);
97 }
98
99 public bool Equals(Struct other) {
100 if (ReferenceEquals(other, null)) {
101 return false;
102 }
103 if (ReferenceEquals(other, this)) {
104 return true;
105 }
106 if (!Fields.Equals(other.Fields)) return false;
107 return true;
108 }
109
110 public override int GetHashCode() {
111 int hash = 1;
112 hash ^= Fields.GetHashCode();
113 return hash;
114 }
115
116 public override string ToString() {
117 return pb::JsonFormatter.Default.Format(this);
118 }
119
120 public void WriteTo(pb::CodedOutputStream output) {
121 fields_.WriteTo(output, _map_fields_codec);
122 }
123
124 public int CalculateSize() {
125 int size = 0;
126 size += fields_.CalculateSize(_map_fields_codec);
127 return size;
128 }
129
130 public void MergeFrom(Struct other) {
131 if (other == null) {
132 return;
133 }
134 fields_.Add(other.fields_);
135 }
136
137 public void MergeFrom(pb::CodedInputStream input) {
138 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100139 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100140 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100141 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100142 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100143 break;
144 case 10: {
145 fields_.AddEntriesFrom(input, _map_fields_codec);
146 break;
147 }
148 }
149 }
150 }
151
Jon Skeet62a4aa52015-07-14 14:26:49 +0100152 }
153
154 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
155 public sealed partial class Value : pb::IMessage<Value> {
156 private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
157 public static pb::MessageParser<Value> Parser { get { return _parser; } }
158
Jon Skeet62a4aa52015-07-14 14:26:49 +0100159 public static pbr::MessageDescriptor Descriptor {
160 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[1]; }
161 }
162
Jon Skeet96cffaa2015-07-20 19:25:07 +0100163 pbr::MessageDescriptor pb::IMessage.Descriptor {
164 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100165 }
166
Jon Skeet62a4aa52015-07-14 14:26:49 +0100167 public Value() {
168 OnConstruction();
169 }
170
171 partial void OnConstruction();
172
173 public Value(Value other) : this() {
174 switch (other.KindCase) {
175 case KindOneofCase.NullValue:
176 NullValue = other.NullValue;
177 break;
178 case KindOneofCase.NumberValue:
179 NumberValue = other.NumberValue;
180 break;
181 case KindOneofCase.StringValue:
182 StringValue = other.StringValue;
183 break;
184 case KindOneofCase.BoolValue:
185 BoolValue = other.BoolValue;
186 break;
187 case KindOneofCase.StructValue:
188 StructValue = other.StructValue.Clone();
189 break;
190 case KindOneofCase.ListValue:
191 ListValue = other.ListValue.Clone();
192 break;
193 }
194
195 }
196
197 public Value Clone() {
198 return new Value(this);
199 }
200
Jon Skeet62a4aa52015-07-14 14:26:49 +0100201 public const int NullValueFieldNumber = 1;
202 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
203 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NULL_VALUE; }
204 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100205 kind_ = value;
206 kindCase_ = KindOneofCase.NullValue;
207 }
208 }
209
210 public const int NumberValueFieldNumber = 2;
211 public double NumberValue {
212 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
213 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100214 kind_ = value;
215 kindCase_ = KindOneofCase.NumberValue;
216 }
217 }
218
219 public const int StringValueFieldNumber = 3;
220 public string StringValue {
221 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
222 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100223 kind_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100224 kindCase_ = KindOneofCase.StringValue;
225 }
226 }
227
228 public const int BoolValueFieldNumber = 4;
229 public bool BoolValue {
230 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
231 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100232 kind_ = value;
233 kindCase_ = KindOneofCase.BoolValue;
234 }
235 }
236
237 public const int StructValueFieldNumber = 5;
238 public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
239 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; }
240 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100241 kind_ = value;
242 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue;
243 }
244 }
245
246 public const int ListValueFieldNumber = 6;
247 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
248 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; }
249 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100250 kind_ = value;
251 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
252 }
253 }
254
255 private object kind_;
256 public enum KindOneofCase {
257 None = 0,
258 NullValue = 1,
259 NumberValue = 2,
260 StringValue = 3,
261 BoolValue = 4,
262 StructValue = 5,
263 ListValue = 6,
264 }
265 private KindOneofCase kindCase_ = KindOneofCase.None;
266 public KindOneofCase KindCase {
267 get { return kindCase_; }
268 }
269
270 public void ClearKind() {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100271 kindCase_ = KindOneofCase.None;
272 kind_ = null;
273 }
274
275 public override bool Equals(object other) {
276 return Equals(other as Value);
277 }
278
279 public bool Equals(Value other) {
280 if (ReferenceEquals(other, null)) {
281 return false;
282 }
283 if (ReferenceEquals(other, this)) {
284 return true;
285 }
286 if (NullValue != other.NullValue) return false;
287 if (NumberValue != other.NumberValue) return false;
288 if (StringValue != other.StringValue) return false;
289 if (BoolValue != other.BoolValue) return false;
290 if (!object.Equals(StructValue, other.StructValue)) return false;
291 if (!object.Equals(ListValue, other.ListValue)) return false;
292 return true;
293 }
294
295 public override int GetHashCode() {
296 int hash = 1;
297 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
298 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode();
299 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
300 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
301 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
302 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
303 return hash;
304 }
305
306 public override string ToString() {
307 return pb::JsonFormatter.Default.Format(this);
308 }
309
310 public void WriteTo(pb::CodedOutputStream output) {
311 if (kindCase_ == KindOneofCase.NullValue) {
312 output.WriteRawTag(8);
313 output.WriteEnum((int) NullValue);
314 }
315 if (kindCase_ == KindOneofCase.NumberValue) {
316 output.WriteRawTag(17);
317 output.WriteDouble(NumberValue);
318 }
319 if (kindCase_ == KindOneofCase.StringValue) {
320 output.WriteRawTag(26);
321 output.WriteString(StringValue);
322 }
323 if (kindCase_ == KindOneofCase.BoolValue) {
324 output.WriteRawTag(32);
325 output.WriteBool(BoolValue);
326 }
327 if (kindCase_ == KindOneofCase.StructValue) {
328 output.WriteRawTag(42);
329 output.WriteMessage(StructValue);
330 }
331 if (kindCase_ == KindOneofCase.ListValue) {
332 output.WriteRawTag(50);
333 output.WriteMessage(ListValue);
334 }
335 }
336
337 public int CalculateSize() {
338 int size = 0;
339 if (kindCase_ == KindOneofCase.NullValue) {
340 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
341 }
342 if (kindCase_ == KindOneofCase.NumberValue) {
343 size += 1 + 8;
344 }
345 if (kindCase_ == KindOneofCase.StringValue) {
346 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
347 }
348 if (kindCase_ == KindOneofCase.BoolValue) {
349 size += 1 + 1;
350 }
351 if (kindCase_ == KindOneofCase.StructValue) {
352 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
353 }
354 if (kindCase_ == KindOneofCase.ListValue) {
355 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
356 }
357 return size;
358 }
359
360 public void MergeFrom(Value other) {
361 if (other == null) {
362 return;
363 }
364 switch (other.KindCase) {
365 case KindOneofCase.NullValue:
366 NullValue = other.NullValue;
367 break;
368 case KindOneofCase.NumberValue:
369 NumberValue = other.NumberValue;
370 break;
371 case KindOneofCase.StringValue:
372 StringValue = other.StringValue;
373 break;
374 case KindOneofCase.BoolValue:
375 BoolValue = other.BoolValue;
376 break;
377 case KindOneofCase.StructValue:
378 StructValue = other.StructValue;
379 break;
380 case KindOneofCase.ListValue:
381 ListValue = other.ListValue;
382 break;
383 }
384
385 }
386
387 public void MergeFrom(pb::CodedInputStream input) {
388 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100389 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100390 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100391 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100392 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100393 break;
394 case 8: {
395 kind_ = input.ReadEnum();
396 kindCase_ = KindOneofCase.NullValue;
397 break;
398 }
399 case 17: {
400 NumberValue = input.ReadDouble();
401 break;
402 }
403 case 26: {
404 StringValue = input.ReadString();
405 break;
406 }
407 case 32: {
408 BoolValue = input.ReadBool();
409 break;
410 }
411 case 42: {
412 global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
413 if (kindCase_ == KindOneofCase.StructValue) {
414 subBuilder.MergeFrom(StructValue);
415 }
416 input.ReadMessage(subBuilder);
417 StructValue = subBuilder;
418 break;
419 }
420 case 50: {
421 global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
422 if (kindCase_ == KindOneofCase.ListValue) {
423 subBuilder.MergeFrom(ListValue);
424 }
425 input.ReadMessage(subBuilder);
426 ListValue = subBuilder;
427 break;
428 }
429 }
430 }
431 }
432
433 }
434
435 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
436 public sealed partial class ListValue : pb::IMessage<ListValue> {
437 private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
438 public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
439
Jon Skeet62a4aa52015-07-14 14:26:49 +0100440 public static pbr::MessageDescriptor Descriptor {
441 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[2]; }
442 }
443
Jon Skeet96cffaa2015-07-20 19:25:07 +0100444 pbr::MessageDescriptor pb::IMessage.Descriptor {
445 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100446 }
447
Jon Skeet62a4aa52015-07-14 14:26:49 +0100448 public ListValue() {
449 OnConstruction();
450 }
451
452 partial void OnConstruction();
453
454 public ListValue(ListValue other) : this() {
455 values_ = other.values_.Clone();
456 }
457
458 public ListValue Clone() {
459 return new ListValue(this);
460 }
461
Jon Skeet62a4aa52015-07-14 14:26:49 +0100462 public const int ValuesFieldNumber = 1;
463 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec
464 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
465 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100466 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
467 get { return values_; }
468 }
469
470 public override bool Equals(object other) {
471 return Equals(other as ListValue);
472 }
473
474 public bool Equals(ListValue other) {
475 if (ReferenceEquals(other, null)) {
476 return false;
477 }
478 if (ReferenceEquals(other, this)) {
479 return true;
480 }
481 if(!values_.Equals(other.values_)) return false;
482 return true;
483 }
484
485 public override int GetHashCode() {
486 int hash = 1;
487 hash ^= values_.GetHashCode();
488 return hash;
489 }
490
491 public override string ToString() {
492 return pb::JsonFormatter.Default.Format(this);
493 }
494
495 public void WriteTo(pb::CodedOutputStream output) {
496 values_.WriteTo(output, _repeated_values_codec);
497 }
498
499 public int CalculateSize() {
500 int size = 0;
501 size += values_.CalculateSize(_repeated_values_codec);
502 return size;
503 }
504
505 public void MergeFrom(ListValue other) {
506 if (other == null) {
507 return;
508 }
509 values_.Add(other.values_);
510 }
511
512 public void MergeFrom(pb::CodedInputStream input) {
513 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100514 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100515 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100516 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100517 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100518 break;
519 case 10: {
520 values_.AddEntriesFrom(input, _repeated_values_codec);
521 break;
522 }
523 }
524 }
525 }
526
527 }
528
529 #endregion
530
531}
532
533#endregion Designer generated code