blob: 8f8e917d0a8e62119bbed9995c7effffaf47702c [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
Jon Skeetb0888a42015-09-29 13:37:30 +010014 /// <summary>Holder for reflection information generated from google/protobuf/struct.proto</summary>
Jon Skeete2c82302015-09-29 14:34:31 +010015 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jon Skeet62a4aa52015-07-14 14:26:49 +010016 public static partial class Struct {
17
Jon Skeet62a4aa52015-07-14 14:26:49 +010018 #region Descriptor
Jon Skeetb0888a42015-09-29 13:37:30 +010019 /// <summary>File descriptor for google/protobuf/struct.proto</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010020 public static pbr::FileDescriptor Descriptor {
21 get { return descriptor; }
22 }
23 private static pbr::FileDescriptor descriptor;
24
25 static Struct() {
26 byte[] descriptorData = global::System.Convert.FromBase64String(
27 string.Concat(
Jon Skeet94898172015-09-01 15:47:48 +010028 "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i",
29 "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i",
30 "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB",
31 "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC",
32 "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv",
33 "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM",
34 "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K",
35 "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI",
36 "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW",
37 "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW",
38 "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W",
39 "QUxVRRAAQk4KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAGg",
40 "AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy",
Jon Skeet47bf49b2015-07-22 11:39:38 +010041 "b3RvMw=="));
Jon Skeet62a4aa52015-07-14 14:26:49 +010042 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +010043 new pbr::FileDescriptor[] { },
Jon Skeet47bf49b2015-07-22 11:39:38 +010044 new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, new pbr::GeneratedCodeInfo[] {
45 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), new[]{ "Fields" }, null, null, new pbr::GeneratedCodeInfo[] { null, }),
46 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Value), new[]{ "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" }, new[]{ "Kind" }, null, null),
47 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), new[]{ "Values" }, null, null, null)
48 }));
Jon Skeet62a4aa52015-07-14 14:26:49 +010049 }
50 #endregion
51
52 }
53 }
54 #region Enums
Jon Skeet18e0a2e2015-10-01 10:38:01 +010055 /// <summary>
56 /// `NullValue` is a singleton enumeration to represent the null value for the
57 /// `Value` type union.
Jon Skeetcff900e2015-11-06 18:38:31 +000058 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010059 /// The JSON representation for `NullValue` is JSON `null`.
60 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010061 public enum NullValue {
Jon Skeet18e0a2e2015-10-01 10:38:01 +010062 /// <summary>
63 /// Null value.
64 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010065 NULL_VALUE = 0,
66 }
67
68 #endregion
69
70 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010071 /// <summary>
72 /// `Struct` represents a structured data value, consisting of fields
73 /// which map to dynamically typed values. In some languages, `Struct`
74 /// might be supported by a native representation. For example, in
75 /// scripting languages like JS a struct is represented as an
76 /// object. The details of that representation are described together
77 /// with the proto support for the language.
Jon Skeetcff900e2015-11-06 18:38:31 +000078 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +010079 /// The JSON representation for `Struct` is JSON object.
80 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010081 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
82 public sealed partial class Struct : pb::IMessage<Struct> {
83 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
84 public static pb::MessageParser<Struct> Parser { get { return _parser; } }
85
Jon Skeet62a4aa52015-07-14 14:26:49 +010086 public static pbr::MessageDescriptor Descriptor {
87 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[0]; }
88 }
89
Jon Skeet96cffaa2015-07-20 19:25:07 +010090 pbr::MessageDescriptor pb::IMessage.Descriptor {
91 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010092 }
93
Jon Skeet62a4aa52015-07-14 14:26:49 +010094 public Struct() {
95 OnConstruction();
96 }
97
98 partial void OnConstruction();
99
100 public Struct(Struct other) : this() {
101 fields_ = other.fields_.Clone();
102 }
103
104 public Struct Clone() {
105 return new Struct(this);
106 }
107
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100108 /// <summary>Field number for the "fields" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100109 public const int FieldsFieldNumber = 1;
110 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec
111 = 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);
112 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 +0100113 /// <summary>
114 /// Map of dynamically typed values.
115 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100116 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
117 get { return fields_; }
118 }
119
120 public override bool Equals(object other) {
121 return Equals(other as Struct);
122 }
123
124 public bool Equals(Struct other) {
125 if (ReferenceEquals(other, null)) {
126 return false;
127 }
128 if (ReferenceEquals(other, this)) {
129 return true;
130 }
131 if (!Fields.Equals(other.Fields)) return false;
132 return true;
133 }
134
135 public override int GetHashCode() {
136 int hash = 1;
137 hash ^= Fields.GetHashCode();
138 return hash;
139 }
140
141 public override string ToString() {
142 return pb::JsonFormatter.Default.Format(this);
143 }
144
145 public void WriteTo(pb::CodedOutputStream output) {
146 fields_.WriteTo(output, _map_fields_codec);
147 }
148
149 public int CalculateSize() {
150 int size = 0;
151 size += fields_.CalculateSize(_map_fields_codec);
152 return size;
153 }
154
155 public void MergeFrom(Struct other) {
156 if (other == null) {
157 return;
158 }
159 fields_.Add(other.fields_);
160 }
161
162 public void MergeFrom(pb::CodedInputStream input) {
163 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100164 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100165 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100166 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100167 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100168 break;
169 case 10: {
170 fields_.AddEntriesFrom(input, _map_fields_codec);
171 break;
172 }
173 }
174 }
175 }
176
Jon Skeet62a4aa52015-07-14 14:26:49 +0100177 }
178
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100179 /// <summary>
180 /// `Value` represents a dynamically typed value which can be either
181 /// null, a number, a string, a boolean, a recursive struct value, or a
182 /// list of values. A producer of value is expected to set one of that
183 /// variants, absence of any variant indicates an error.
Jon Skeetcff900e2015-11-06 18:38:31 +0000184 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100185 /// The JSON representation for `Value` is JSON value.
186 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100187 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
188 public sealed partial class Value : pb::IMessage<Value> {
189 private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
190 public static pb::MessageParser<Value> Parser { get { return _parser; } }
191
Jon Skeet62a4aa52015-07-14 14:26:49 +0100192 public static pbr::MessageDescriptor Descriptor {
193 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[1]; }
194 }
195
Jon Skeet96cffaa2015-07-20 19:25:07 +0100196 pbr::MessageDescriptor pb::IMessage.Descriptor {
197 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100198 }
199
Jon Skeet62a4aa52015-07-14 14:26:49 +0100200 public Value() {
201 OnConstruction();
202 }
203
204 partial void OnConstruction();
205
206 public Value(Value other) : this() {
207 switch (other.KindCase) {
208 case KindOneofCase.NullValue:
209 NullValue = other.NullValue;
210 break;
211 case KindOneofCase.NumberValue:
212 NumberValue = other.NumberValue;
213 break;
214 case KindOneofCase.StringValue:
215 StringValue = other.StringValue;
216 break;
217 case KindOneofCase.BoolValue:
218 BoolValue = other.BoolValue;
219 break;
220 case KindOneofCase.StructValue:
221 StructValue = other.StructValue.Clone();
222 break;
223 case KindOneofCase.ListValue:
224 ListValue = other.ListValue.Clone();
225 break;
226 }
227
228 }
229
230 public Value Clone() {
231 return new Value(this);
232 }
233
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100234 /// <summary>Field number for the "null_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100235 public const int NullValueFieldNumber = 1;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100236 /// <summary>
237 /// Represents a null value.
238 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100239 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
240 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NULL_VALUE; }
241 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100242 kind_ = value;
243 kindCase_ = KindOneofCase.NullValue;
244 }
245 }
246
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100247 /// <summary>Field number for the "number_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100248 public const int NumberValueFieldNumber = 2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100249 /// <summary>
250 /// Represents a double value.
251 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100252 public double NumberValue {
253 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
254 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100255 kind_ = value;
256 kindCase_ = KindOneofCase.NumberValue;
257 }
258 }
259
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100260 /// <summary>Field number for the "string_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100261 public const int StringValueFieldNumber = 3;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100262 /// <summary>
263 /// Represents a string value.
264 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100265 public string StringValue {
266 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
267 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100268 kind_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100269 kindCase_ = KindOneofCase.StringValue;
270 }
271 }
272
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100273 /// <summary>Field number for the "bool_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100274 public const int BoolValueFieldNumber = 4;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100275 /// <summary>
276 /// Represents a boolean value.
277 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100278 public bool BoolValue {
279 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
280 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100281 kind_ = value;
282 kindCase_ = KindOneofCase.BoolValue;
283 }
284 }
285
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100286 /// <summary>Field number for the "struct_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100287 public const int StructValueFieldNumber = 5;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100288 /// <summary>
289 /// Represents a structured value.
290 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100291 public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
292 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; }
293 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100294 kind_ = value;
295 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue;
296 }
297 }
298
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100299 /// <summary>Field number for the "list_value" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100300 public const int ListValueFieldNumber = 6;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100301 /// <summary>
302 /// Represents a repeated `Value`.
303 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100304 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
305 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; }
306 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100307 kind_ = value;
308 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
309 }
310 }
311
312 private object kind_;
Jon Skeet6bbbdfa2015-09-30 06:59:38 +0100313 /// <summary>Enum of possible cases for the "kind" oneof.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100314 public enum KindOneofCase {
315 None = 0,
316 NullValue = 1,
317 NumberValue = 2,
318 StringValue = 3,
319 BoolValue = 4,
320 StructValue = 5,
321 ListValue = 6,
322 }
323 private KindOneofCase kindCase_ = KindOneofCase.None;
324 public KindOneofCase KindCase {
325 get { return kindCase_; }
326 }
327
328 public void ClearKind() {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100329 kindCase_ = KindOneofCase.None;
330 kind_ = null;
331 }
332
333 public override bool Equals(object other) {
334 return Equals(other as Value);
335 }
336
337 public bool Equals(Value other) {
338 if (ReferenceEquals(other, null)) {
339 return false;
340 }
341 if (ReferenceEquals(other, this)) {
342 return true;
343 }
344 if (NullValue != other.NullValue) return false;
345 if (NumberValue != other.NumberValue) return false;
346 if (StringValue != other.StringValue) return false;
347 if (BoolValue != other.BoolValue) return false;
348 if (!object.Equals(StructValue, other.StructValue)) return false;
349 if (!object.Equals(ListValue, other.ListValue)) return false;
Jon Skeet55313c92015-10-24 06:46:02 +0100350 if (KindCase != other.KindCase) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100351 return true;
352 }
353
354 public override int GetHashCode() {
355 int hash = 1;
356 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
357 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode();
358 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
359 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
360 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
361 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
Jon Skeet55313c92015-10-24 06:46:02 +0100362 hash ^= (int) kindCase_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100363 return hash;
364 }
365
366 public override string ToString() {
367 return pb::JsonFormatter.Default.Format(this);
368 }
369
370 public void WriteTo(pb::CodedOutputStream output) {
371 if (kindCase_ == KindOneofCase.NullValue) {
372 output.WriteRawTag(8);
373 output.WriteEnum((int) NullValue);
374 }
375 if (kindCase_ == KindOneofCase.NumberValue) {
376 output.WriteRawTag(17);
377 output.WriteDouble(NumberValue);
378 }
379 if (kindCase_ == KindOneofCase.StringValue) {
380 output.WriteRawTag(26);
381 output.WriteString(StringValue);
382 }
383 if (kindCase_ == KindOneofCase.BoolValue) {
384 output.WriteRawTag(32);
385 output.WriteBool(BoolValue);
386 }
387 if (kindCase_ == KindOneofCase.StructValue) {
388 output.WriteRawTag(42);
389 output.WriteMessage(StructValue);
390 }
391 if (kindCase_ == KindOneofCase.ListValue) {
392 output.WriteRawTag(50);
393 output.WriteMessage(ListValue);
394 }
395 }
396
397 public int CalculateSize() {
398 int size = 0;
399 if (kindCase_ == KindOneofCase.NullValue) {
400 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
401 }
402 if (kindCase_ == KindOneofCase.NumberValue) {
403 size += 1 + 8;
404 }
405 if (kindCase_ == KindOneofCase.StringValue) {
406 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
407 }
408 if (kindCase_ == KindOneofCase.BoolValue) {
409 size += 1 + 1;
410 }
411 if (kindCase_ == KindOneofCase.StructValue) {
412 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
413 }
414 if (kindCase_ == KindOneofCase.ListValue) {
415 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
416 }
417 return size;
418 }
419
420 public void MergeFrom(Value other) {
421 if (other == null) {
422 return;
423 }
424 switch (other.KindCase) {
425 case KindOneofCase.NullValue:
426 NullValue = other.NullValue;
427 break;
428 case KindOneofCase.NumberValue:
429 NumberValue = other.NumberValue;
430 break;
431 case KindOneofCase.StringValue:
432 StringValue = other.StringValue;
433 break;
434 case KindOneofCase.BoolValue:
435 BoolValue = other.BoolValue;
436 break;
437 case KindOneofCase.StructValue:
438 StructValue = other.StructValue;
439 break;
440 case KindOneofCase.ListValue:
441 ListValue = other.ListValue;
442 break;
443 }
444
445 }
446
447 public void MergeFrom(pb::CodedInputStream input) {
448 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100449 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100450 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100451 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100452 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100453 break;
454 case 8: {
455 kind_ = input.ReadEnum();
456 kindCase_ = KindOneofCase.NullValue;
457 break;
458 }
459 case 17: {
460 NumberValue = input.ReadDouble();
461 break;
462 }
463 case 26: {
464 StringValue = input.ReadString();
465 break;
466 }
467 case 32: {
468 BoolValue = input.ReadBool();
469 break;
470 }
471 case 42: {
472 global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
473 if (kindCase_ == KindOneofCase.StructValue) {
474 subBuilder.MergeFrom(StructValue);
475 }
476 input.ReadMessage(subBuilder);
477 StructValue = subBuilder;
478 break;
479 }
480 case 50: {
481 global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
482 if (kindCase_ == KindOneofCase.ListValue) {
483 subBuilder.MergeFrom(ListValue);
484 }
485 input.ReadMessage(subBuilder);
486 ListValue = subBuilder;
487 break;
488 }
489 }
490 }
491 }
492
493 }
494
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100495 /// <summary>
496 /// `ListValue` is a wrapper around a repeated field of values.
Jon Skeetcff900e2015-11-06 18:38:31 +0000497 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100498 /// The JSON representation for `ListValue` is JSON array.
499 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100500 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
501 public sealed partial class ListValue : pb::IMessage<ListValue> {
502 private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
503 public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
504
Jon Skeet62a4aa52015-07-14 14:26:49 +0100505 public static pbr::MessageDescriptor Descriptor {
506 get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[2]; }
507 }
508
Jon Skeet96cffaa2015-07-20 19:25:07 +0100509 pbr::MessageDescriptor pb::IMessage.Descriptor {
510 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100511 }
512
Jon Skeet62a4aa52015-07-14 14:26:49 +0100513 public ListValue() {
514 OnConstruction();
515 }
516
517 partial void OnConstruction();
518
519 public ListValue(ListValue other) : this() {
520 values_ = other.values_.Clone();
521 }
522
523 public ListValue Clone() {
524 return new ListValue(this);
525 }
526
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100527 /// <summary>Field number for the "values" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100528 public const int ValuesFieldNumber = 1;
529 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec
530 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
531 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 +0100532 /// <summary>
533 /// Repeated field of dynamically typed values.
534 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100535 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
536 get { return values_; }
537 }
538
539 public override bool Equals(object other) {
540 return Equals(other as ListValue);
541 }
542
543 public bool Equals(ListValue other) {
544 if (ReferenceEquals(other, null)) {
545 return false;
546 }
547 if (ReferenceEquals(other, this)) {
548 return true;
549 }
550 if(!values_.Equals(other.values_)) return false;
551 return true;
552 }
553
554 public override int GetHashCode() {
555 int hash = 1;
556 hash ^= values_.GetHashCode();
557 return hash;
558 }
559
560 public override string ToString() {
561 return pb::JsonFormatter.Default.Format(this);
562 }
563
564 public void WriteTo(pb::CodedOutputStream output) {
565 values_.WriteTo(output, _repeated_values_codec);
566 }
567
568 public int CalculateSize() {
569 int size = 0;
570 size += values_.CalculateSize(_repeated_values_codec);
571 return size;
572 }
573
574 public void MergeFrom(ListValue other) {
575 if (other == null) {
576 return;
577 }
578 values_.Add(other.values_);
579 }
580
581 public void MergeFrom(pb::CodedInputStream input) {
582 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100583 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100584 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100585 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100586 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100587 break;
588 case 10: {
589 values_.AddEntriesFrom(input, _repeated_values_codec);
590 break;
591 }
592 }
593 }
594 }
595
596 }
597
598 #endregion
599
600}
601
602#endregion Designer generated code