blob: edc8940db3fb92798131c73d5cd13b3e24c9f075 [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",
Jon Skeetc588ac42016-04-20 17:19:42 +010037 "QUxVRRAAQoEBChNjb20uZ29vZ2xlLnByb3RvYnVmQgtTdHJ1Y3RQcm90b1AB",
38 "WjFnaXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wdHlwZXMvc3RydWN0O3N0",
39 "cnVjdHBioAEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5",
40 "cGVzYgZwcm90bzM="));
Jon Skeeta2667aa2015-11-19 17:14:23 +000041 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Jon Skeet284bb452015-11-05 09:13:53 +000042 new pbr::FileDescriptor[] { },
Jon Skeetb6159962016-02-04 07:08:55 +000043 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, new pbr::GeneratedClrTypeInfo[] {
44 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "Fields" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
45 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),
46 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 +000047 }));
48 }
49 #endregion
50
Jon Skeet62a4aa52015-07-14 14:26:49 +010051 }
52 #region Enums
Jon Skeet18e0a2e2015-10-01 10:38:01 +010053 /// <summary>
54 /// `NullValue` is a singleton enumeration to represent the null value for the
55 /// `Value` type union.
Jon Skeetcff900e2015-11-06 18:38:31 +000056 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010057 /// The JSON representation for `NullValue` is JSON `null`.
58 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010059 public enum NullValue {
Jon Skeet18e0a2e2015-10-01 10:38:01 +010060 /// <summary>
61 /// Null value.
62 /// </summary>
Jon Skeet84ea2c72016-04-08 12:33:09 +010063 [pbr::OriginalName("NULL_VALUE")] NullValue = 0,
Jon Skeet62a4aa52015-07-14 14:26:49 +010064 }
65
66 #endregion
67
68 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010069 /// <summary>
70 /// `Struct` represents a structured data value, consisting of fields
71 /// which map to dynamically typed values. In some languages, `Struct`
72 /// might be supported by a native representation. For example, in
73 /// scripting languages like JS a struct is represented as an
74 /// object. The details of that representation are described together
75 /// with the proto support for the language.
Jon Skeetcff900e2015-11-06 18:38:31 +000076 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010077 /// The JSON representation for `Struct` is JSON object.
78 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010079 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
80 public sealed partial class Struct : pb::IMessage<Struct> {
81 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
82 public static pb::MessageParser<Struct> Parser { get { return _parser; } }
83
Jon Skeet62a4aa52015-07-14 14:26:49 +010084 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +000085 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[0]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010086 }
87
Jon Skeet96cffaa2015-07-20 19:25:07 +010088 pbr::MessageDescriptor pb::IMessage.Descriptor {
89 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010090 }
91
Jon Skeet62a4aa52015-07-14 14:26:49 +010092 public Struct() {
93 OnConstruction();
94 }
95
96 partial void OnConstruction();
97
98 public Struct(Struct other) : this() {
99 fields_ = other.fields_.Clone();
100 }
101
102 public Struct Clone() {
103 return new Struct(this);
104 }
105
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100106 /// <summary>Field number for the "fields" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100107 public const int FieldsFieldNumber = 1;
108 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec
109 = 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);
110 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 +0100111 /// <summary>
Jon Skeetc588ac42016-04-20 17:19:42 +0100112 /// Unordered map of dynamically typed values.
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100113 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100114 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
115 get { return fields_; }
116 }
117
118 public override bool Equals(object other) {
119 return Equals(other as Struct);
120 }
121
122 public bool Equals(Struct other) {
123 if (ReferenceEquals(other, null)) {
124 return false;
125 }
126 if (ReferenceEquals(other, this)) {
127 return true;
128 }
129 if (!Fields.Equals(other.Fields)) return false;
130 return true;
131 }
132
133 public override int GetHashCode() {
134 int hash = 1;
135 hash ^= Fields.GetHashCode();
136 return hash;
137 }
138
139 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000140 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100141 }
142
143 public void WriteTo(pb::CodedOutputStream output) {
144 fields_.WriteTo(output, _map_fields_codec);
145 }
146
147 public int CalculateSize() {
148 int size = 0;
149 size += fields_.CalculateSize(_map_fields_codec);
150 return size;
151 }
152
153 public void MergeFrom(Struct other) {
154 if (other == null) {
155 return;
156 }
157 fields_.Add(other.fields_);
158 }
159
160 public void MergeFrom(pb::CodedInputStream input) {
161 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100162 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100163 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100164 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100165 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100166 break;
167 case 10: {
168 fields_.AddEntriesFrom(input, _map_fields_codec);
169 break;
170 }
171 }
172 }
173 }
174
Jon Skeet62a4aa52015-07-14 14:26:49 +0100175 }
176
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100177 /// <summary>
178 /// `Value` represents a dynamically typed value which can be either
179 /// null, a number, a string, a boolean, a recursive struct value, or a
180 /// list of values. A producer of value is expected to set one of that
181 /// variants, absence of any variant indicates an error.
Jon Skeetcff900e2015-11-06 18:38:31 +0000182 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100183 /// The JSON representation for `Value` is JSON value.
184 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100185 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
186 public sealed partial class Value : pb::IMessage<Value> {
187 private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
188 public static pb::MessageParser<Value> Parser { get { return _parser; } }
189
Jon Skeet62a4aa52015-07-14 14:26:49 +0100190 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000191 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[1]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100192 }
193
Jon Skeet96cffaa2015-07-20 19:25:07 +0100194 pbr::MessageDescriptor pb::IMessage.Descriptor {
195 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100196 }
197
Jon Skeet62a4aa52015-07-14 14:26:49 +0100198 public Value() {
199 OnConstruction();
200 }
201
202 partial void OnConstruction();
203
204 public Value(Value other) : this() {
205 switch (other.KindCase) {
206 case KindOneofCase.NullValue:
207 NullValue = other.NullValue;
208 break;
209 case KindOneofCase.NumberValue:
210 NumberValue = other.NumberValue;
211 break;
212 case KindOneofCase.StringValue:
213 StringValue = other.StringValue;
214 break;
215 case KindOneofCase.BoolValue:
216 BoolValue = other.BoolValue;
217 break;
218 case KindOneofCase.StructValue:
219 StructValue = other.StructValue.Clone();
220 break;
221 case KindOneofCase.ListValue:
222 ListValue = other.ListValue.Clone();
223 break;
224 }
225
226 }
227
228 public Value Clone() {
229 return new Value(this);
230 }
231
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100232 /// <summary>Field number for the "null_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100233 public const int NullValueFieldNumber = 1;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100234 /// <summary>
235 /// Represents a null value.
236 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100237 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
Jon Skeet84ea2c72016-04-08 12:33:09 +0100238 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : 0; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100239 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100240 kind_ = value;
241 kindCase_ = KindOneofCase.NullValue;
242 }
243 }
244
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100245 /// <summary>Field number for the "number_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100246 public const int NumberValueFieldNumber = 2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100247 /// <summary>
248 /// Represents a double value.
249 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100250 public double NumberValue {
251 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
252 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100253 kind_ = value;
254 kindCase_ = KindOneofCase.NumberValue;
255 }
256 }
257
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100258 /// <summary>Field number for the "string_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100259 public const int StringValueFieldNumber = 3;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100260 /// <summary>
261 /// Represents a string value.
262 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100263 public string StringValue {
264 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
265 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000266 kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100267 kindCase_ = KindOneofCase.StringValue;
268 }
269 }
270
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100271 /// <summary>Field number for the "bool_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100272 public const int BoolValueFieldNumber = 4;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100273 /// <summary>
274 /// Represents a boolean value.
275 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100276 public bool BoolValue {
277 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
278 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100279 kind_ = value;
280 kindCase_ = KindOneofCase.BoolValue;
281 }
282 }
283
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100284 /// <summary>Field number for the "struct_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100285 public const int StructValueFieldNumber = 5;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100286 /// <summary>
287 /// Represents a structured value.
288 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100289 public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
290 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; }
291 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100292 kind_ = value;
293 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue;
294 }
295 }
296
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100297 /// <summary>Field number for the "list_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100298 public const int ListValueFieldNumber = 6;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100299 /// <summary>
300 /// Represents a repeated `Value`.
301 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100302 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
303 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; }
304 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100305 kind_ = value;
306 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
307 }
308 }
309
310 private object kind_;
Jon Skeet6bbbdfa2015-09-30 06:59:38 +0100311 /// <summary>Enum of possible cases for the "kind" oneof.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100312 public enum KindOneofCase {
313 None = 0,
314 NullValue = 1,
315 NumberValue = 2,
316 StringValue = 3,
317 BoolValue = 4,
318 StructValue = 5,
319 ListValue = 6,
320 }
321 private KindOneofCase kindCase_ = KindOneofCase.None;
322 public KindOneofCase KindCase {
323 get { return kindCase_; }
324 }
325
326 public void ClearKind() {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100327 kindCase_ = KindOneofCase.None;
328 kind_ = null;
329 }
330
331 public override bool Equals(object other) {
332 return Equals(other as Value);
333 }
334
335 public bool Equals(Value other) {
336 if (ReferenceEquals(other, null)) {
337 return false;
338 }
339 if (ReferenceEquals(other, this)) {
340 return true;
341 }
342 if (NullValue != other.NullValue) return false;
343 if (NumberValue != other.NumberValue) return false;
344 if (StringValue != other.StringValue) return false;
345 if (BoolValue != other.BoolValue) return false;
346 if (!object.Equals(StructValue, other.StructValue)) return false;
347 if (!object.Equals(ListValue, other.ListValue)) return false;
Jon Skeet55313c92015-10-24 06:46:02 +0100348 if (KindCase != other.KindCase) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100349 return true;
350 }
351
352 public override int GetHashCode() {
353 int hash = 1;
354 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
355 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode();
356 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
357 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
358 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
359 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
Jon Skeet55313c92015-10-24 06:46:02 +0100360 hash ^= (int) kindCase_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100361 return hash;
362 }
363
364 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000365 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100366 }
367
368 public void WriteTo(pb::CodedOutputStream output) {
369 if (kindCase_ == KindOneofCase.NullValue) {
370 output.WriteRawTag(8);
371 output.WriteEnum((int) NullValue);
372 }
373 if (kindCase_ == KindOneofCase.NumberValue) {
374 output.WriteRawTag(17);
375 output.WriteDouble(NumberValue);
376 }
377 if (kindCase_ == KindOneofCase.StringValue) {
378 output.WriteRawTag(26);
379 output.WriteString(StringValue);
380 }
381 if (kindCase_ == KindOneofCase.BoolValue) {
382 output.WriteRawTag(32);
383 output.WriteBool(BoolValue);
384 }
385 if (kindCase_ == KindOneofCase.StructValue) {
386 output.WriteRawTag(42);
387 output.WriteMessage(StructValue);
388 }
389 if (kindCase_ == KindOneofCase.ListValue) {
390 output.WriteRawTag(50);
391 output.WriteMessage(ListValue);
392 }
393 }
394
395 public int CalculateSize() {
396 int size = 0;
397 if (kindCase_ == KindOneofCase.NullValue) {
398 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
399 }
400 if (kindCase_ == KindOneofCase.NumberValue) {
401 size += 1 + 8;
402 }
403 if (kindCase_ == KindOneofCase.StringValue) {
404 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
405 }
406 if (kindCase_ == KindOneofCase.BoolValue) {
407 size += 1 + 1;
408 }
409 if (kindCase_ == KindOneofCase.StructValue) {
410 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
411 }
412 if (kindCase_ == KindOneofCase.ListValue) {
413 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
414 }
415 return size;
416 }
417
418 public void MergeFrom(Value other) {
419 if (other == null) {
420 return;
421 }
422 switch (other.KindCase) {
423 case KindOneofCase.NullValue:
424 NullValue = other.NullValue;
425 break;
426 case KindOneofCase.NumberValue:
427 NumberValue = other.NumberValue;
428 break;
429 case KindOneofCase.StringValue:
430 StringValue = other.StringValue;
431 break;
432 case KindOneofCase.BoolValue:
433 BoolValue = other.BoolValue;
434 break;
435 case KindOneofCase.StructValue:
436 StructValue = other.StructValue;
437 break;
438 case KindOneofCase.ListValue:
439 ListValue = other.ListValue;
440 break;
441 }
442
443 }
444
445 public void MergeFrom(pb::CodedInputStream input) {
446 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100447 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100448 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100449 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100450 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100451 break;
452 case 8: {
453 kind_ = input.ReadEnum();
454 kindCase_ = KindOneofCase.NullValue;
455 break;
456 }
457 case 17: {
458 NumberValue = input.ReadDouble();
459 break;
460 }
461 case 26: {
462 StringValue = input.ReadString();
463 break;
464 }
465 case 32: {
466 BoolValue = input.ReadBool();
467 break;
468 }
469 case 42: {
470 global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
471 if (kindCase_ == KindOneofCase.StructValue) {
472 subBuilder.MergeFrom(StructValue);
473 }
474 input.ReadMessage(subBuilder);
475 StructValue = subBuilder;
476 break;
477 }
478 case 50: {
479 global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
480 if (kindCase_ == KindOneofCase.ListValue) {
481 subBuilder.MergeFrom(ListValue);
482 }
483 input.ReadMessage(subBuilder);
484 ListValue = subBuilder;
485 break;
486 }
487 }
488 }
489 }
490
491 }
492
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100493 /// <summary>
494 /// `ListValue` is a wrapper around a repeated field of values.
Jon Skeetcff900e2015-11-06 18:38:31 +0000495 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100496 /// The JSON representation for `ListValue` is JSON array.
497 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100498 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
499 public sealed partial class ListValue : pb::IMessage<ListValue> {
500 private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
501 public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
502
Jon Skeet62a4aa52015-07-14 14:26:49 +0100503 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000504 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[2]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100505 }
506
Jon Skeet96cffaa2015-07-20 19:25:07 +0100507 pbr::MessageDescriptor pb::IMessage.Descriptor {
508 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100509 }
510
Jon Skeet62a4aa52015-07-14 14:26:49 +0100511 public ListValue() {
512 OnConstruction();
513 }
514
515 partial void OnConstruction();
516
517 public ListValue(ListValue other) : this() {
518 values_ = other.values_.Clone();
519 }
520
521 public ListValue Clone() {
522 return new ListValue(this);
523 }
524
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100525 /// <summary>Field number for the "values" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100526 public const int ValuesFieldNumber = 1;
527 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec
528 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
529 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 +0100530 /// <summary>
531 /// Repeated field of dynamically typed values.
532 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100533 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
534 get { return values_; }
535 }
536
537 public override bool Equals(object other) {
538 return Equals(other as ListValue);
539 }
540
541 public bool Equals(ListValue other) {
542 if (ReferenceEquals(other, null)) {
543 return false;
544 }
545 if (ReferenceEquals(other, this)) {
546 return true;
547 }
548 if(!values_.Equals(other.values_)) return false;
549 return true;
550 }
551
552 public override int GetHashCode() {
553 int hash = 1;
554 hash ^= values_.GetHashCode();
555 return hash;
556 }
557
558 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000559 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100560 }
561
562 public void WriteTo(pb::CodedOutputStream output) {
563 values_.WriteTo(output, _repeated_values_codec);
564 }
565
566 public int CalculateSize() {
567 int size = 0;
568 size += values_.CalculateSize(_repeated_values_codec);
569 return size;
570 }
571
572 public void MergeFrom(ListValue other) {
573 if (other == null) {
574 return;
575 }
576 values_.Add(other.values_);
577 }
578
579 public void MergeFrom(pb::CodedInputStream input) {
580 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100581 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100582 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100583 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100584 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100585 break;
586 case 10: {
587 values_.AddEntriesFrom(input, _repeated_values_codec);
588 break;
589 }
590 }
591 }
592 }
593
594 }
595
596 #endregion
597
598}
599
600#endregion Designer generated code