blob: 8e2ce8cf791a0e0d15914e74003aa679be5c40ce [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
Jon Skeet284bb452015-11-05 09:13:53 +000012 /// <summary>Holder for reflection information generated from google/protobuf/struct.proto</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class StructReflection {
Jon Skeet62a4aa52015-07-14 14:26:49 +010015
Jon Skeet284bb452015-11-05 09:13:53 +000016 #region Descriptor
17 /// <summary>File descriptor for google/protobuf/struct.proto</summary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010020 }
Jon Skeet284bb452015-11-05 09:13:53 +000021 private static pbr::FileDescriptor descriptor;
22
23 static StructReflection() {
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",
39 "b3RvMw=="));
Jon Skeeta2667aa2015-11-19 17:14:23 +000040 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Jon Skeet284bb452015-11-05 09:13:53 +000041 new pbr::FileDescriptor[] { },
Jon Skeetb6159962016-02-04 07:08:55 +000042 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, new pbr::GeneratedClrTypeInfo[] {
43 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "Fields" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
44 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Value), global::Google.Protobuf.WellKnownTypes.Value.Parser, new[]{ "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" }, new[]{ "Kind" }, null, null),
45 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), global::Google.Protobuf.WellKnownTypes.ListValue.Parser, new[]{ "Values" }, null, null, null)
Jon Skeet284bb452015-11-05 09:13:53 +000046 }));
47 }
48 #endregion
49
Jon Skeet62a4aa52015-07-14 14:26:49 +010050 }
51 #region Enums
Jon Skeet18e0a2e2015-10-01 10:38:01 +010052 /// <summary>
53 /// `NullValue` is a singleton enumeration to represent the null value for the
54 /// `Value` type union.
Jon Skeetcff900e2015-11-06 18:38:31 +000055 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010056 /// The JSON representation for `NullValue` is JSON `null`.
57 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010058 public enum NullValue {
Jon Skeet18e0a2e2015-10-01 10:38:01 +010059 /// <summary>
60 /// Null value.
61 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010062 NULL_VALUE = 0,
63 }
64
65 #endregion
66
67 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010068 /// <summary>
69 /// `Struct` represents a structured data value, consisting of fields
70 /// which map to dynamically typed values. In some languages, `Struct`
71 /// might be supported by a native representation. For example, in
72 /// scripting languages like JS a struct is represented as an
73 /// object. The details of that representation are described together
74 /// with the proto support for the language.
Jon Skeetcff900e2015-11-06 18:38:31 +000075 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010076 /// The JSON representation for `Struct` is JSON object.
77 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010078 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
79 public sealed partial class Struct : pb::IMessage<Struct> {
80 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
81 public static pb::MessageParser<Struct> Parser { get { return _parser; } }
82
Jon Skeet62a4aa52015-07-14 14:26:49 +010083 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +000084 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[0]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010085 }
86
Jon Skeet96cffaa2015-07-20 19:25:07 +010087 pbr::MessageDescriptor pb::IMessage.Descriptor {
88 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010089 }
90
Jon Skeet62a4aa52015-07-14 14:26:49 +010091 public Struct() {
92 OnConstruction();
93 }
94
95 partial void OnConstruction();
96
97 public Struct(Struct other) : this() {
98 fields_ = other.fields_.Clone();
99 }
100
101 public Struct Clone() {
102 return new Struct(this);
103 }
104
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100105 /// <summary>Field number for the "fields" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100106 public const int FieldsFieldNumber = 1;
107 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec
108 = 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);
109 private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100110 /// <summary>
111 /// Map of dynamically typed values.
112 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100113 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
114 get { return fields_; }
115 }
116
117 public override bool Equals(object other) {
118 return Equals(other as Struct);
119 }
120
121 public bool Equals(Struct other) {
122 if (ReferenceEquals(other, null)) {
123 return false;
124 }
125 if (ReferenceEquals(other, this)) {
126 return true;
127 }
128 if (!Fields.Equals(other.Fields)) return false;
129 return true;
130 }
131
132 public override int GetHashCode() {
133 int hash = 1;
134 hash ^= Fields.GetHashCode();
135 return hash;
136 }
137
138 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000139 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100140 }
141
142 public void WriteTo(pb::CodedOutputStream output) {
143 fields_.WriteTo(output, _map_fields_codec);
144 }
145
146 public int CalculateSize() {
147 int size = 0;
148 size += fields_.CalculateSize(_map_fields_codec);
149 return size;
150 }
151
152 public void MergeFrom(Struct other) {
153 if (other == null) {
154 return;
155 }
156 fields_.Add(other.fields_);
157 }
158
159 public void MergeFrom(pb::CodedInputStream input) {
160 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100161 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100162 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100163 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100164 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100165 break;
166 case 10: {
167 fields_.AddEntriesFrom(input, _map_fields_codec);
168 break;
169 }
170 }
171 }
172 }
173
Jon Skeet62a4aa52015-07-14 14:26:49 +0100174 }
175
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100176 /// <summary>
177 /// `Value` represents a dynamically typed value which can be either
178 /// null, a number, a string, a boolean, a recursive struct value, or a
179 /// list of values. A producer of value is expected to set one of that
180 /// variants, absence of any variant indicates an error.
Jon Skeetcff900e2015-11-06 18:38:31 +0000181 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100182 /// The JSON representation for `Value` is JSON value.
183 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
185 public sealed partial class Value : pb::IMessage<Value> {
186 private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
187 public static pb::MessageParser<Value> Parser { get { return _parser; } }
188
Jon Skeet62a4aa52015-07-14 14:26:49 +0100189 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000190 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[1]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100191 }
192
Jon Skeet96cffaa2015-07-20 19:25:07 +0100193 pbr::MessageDescriptor pb::IMessage.Descriptor {
194 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100195 }
196
Jon Skeet62a4aa52015-07-14 14:26:49 +0100197 public Value() {
198 OnConstruction();
199 }
200
201 partial void OnConstruction();
202
203 public Value(Value other) : this() {
204 switch (other.KindCase) {
205 case KindOneofCase.NullValue:
206 NullValue = other.NullValue;
207 break;
208 case KindOneofCase.NumberValue:
209 NumberValue = other.NumberValue;
210 break;
211 case KindOneofCase.StringValue:
212 StringValue = other.StringValue;
213 break;
214 case KindOneofCase.BoolValue:
215 BoolValue = other.BoolValue;
216 break;
217 case KindOneofCase.StructValue:
218 StructValue = other.StructValue.Clone();
219 break;
220 case KindOneofCase.ListValue:
221 ListValue = other.ListValue.Clone();
222 break;
223 }
224
225 }
226
227 public Value Clone() {
228 return new Value(this);
229 }
230
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100231 /// <summary>Field number for the "null_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100232 public const int NullValueFieldNumber = 1;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100233 /// <summary>
234 /// Represents a null value.
235 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100236 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
237 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NULL_VALUE; }
238 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100239 kind_ = value;
240 kindCase_ = KindOneofCase.NullValue;
241 }
242 }
243
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100244 /// <summary>Field number for the "number_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100245 public const int NumberValueFieldNumber = 2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100246 /// <summary>
247 /// Represents a double value.
248 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100249 public double NumberValue {
250 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
251 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100252 kind_ = value;
253 kindCase_ = KindOneofCase.NumberValue;
254 }
255 }
256
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100257 /// <summary>Field number for the "string_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100258 public const int StringValueFieldNumber = 3;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100259 /// <summary>
260 /// Represents a string value.
261 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100262 public string StringValue {
263 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
264 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000265 kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100266 kindCase_ = KindOneofCase.StringValue;
267 }
268 }
269
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100270 /// <summary>Field number for the "bool_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100271 public const int BoolValueFieldNumber = 4;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100272 /// <summary>
273 /// Represents a boolean value.
274 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100275 public bool BoolValue {
276 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
277 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100278 kind_ = value;
279 kindCase_ = KindOneofCase.BoolValue;
280 }
281 }
282
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100283 /// <summary>Field number for the "struct_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100284 public const int StructValueFieldNumber = 5;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100285 /// <summary>
286 /// Represents a structured value.
287 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100288 public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
289 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; }
290 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100291 kind_ = value;
292 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue;
293 }
294 }
295
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100296 /// <summary>Field number for the "list_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100297 public const int ListValueFieldNumber = 6;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100298 /// <summary>
299 /// Represents a repeated `Value`.
300 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100301 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
302 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; }
303 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100304 kind_ = value;
305 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
306 }
307 }
308
309 private object kind_;
Jon Skeet6bbbdfa2015-09-30 06:59:38 +0100310 /// <summary>Enum of possible cases for the "kind" oneof.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100311 public enum KindOneofCase {
312 None = 0,
313 NullValue = 1,
314 NumberValue = 2,
315 StringValue = 3,
316 BoolValue = 4,
317 StructValue = 5,
318 ListValue = 6,
319 }
320 private KindOneofCase kindCase_ = KindOneofCase.None;
321 public KindOneofCase KindCase {
322 get { return kindCase_; }
323 }
324
325 public void ClearKind() {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100326 kindCase_ = KindOneofCase.None;
327 kind_ = null;
328 }
329
330 public override bool Equals(object other) {
331 return Equals(other as Value);
332 }
333
334 public bool Equals(Value other) {
335 if (ReferenceEquals(other, null)) {
336 return false;
337 }
338 if (ReferenceEquals(other, this)) {
339 return true;
340 }
341 if (NullValue != other.NullValue) return false;
342 if (NumberValue != other.NumberValue) return false;
343 if (StringValue != other.StringValue) return false;
344 if (BoolValue != other.BoolValue) return false;
345 if (!object.Equals(StructValue, other.StructValue)) return false;
346 if (!object.Equals(ListValue, other.ListValue)) return false;
Jon Skeet55313c92015-10-24 06:46:02 +0100347 if (KindCase != other.KindCase) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100348 return true;
349 }
350
351 public override int GetHashCode() {
352 int hash = 1;
353 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
354 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode();
355 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
356 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
357 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
358 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
Jon Skeet55313c92015-10-24 06:46:02 +0100359 hash ^= (int) kindCase_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100360 return hash;
361 }
362
363 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000364 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100365 }
366
367 public void WriteTo(pb::CodedOutputStream output) {
368 if (kindCase_ == KindOneofCase.NullValue) {
369 output.WriteRawTag(8);
370 output.WriteEnum((int) NullValue);
371 }
372 if (kindCase_ == KindOneofCase.NumberValue) {
373 output.WriteRawTag(17);
374 output.WriteDouble(NumberValue);
375 }
376 if (kindCase_ == KindOneofCase.StringValue) {
377 output.WriteRawTag(26);
378 output.WriteString(StringValue);
379 }
380 if (kindCase_ == KindOneofCase.BoolValue) {
381 output.WriteRawTag(32);
382 output.WriteBool(BoolValue);
383 }
384 if (kindCase_ == KindOneofCase.StructValue) {
385 output.WriteRawTag(42);
386 output.WriteMessage(StructValue);
387 }
388 if (kindCase_ == KindOneofCase.ListValue) {
389 output.WriteRawTag(50);
390 output.WriteMessage(ListValue);
391 }
392 }
393
394 public int CalculateSize() {
395 int size = 0;
396 if (kindCase_ == KindOneofCase.NullValue) {
397 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
398 }
399 if (kindCase_ == KindOneofCase.NumberValue) {
400 size += 1 + 8;
401 }
402 if (kindCase_ == KindOneofCase.StringValue) {
403 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
404 }
405 if (kindCase_ == KindOneofCase.BoolValue) {
406 size += 1 + 1;
407 }
408 if (kindCase_ == KindOneofCase.StructValue) {
409 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
410 }
411 if (kindCase_ == KindOneofCase.ListValue) {
412 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
413 }
414 return size;
415 }
416
417 public void MergeFrom(Value other) {
418 if (other == null) {
419 return;
420 }
421 switch (other.KindCase) {
422 case KindOneofCase.NullValue:
423 NullValue = other.NullValue;
424 break;
425 case KindOneofCase.NumberValue:
426 NumberValue = other.NumberValue;
427 break;
428 case KindOneofCase.StringValue:
429 StringValue = other.StringValue;
430 break;
431 case KindOneofCase.BoolValue:
432 BoolValue = other.BoolValue;
433 break;
434 case KindOneofCase.StructValue:
435 StructValue = other.StructValue;
436 break;
437 case KindOneofCase.ListValue:
438 ListValue = other.ListValue;
439 break;
440 }
441
442 }
443
444 public void MergeFrom(pb::CodedInputStream input) {
445 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100446 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100447 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100448 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100449 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100450 break;
451 case 8: {
452 kind_ = input.ReadEnum();
453 kindCase_ = KindOneofCase.NullValue;
454 break;
455 }
456 case 17: {
457 NumberValue = input.ReadDouble();
458 break;
459 }
460 case 26: {
461 StringValue = input.ReadString();
462 break;
463 }
464 case 32: {
465 BoolValue = input.ReadBool();
466 break;
467 }
468 case 42: {
469 global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
470 if (kindCase_ == KindOneofCase.StructValue) {
471 subBuilder.MergeFrom(StructValue);
472 }
473 input.ReadMessage(subBuilder);
474 StructValue = subBuilder;
475 break;
476 }
477 case 50: {
478 global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
479 if (kindCase_ == KindOneofCase.ListValue) {
480 subBuilder.MergeFrom(ListValue);
481 }
482 input.ReadMessage(subBuilder);
483 ListValue = subBuilder;
484 break;
485 }
486 }
487 }
488 }
489
490 }
491
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100492 /// <summary>
493 /// `ListValue` is a wrapper around a repeated field of values.
Jon Skeetcff900e2015-11-06 18:38:31 +0000494 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100495 /// The JSON representation for `ListValue` is JSON array.
496 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100497 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
498 public sealed partial class ListValue : pb::IMessage<ListValue> {
499 private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
500 public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
501
Jon Skeet62a4aa52015-07-14 14:26:49 +0100502 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000503 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[2]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100504 }
505
Jon Skeet96cffaa2015-07-20 19:25:07 +0100506 pbr::MessageDescriptor pb::IMessage.Descriptor {
507 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100508 }
509
Jon Skeet62a4aa52015-07-14 14:26:49 +0100510 public ListValue() {
511 OnConstruction();
512 }
513
514 partial void OnConstruction();
515
516 public ListValue(ListValue other) : this() {
517 values_ = other.values_.Clone();
518 }
519
520 public ListValue Clone() {
521 return new ListValue(this);
522 }
523
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100524 /// <summary>Field number for the "values" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100525 public const int ValuesFieldNumber = 1;
526 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec
527 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
528 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100529 /// <summary>
530 /// Repeated field of dynamically typed values.
531 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100532 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
533 get { return values_; }
534 }
535
536 public override bool Equals(object other) {
537 return Equals(other as ListValue);
538 }
539
540 public bool Equals(ListValue other) {
541 if (ReferenceEquals(other, null)) {
542 return false;
543 }
544 if (ReferenceEquals(other, this)) {
545 return true;
546 }
547 if(!values_.Equals(other.values_)) return false;
548 return true;
549 }
550
551 public override int GetHashCode() {
552 int hash = 1;
553 hash ^= values_.GetHashCode();
554 return hash;
555 }
556
557 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000558 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100559 }
560
561 public void WriteTo(pb::CodedOutputStream output) {
562 values_.WriteTo(output, _repeated_values_codec);
563 }
564
565 public int CalculateSize() {
566 int size = 0;
567 size += values_.CalculateSize(_repeated_values_codec);
568 return size;
569 }
570
571 public void MergeFrom(ListValue other) {
572 if (other == null) {
573 return;
574 }
575 values_.Add(other.values_);
576 }
577
578 public void MergeFrom(pb::CodedInputStream input) {
579 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100580 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100581 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100582 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100583 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100584 break;
585 case 10: {
586 values_.AddEntriesFrom(input, _repeated_values_codec);
587 break;
588 }
589 }
590 }
591 }
592
593 }
594
595 #endregion
596
597}
598
599#endregion Designer generated code