• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: google/protobuf/struct.proto
4 // </auto-generated>
5 #pragma warning disable 1591, 0612, 3021
6 #region Designer generated code
7 
8 using pb = global::Google.Protobuf;
9 using pbc = global::Google.Protobuf.Collections;
10 using pbr = global::Google.Protobuf.Reflection;
11 using scg = global::System.Collections.Generic;
12 namespace Google.Protobuf.WellKnownTypes {
13 
14   /// <summary>Holder for reflection information generated from google/protobuf/struct.proto</summary>
15   public static partial class StructReflection {
16 
17     #region Descriptor
18     /// <summary>File descriptor for google/protobuf/struct.proto</summary>
19     public static pbr::FileDescriptor Descriptor {
20       get { return descriptor; }
21     }
22     private static pbr::FileDescriptor descriptor;
23 
StructReflection()24     static StructReflection() {
25       byte[] descriptorData = global::System.Convert.FromBase64String(
26           string.Concat(
27             "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i",
28             "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i",
29             "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB",
30             "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC",
31             "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv",
32             "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM",
33             "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K",
34             "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI",
35             "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW",
36             "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW",
37             "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W",
38             "QUxVRRAAQoEBChNjb20uZ29vZ2xlLnByb3RvYnVmQgtTdHJ1Y3RQcm90b1AB",
39             "WjFnaXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wdHlwZXMvc3RydWN0O3N0",
40             "cnVjdHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5",
41             "cGVzYgZwcm90bzM="));
42       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
43           new pbr::FileDescriptor[] { },
44           new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, null, new pbr::GeneratedClrTypeInfo[] {
45             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
46             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, null),
47             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), global::Google.Protobuf.WellKnownTypes.ListValue.Parser, new[]{ "Values" }, null, null, null, null)
48           }));
49     }
50     #endregion
51 
52   }
53   #region Enums
54   /// <summary>
55   /// `NullValue` is a singleton enumeration to represent the null value for the
56   /// `Value` type union.
57   ///
58   ///  The JSON representation for `NullValue` is JSON `null`.
59   /// </summary>
60   public enum NullValue {
61     /// <summary>
62     /// Null value.
63     /// </summary>
64     [pbr::OriginalName("NULL_VALUE")] NullValue = 0,
65   }
66 
67   #endregion
68 
69   #region Messages
70   /// <summary>
71   /// `Struct` represents a structured data value, consisting of fields
72   /// which map to dynamically typed values. In some languages, `Struct`
73   /// might be supported by a native representation. For example, in
74   /// scripting languages like JS a struct is represented as an
75   /// object. The details of that representation are described together
76   /// with the proto support for the language.
77   ///
78   /// The JSON representation for `Struct` is JSON object.
79   /// </summary>
80   public sealed partial class Struct : pb::IMessage<Struct>
81   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
82       , pb::IBufferMessage
83   #endif
84   {
85     private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct());
86     private pb::UnknownFieldSet _unknownFields;
87     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
88     public static pb::MessageParser<Struct> Parser { get { return _parser; } }
89 
90     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
91     public static pbr::MessageDescriptor Descriptor {
92       get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[0]; }
93     }
94 
95     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
96     pbr::MessageDescriptor pb::IMessage.Descriptor {
97       get { return Descriptor; }
98     }
99 
100     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Struct()101     public Struct() {
102       OnConstruction();
103     }
104 
OnConstruction()105     partial void OnConstruction();
106 
107     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Struct(Struct other)108     public Struct(Struct other) : this() {
109       fields_ = other.fields_.Clone();
110       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
111     }
112 
113     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()114     public Struct Clone() {
115       return new Struct(this);
116     }
117 
118     /// <summary>Field number for the "fields" field.</summary>
119     public const int FieldsFieldNumber = 1;
120     private static readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>.Codec _map_fields_codec
121         = 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);
122     private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value>();
123     /// <summary>
124     /// Unordered map of dynamically typed values.
125     /// </summary>
126     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
127     public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> Fields {
128       get { return fields_; }
129     }
130 
131     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)132     public override bool Equals(object other) {
133       return Equals(other as Struct);
134     }
135 
136     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Struct other)137     public bool Equals(Struct other) {
138       if (ReferenceEquals(other, null)) {
139         return false;
140       }
141       if (ReferenceEquals(other, this)) {
142         return true;
143       }
144       if (!Fields.Equals(other.Fields)) return false;
145       return Equals(_unknownFields, other._unknownFields);
146     }
147 
148     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()149     public override int GetHashCode() {
150       int hash = 1;
151       hash ^= Fields.GetHashCode();
152       if (_unknownFields != null) {
153         hash ^= _unknownFields.GetHashCode();
154       }
155       return hash;
156     }
157 
158     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()159     public override string ToString() {
160       return pb::JsonFormatter.ToDiagnosticString(this);
161     }
162 
163     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)164     public void WriteTo(pb::CodedOutputStream output) {
165     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
166       output.WriteRawMessage(this);
167     #else
168       fields_.WriteTo(output, _map_fields_codec);
169       if (_unknownFields != null) {
170         _unknownFields.WriteTo(output);
171       }
172     #endif
173     }
174 
175     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
176     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)177     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
178       fields_.WriteTo(ref output, _map_fields_codec);
179       if (_unknownFields != null) {
180         _unknownFields.WriteTo(ref output);
181       }
182     }
183     #endif
184 
185     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()186     public int CalculateSize() {
187       int size = 0;
188       size += fields_.CalculateSize(_map_fields_codec);
189       if (_unknownFields != null) {
190         size += _unknownFields.CalculateSize();
191       }
192       return size;
193     }
194 
195     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Struct other)196     public void MergeFrom(Struct other) {
197       if (other == null) {
198         return;
199       }
200       fields_.Add(other.fields_);
201       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
202     }
203 
204     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)205     public void MergeFrom(pb::CodedInputStream input) {
206     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
207       input.ReadRawMessage(this);
208     #else
209       uint tag;
210       while ((tag = input.ReadTag()) != 0) {
211         switch(tag) {
212           default:
213             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
214             break;
215           case 10: {
216             fields_.AddEntriesFrom(input, _map_fields_codec);
217             break;
218           }
219         }
220       }
221     #endif
222     }
223 
224     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
225     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)226     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
227       uint tag;
228       while ((tag = input.ReadTag()) != 0) {
229         switch(tag) {
230           default:
231             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
232             break;
233           case 10: {
234             fields_.AddEntriesFrom(ref input, _map_fields_codec);
235             break;
236           }
237         }
238       }
239     }
240     #endif
241 
242   }
243 
244   /// <summary>
245   /// `Value` represents a dynamically typed value which can be either
246   /// null, a number, a string, a boolean, a recursive struct value, or a
247   /// list of values. A producer of value is expected to set one of that
248   /// variants, absence of any variant indicates an error.
249   ///
250   /// The JSON representation for `Value` is JSON value.
251   /// </summary>
252   public sealed partial class Value : pb::IMessage<Value>
253   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
254       , pb::IBufferMessage
255   #endif
256   {
257     private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value());
258     private pb::UnknownFieldSet _unknownFields;
259     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
260     public static pb::MessageParser<Value> Parser { get { return _parser; } }
261 
262     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
263     public static pbr::MessageDescriptor Descriptor {
264       get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[1]; }
265     }
266 
267     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
268     pbr::MessageDescriptor pb::IMessage.Descriptor {
269       get { return Descriptor; }
270     }
271 
272     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Value()273     public Value() {
274       OnConstruction();
275     }
276 
OnConstruction()277     partial void OnConstruction();
278 
279     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Value(Value other)280     public Value(Value other) : this() {
281       switch (other.KindCase) {
282         case KindOneofCase.NullValue:
283           NullValue = other.NullValue;
284           break;
285         case KindOneofCase.NumberValue:
286           NumberValue = other.NumberValue;
287           break;
288         case KindOneofCase.StringValue:
289           StringValue = other.StringValue;
290           break;
291         case KindOneofCase.BoolValue:
292           BoolValue = other.BoolValue;
293           break;
294         case KindOneofCase.StructValue:
295           StructValue = other.StructValue.Clone();
296           break;
297         case KindOneofCase.ListValue:
298           ListValue = other.ListValue.Clone();
299           break;
300       }
301 
302       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
303     }
304 
305     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()306     public Value Clone() {
307       return new Value(this);
308     }
309 
310     /// <summary>Field number for the "null_value" field.</summary>
311     public const int NullValueFieldNumber = 1;
312     /// <summary>
313     /// Represents a null value.
314     /// </summary>
315     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
316     public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
317       get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; }
318       set {
319         kind_ = value;
320         kindCase_ = KindOneofCase.NullValue;
321       }
322     }
323 
324     /// <summary>Field number for the "number_value" field.</summary>
325     public const int NumberValueFieldNumber = 2;
326     /// <summary>
327     /// Represents a double value.
328     /// </summary>
329     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
330     public double NumberValue {
331       get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
332       set {
333         kind_ = value;
334         kindCase_ = KindOneofCase.NumberValue;
335       }
336     }
337 
338     /// <summary>Field number for the "string_value" field.</summary>
339     public const int StringValueFieldNumber = 3;
340     /// <summary>
341     /// Represents a string value.
342     /// </summary>
343     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
344     public string StringValue {
345       get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
346       set {
347         kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
348         kindCase_ = KindOneofCase.StringValue;
349       }
350     }
351 
352     /// <summary>Field number for the "bool_value" field.</summary>
353     public const int BoolValueFieldNumber = 4;
354     /// <summary>
355     /// Represents a boolean value.
356     /// </summary>
357     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
358     public bool BoolValue {
359       get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
360       set {
361         kind_ = value;
362         kindCase_ = KindOneofCase.BoolValue;
363       }
364     }
365 
366     /// <summary>Field number for the "struct_value" field.</summary>
367     public const int StructValueFieldNumber = 5;
368     /// <summary>
369     /// Represents a structured value.
370     /// </summary>
371     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
372     public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
373       get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; }
374       set {
375         kind_ = value;
376         kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue;
377       }
378     }
379 
380     /// <summary>Field number for the "list_value" field.</summary>
381     public const int ListValueFieldNumber = 6;
382     /// <summary>
383     /// Represents a repeated `Value`.
384     /// </summary>
385     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
386     public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
387       get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; }
388       set {
389         kind_ = value;
390         kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
391       }
392     }
393 
394     private object kind_;
395     /// <summary>Enum of possible cases for the "kind" oneof.</summary>
396     public enum KindOneofCase {
397       None = 0,
398       NullValue = 1,
399       NumberValue = 2,
400       StringValue = 3,
401       BoolValue = 4,
402       StructValue = 5,
403       ListValue = 6,
404     }
405     private KindOneofCase kindCase_ = KindOneofCase.None;
406     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
407     public KindOneofCase KindCase {
408       get { return kindCase_; }
409     }
410 
411     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearKind()412     public void ClearKind() {
413       kindCase_ = KindOneofCase.None;
414       kind_ = null;
415     }
416 
417     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)418     public override bool Equals(object other) {
419       return Equals(other as Value);
420     }
421 
422     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Value other)423     public bool Equals(Value other) {
424       if (ReferenceEquals(other, null)) {
425         return false;
426       }
427       if (ReferenceEquals(other, this)) {
428         return true;
429       }
430       if (NullValue != other.NullValue) return false;
431       if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NumberValue, other.NumberValue)) return false;
432       if (StringValue != other.StringValue) return false;
433       if (BoolValue != other.BoolValue) return false;
434       if (!object.Equals(StructValue, other.StructValue)) return false;
435       if (!object.Equals(ListValue, other.ListValue)) return false;
436       if (KindCase != other.KindCase) return false;
437       return Equals(_unknownFields, other._unknownFields);
438     }
439 
440     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()441     public override int GetHashCode() {
442       int hash = 1;
443       if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
444       if (kindCase_ == KindOneofCase.NumberValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue);
445       if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
446       if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
447       if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
448       if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
449       hash ^= (int) kindCase_;
450       if (_unknownFields != null) {
451         hash ^= _unknownFields.GetHashCode();
452       }
453       return hash;
454     }
455 
456     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()457     public override string ToString() {
458       return pb::JsonFormatter.ToDiagnosticString(this);
459     }
460 
461     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)462     public void WriteTo(pb::CodedOutputStream output) {
463     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
464       output.WriteRawMessage(this);
465     #else
466       if (kindCase_ == KindOneofCase.NullValue) {
467         output.WriteRawTag(8);
468         output.WriteEnum((int) NullValue);
469       }
470       if (kindCase_ == KindOneofCase.NumberValue) {
471         output.WriteRawTag(17);
472         output.WriteDouble(NumberValue);
473       }
474       if (kindCase_ == KindOneofCase.StringValue) {
475         output.WriteRawTag(26);
476         output.WriteString(StringValue);
477       }
478       if (kindCase_ == KindOneofCase.BoolValue) {
479         output.WriteRawTag(32);
480         output.WriteBool(BoolValue);
481       }
482       if (kindCase_ == KindOneofCase.StructValue) {
483         output.WriteRawTag(42);
484         output.WriteMessage(StructValue);
485       }
486       if (kindCase_ == KindOneofCase.ListValue) {
487         output.WriteRawTag(50);
488         output.WriteMessage(ListValue);
489       }
490       if (_unknownFields != null) {
491         _unknownFields.WriteTo(output);
492       }
493     #endif
494     }
495 
496     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
497     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)498     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
499       if (kindCase_ == KindOneofCase.NullValue) {
500         output.WriteRawTag(8);
501         output.WriteEnum((int) NullValue);
502       }
503       if (kindCase_ == KindOneofCase.NumberValue) {
504         output.WriteRawTag(17);
505         output.WriteDouble(NumberValue);
506       }
507       if (kindCase_ == KindOneofCase.StringValue) {
508         output.WriteRawTag(26);
509         output.WriteString(StringValue);
510       }
511       if (kindCase_ == KindOneofCase.BoolValue) {
512         output.WriteRawTag(32);
513         output.WriteBool(BoolValue);
514       }
515       if (kindCase_ == KindOneofCase.StructValue) {
516         output.WriteRawTag(42);
517         output.WriteMessage(StructValue);
518       }
519       if (kindCase_ == KindOneofCase.ListValue) {
520         output.WriteRawTag(50);
521         output.WriteMessage(ListValue);
522       }
523       if (_unknownFields != null) {
524         _unknownFields.WriteTo(ref output);
525       }
526     }
527     #endif
528 
529     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()530     public int CalculateSize() {
531       int size = 0;
532       if (kindCase_ == KindOneofCase.NullValue) {
533         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
534       }
535       if (kindCase_ == KindOneofCase.NumberValue) {
536         size += 1 + 8;
537       }
538       if (kindCase_ == KindOneofCase.StringValue) {
539         size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
540       }
541       if (kindCase_ == KindOneofCase.BoolValue) {
542         size += 1 + 1;
543       }
544       if (kindCase_ == KindOneofCase.StructValue) {
545         size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
546       }
547       if (kindCase_ == KindOneofCase.ListValue) {
548         size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
549       }
550       if (_unknownFields != null) {
551         size += _unknownFields.CalculateSize();
552       }
553       return size;
554     }
555 
556     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Value other)557     public void MergeFrom(Value other) {
558       if (other == null) {
559         return;
560       }
561       switch (other.KindCase) {
562         case KindOneofCase.NullValue:
563           NullValue = other.NullValue;
564           break;
565         case KindOneofCase.NumberValue:
566           NumberValue = other.NumberValue;
567           break;
568         case KindOneofCase.StringValue:
569           StringValue = other.StringValue;
570           break;
571         case KindOneofCase.BoolValue:
572           BoolValue = other.BoolValue;
573           break;
574         case KindOneofCase.StructValue:
575           if (StructValue == null) {
576             StructValue = new global::Google.Protobuf.WellKnownTypes.Struct();
577           }
578           StructValue.MergeFrom(other.StructValue);
579           break;
580         case KindOneofCase.ListValue:
581           if (ListValue == null) {
582             ListValue = new global::Google.Protobuf.WellKnownTypes.ListValue();
583           }
584           ListValue.MergeFrom(other.ListValue);
585           break;
586       }
587 
588       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
589     }
590 
591     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)592     public void MergeFrom(pb::CodedInputStream input) {
593     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
594       input.ReadRawMessage(this);
595     #else
596       uint tag;
597       while ((tag = input.ReadTag()) != 0) {
598         switch(tag) {
599           default:
600             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
601             break;
602           case 8: {
603             kind_ = input.ReadEnum();
604             kindCase_ = KindOneofCase.NullValue;
605             break;
606           }
607           case 17: {
608             NumberValue = input.ReadDouble();
609             break;
610           }
611           case 26: {
612             StringValue = input.ReadString();
613             break;
614           }
615           case 32: {
616             BoolValue = input.ReadBool();
617             break;
618           }
619           case 42: {
620             global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
621             if (kindCase_ == KindOneofCase.StructValue) {
622               subBuilder.MergeFrom(StructValue);
623             }
624             input.ReadMessage(subBuilder);
625             StructValue = subBuilder;
626             break;
627           }
628           case 50: {
629             global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
630             if (kindCase_ == KindOneofCase.ListValue) {
631               subBuilder.MergeFrom(ListValue);
632             }
633             input.ReadMessage(subBuilder);
634             ListValue = subBuilder;
635             break;
636           }
637         }
638       }
639     #endif
640     }
641 
642     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
643     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)644     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
645       uint tag;
646       while ((tag = input.ReadTag()) != 0) {
647         switch(tag) {
648           default:
649             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
650             break;
651           case 8: {
652             kind_ = input.ReadEnum();
653             kindCase_ = KindOneofCase.NullValue;
654             break;
655           }
656           case 17: {
657             NumberValue = input.ReadDouble();
658             break;
659           }
660           case 26: {
661             StringValue = input.ReadString();
662             break;
663           }
664           case 32: {
665             BoolValue = input.ReadBool();
666             break;
667           }
668           case 42: {
669             global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
670             if (kindCase_ == KindOneofCase.StructValue) {
671               subBuilder.MergeFrom(StructValue);
672             }
673             input.ReadMessage(subBuilder);
674             StructValue = subBuilder;
675             break;
676           }
677           case 50: {
678             global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
679             if (kindCase_ == KindOneofCase.ListValue) {
680               subBuilder.MergeFrom(ListValue);
681             }
682             input.ReadMessage(subBuilder);
683             ListValue = subBuilder;
684             break;
685           }
686         }
687       }
688     }
689     #endif
690 
691   }
692 
693   /// <summary>
694   /// `ListValue` is a wrapper around a repeated field of values.
695   ///
696   /// The JSON representation for `ListValue` is JSON array.
697   /// </summary>
698   public sealed partial class ListValue : pb::IMessage<ListValue>
699   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
700       , pb::IBufferMessage
701   #endif
702   {
703     private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
704     private pb::UnknownFieldSet _unknownFields;
705     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
706     public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
707 
708     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
709     public static pbr::MessageDescriptor Descriptor {
710       get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor.MessageTypes[2]; }
711     }
712 
713     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
714     pbr::MessageDescriptor pb::IMessage.Descriptor {
715       get { return Descriptor; }
716     }
717 
718     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ListValue()719     public ListValue() {
720       OnConstruction();
721     }
722 
OnConstruction()723     partial void OnConstruction();
724 
725     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ListValue(ListValue other)726     public ListValue(ListValue other) : this() {
727       values_ = other.values_.Clone();
728       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
729     }
730 
731     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()732     public ListValue Clone() {
733       return new ListValue(this);
734     }
735 
736     /// <summary>Field number for the "values" field.</summary>
737     public const int ValuesFieldNumber = 1;
738     private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_values_codec
739         = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
740     private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value>();
741     /// <summary>
742     /// Repeated field of dynamically typed values.
743     /// </summary>
744     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
745     public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Values {
746       get { return values_; }
747     }
748 
749     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)750     public override bool Equals(object other) {
751       return Equals(other as ListValue);
752     }
753 
754     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(ListValue other)755     public bool Equals(ListValue other) {
756       if (ReferenceEquals(other, null)) {
757         return false;
758       }
759       if (ReferenceEquals(other, this)) {
760         return true;
761       }
762       if(!values_.Equals(other.values_)) return false;
763       return Equals(_unknownFields, other._unknownFields);
764     }
765 
766     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()767     public override int GetHashCode() {
768       int hash = 1;
769       hash ^= values_.GetHashCode();
770       if (_unknownFields != null) {
771         hash ^= _unknownFields.GetHashCode();
772       }
773       return hash;
774     }
775 
776     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()777     public override string ToString() {
778       return pb::JsonFormatter.ToDiagnosticString(this);
779     }
780 
781     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)782     public void WriteTo(pb::CodedOutputStream output) {
783     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
784       output.WriteRawMessage(this);
785     #else
786       values_.WriteTo(output, _repeated_values_codec);
787       if (_unknownFields != null) {
788         _unknownFields.WriteTo(output);
789       }
790     #endif
791     }
792 
793     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
794     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)795     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
796       values_.WriteTo(ref output, _repeated_values_codec);
797       if (_unknownFields != null) {
798         _unknownFields.WriteTo(ref output);
799       }
800     }
801     #endif
802 
803     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()804     public int CalculateSize() {
805       int size = 0;
806       size += values_.CalculateSize(_repeated_values_codec);
807       if (_unknownFields != null) {
808         size += _unknownFields.CalculateSize();
809       }
810       return size;
811     }
812 
813     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(ListValue other)814     public void MergeFrom(ListValue other) {
815       if (other == null) {
816         return;
817       }
818       values_.Add(other.values_);
819       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
820     }
821 
822     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)823     public void MergeFrom(pb::CodedInputStream input) {
824     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
825       input.ReadRawMessage(this);
826     #else
827       uint tag;
828       while ((tag = input.ReadTag()) != 0) {
829         switch(tag) {
830           default:
831             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
832             break;
833           case 10: {
834             values_.AddEntriesFrom(input, _repeated_values_codec);
835             break;
836           }
837         }
838       }
839     #endif
840     }
841 
842     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
843     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)844     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
845       uint tag;
846       while ((tag = input.ReadTag()) != 0) {
847         switch(tag) {
848           default:
849             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
850             break;
851           case 10: {
852             values_.AddEntriesFrom(ref input, _repeated_values_codec);
853             break;
854           }
855         }
856       }
857     }
858     #endif
859 
860   }
861 
862   #endregion
863 
864 }
865 
866 #endregion Designer generated code
867