Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Side by Side Diff: third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Generated by the protocol buffer compiler. DO NOT EDIT! 1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/struct.proto 2 // source: google/protobuf/struct.proto
3 #pragma warning disable 1591, 0612, 3021 3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code 4 #region Designer generated code
5 5
6 using pb = global::Google.Protobuf; 6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections; 7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection; 8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic; 9 using scg = global::System.Collections.Generic;
10 namespace Google.Protobuf.WellKnownTypes { 10 namespace Google.Protobuf.WellKnownTypes {
11 11
12 /// <summary>Holder for reflection information generated from google/protobuf/ struct.proto</summary> 12 /// <summary>Holder for reflection information generated from google/protobuf/ struct.proto</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class StructReflection { 13 public static partial class StructReflection {
15 14
16 #region Descriptor 15 #region Descriptor
17 /// <summary>File descriptor for google/protobuf/struct.proto</summary> 16 /// <summary>File descriptor for google/protobuf/struct.proto</summary>
18 public static pbr::FileDescriptor Descriptor { 17 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; } 18 get { return descriptor; }
20 } 19 }
21 private static pbr::FileDescriptor descriptor; 20 private static pbr::FileDescriptor descriptor;
22 21
23 static StructReflection() { 22 static StructReflection() {
24 byte[] descriptorData = global::System.Convert.FromBase64String( 23 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat( 24 string.Concat(
26 "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i", 25 "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i",
27 "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i", 26 "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i",
28 "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB", 27 "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB",
29 "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC", 28 "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC",
30 "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv", 29 "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv",
31 "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM", 30 "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM",
32 "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K", 31 "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K",
33 "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI", 32 "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI",
34 "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW", 33 "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW",
35 "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW", 34 "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW",
36 "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W", 35 "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W",
37 "QUxVRRAAQoEBChNjb20uZ29vZ2xlLnByb3RvYnVmQgtTdHJ1Y3RQcm90b1AB", 36 "QUxVRRAAQoEBChNjb20uZ29vZ2xlLnByb3RvYnVmQgtTdHJ1Y3RQcm90b1AB",
38 "WjFnaXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wdHlwZXMvc3RydWN0O3N0", 37 "WjFnaXRodWIuY29tL2dvbGFuZy9wcm90b2J1Zi9wdHlwZXMvc3RydWN0O3N0",
39 "cnVjdHBioAEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5", 38 "cnVjdHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5",
40 "cGVzYgZwcm90bzM=")); 39 "cGVzYgZwcm90bzM="));
41 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 40 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
42 new pbr::FileDescriptor[] { }, 41 new pbr::FileDescriptor[] { },
43 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.We llKnownTypes.NullValue), }, new pbr::GeneratedClrTypeInfo[] { 42 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.We llKnownTypes.NullValue), }, new pbr::GeneratedClrTypeInfo[] {
44 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "F ields" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), 43 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "F ields" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
45 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.Value), global::Google.Protobuf.WellKnownTypes.Value.Parser, new[]{ "Nul lValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" } , new[]{ "Kind" }, null, null), 44 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.Value), global::Google.Protobuf.WellKnownTypes.Value.Parser, new[]{ "Nul lValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" } , new[]{ "Kind" }, null, null),
46 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.ListValue), global::Google.Protobuf.WellKnownTypes.ListValue.Parser, new []{ "Values" }, null, null, null) 45 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno wnTypes.ListValue), global::Google.Protobuf.WellKnownTypes.ListValue.Parser, new []{ "Values" }, null, null, null)
47 })); 46 }));
48 } 47 }
49 #endregion 48 #endregion
50 49
51 } 50 }
52 #region Enums 51 #region Enums
53 /// <summary> 52 /// <summary>
54 /// `NullValue` is a singleton enumeration to represent the null value for th e 53 /// `NullValue` is a singleton enumeration to represent the null value for the
55 /// `Value` type union. 54 /// `Value` type union.
56 /// 55 ///
57 /// The JSON representation for `NullValue` is JSON `null`. 56 /// The JSON representation for `NullValue` is JSON `null`.
58 /// </summary> 57 /// </summary>
59 public enum NullValue { 58 public enum NullValue {
60 /// <summary> 59 /// <summary>
61 /// Null value. 60 /// Null value.
62 /// </summary> 61 /// </summary>
63 [pbr::OriginalName("NULL_VALUE")] NullValue = 0, 62 [pbr::OriginalName("NULL_VALUE")] NullValue = 0,
64 } 63 }
65 64
66 #endregion 65 #endregion
67 66
68 #region Messages 67 #region Messages
69 /// <summary> 68 /// <summary>
70 /// `Struct` represents a structured data value, consisting of fields 69 /// `Struct` represents a structured data value, consisting of fields
71 /// which map to dynamically typed values. In some languages, `Struct` 70 /// which map to dynamically typed values. In some languages, `Struct`
72 /// might be supported by a native representation. For example, in 71 /// might be supported by a native representation. For example, in
73 /// scripting languages like JS a struct is represented as an 72 /// scripting languages like JS a struct is represented as an
74 /// object. The details of that representation are described together 73 /// object. The details of that representation are described together
75 /// with the proto support for the language. 74 /// with the proto support for the language.
76 /// 75 ///
77 /// The JSON representation for `Struct` is JSON object. 76 /// The JSON representation for `Struct` is JSON object.
78 /// </summary> 77 /// </summary>
79 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
80 public sealed partial class Struct : pb::IMessage<Struct> { 78 public sealed partial class Struct : pb::IMessage<Struct> {
81 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageP arser<Struct>(() => new Struct()); 79 private static readonly pb::MessageParser<Struct> _parser = new pb::MessageP arser<Struct>(() => new Struct());
80 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
82 public static pb::MessageParser<Struct> Parser { get { return _parser; } } 81 public static pb::MessageParser<Struct> Parser { get { return _parser; } }
83 82
83 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
84 public static pbr::MessageDescriptor Descriptor { 84 public static pbr::MessageDescriptor Descriptor {
85 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[0]; } 85 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[0]; }
86 } 86 }
87 87
88 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
88 pbr::MessageDescriptor pb::IMessage.Descriptor { 89 pbr::MessageDescriptor pb::IMessage.Descriptor {
89 get { return Descriptor; } 90 get { return Descriptor; }
90 } 91 }
91 92
93 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
92 public Struct() { 94 public Struct() {
93 OnConstruction(); 95 OnConstruction();
94 } 96 }
95 97
96 partial void OnConstruction(); 98 partial void OnConstruction();
97 99
100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
98 public Struct(Struct other) : this() { 101 public Struct(Struct other) : this() {
99 fields_ = other.fields_.Clone(); 102 fields_ = other.fields_.Clone();
100 } 103 }
101 104
105 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
102 public Struct Clone() { 106 public Struct Clone() {
103 return new Struct(this); 107 return new Struct(this);
104 } 108 }
105 109
106 /// <summary>Field number for the "fields" field.</summary> 110 /// <summary>Field number for the "fields" field.</summary>
107 public const int FieldsFieldNumber = 1; 111 public const int FieldsFieldNumber = 1;
108 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKn ownTypes.Value>.Codec _map_fields_codec 112 private static readonly pbc::MapField<string, global::Google.Protobuf.WellKn ownTypes.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::Goog le.Protobuf.WellKnownTypes.Value.Parser), 10); 113 = new pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value >.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Goog le.Protobuf.WellKnownTypes.Value.Parser), 10);
110 private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownType s.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTy pes.Value>(); 114 private readonly pbc::MapField<string, global::Google.Protobuf.WellKnownType s.Value> fields_ = new pbc::MapField<string, global::Google.Protobuf.WellKnownTy pes.Value>();
111 /// <summary> 115 /// <summary>
112 /// Unordered map of dynamically typed values. 116 /// Unordered map of dynamically typed values.
113 /// </summary> 117 /// </summary>
118 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
114 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> F ields { 119 public pbc::MapField<string, global::Google.Protobuf.WellKnownTypes.Value> F ields {
115 get { return fields_; } 120 get { return fields_; }
116 } 121 }
117 122
123 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
118 public override bool Equals(object other) { 124 public override bool Equals(object other) {
119 return Equals(other as Struct); 125 return Equals(other as Struct);
120 } 126 }
121 127
128 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
122 public bool Equals(Struct other) { 129 public bool Equals(Struct other) {
123 if (ReferenceEquals(other, null)) { 130 if (ReferenceEquals(other, null)) {
124 return false; 131 return false;
125 } 132 }
126 if (ReferenceEquals(other, this)) { 133 if (ReferenceEquals(other, this)) {
127 return true; 134 return true;
128 } 135 }
129 if (!Fields.Equals(other.Fields)) return false; 136 if (!Fields.Equals(other.Fields)) return false;
130 return true; 137 return true;
131 } 138 }
132 139
140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
133 public override int GetHashCode() { 141 public override int GetHashCode() {
134 int hash = 1; 142 int hash = 1;
135 hash ^= Fields.GetHashCode(); 143 hash ^= Fields.GetHashCode();
136 return hash; 144 return hash;
137 } 145 }
138 146
147 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
139 public override string ToString() { 148 public override string ToString() {
140 return pb::JsonFormatter.ToDiagnosticString(this); 149 return pb::JsonFormatter.ToDiagnosticString(this);
141 } 150 }
142 151
152 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
143 public void WriteTo(pb::CodedOutputStream output) { 153 public void WriteTo(pb::CodedOutputStream output) {
144 fields_.WriteTo(output, _map_fields_codec); 154 fields_.WriteTo(output, _map_fields_codec);
145 } 155 }
146 156
157 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
147 public int CalculateSize() { 158 public int CalculateSize() {
148 int size = 0; 159 int size = 0;
149 size += fields_.CalculateSize(_map_fields_codec); 160 size += fields_.CalculateSize(_map_fields_codec);
150 return size; 161 return size;
151 } 162 }
152 163
164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
153 public void MergeFrom(Struct other) { 165 public void MergeFrom(Struct other) {
154 if (other == null) { 166 if (other == null) {
155 return; 167 return;
156 } 168 }
157 fields_.Add(other.fields_); 169 fields_.Add(other.fields_);
158 } 170 }
159 171
172 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
160 public void MergeFrom(pb::CodedInputStream input) { 173 public void MergeFrom(pb::CodedInputStream input) {
161 uint tag; 174 uint tag;
162 while ((tag = input.ReadTag()) != 0) { 175 while ((tag = input.ReadTag()) != 0) {
163 switch(tag) { 176 switch(tag) {
164 default: 177 default:
165 input.SkipLastField(); 178 input.SkipLastField();
166 break; 179 break;
167 case 10: { 180 case 10: {
168 fields_.AddEntriesFrom(input, _map_fields_codec); 181 fields_.AddEntriesFrom(input, _map_fields_codec);
169 break; 182 break;
170 } 183 }
171 } 184 }
172 } 185 }
173 } 186 }
174 187
175 } 188 }
176 189
177 /// <summary> 190 /// <summary>
178 /// `Value` represents a dynamically typed value which can be either 191 /// `Value` represents a dynamically typed value which can be either
179 /// null, a number, a string, a boolean, a recursive struct value, or a 192 /// 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 193 /// list of values. A producer of value is expected to set one of that
181 /// variants, absence of any variant indicates an error. 194 /// variants, absence of any variant indicates an error.
182 /// 195 ///
183 /// The JSON representation for `Value` is JSON value. 196 /// The JSON representation for `Value` is JSON value.
184 /// </summary> 197 /// </summary>
185 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
186 public sealed partial class Value : pb::IMessage<Value> { 198 public sealed partial class Value : pb::IMessage<Value> {
187 private static readonly pb::MessageParser<Value> _parser = new pb::MessagePa rser<Value>(() => new Value()); 199 private static readonly pb::MessageParser<Value> _parser = new pb::MessagePa rser<Value>(() => new Value());
200 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
188 public static pb::MessageParser<Value> Parser { get { return _parser; } } 201 public static pb::MessageParser<Value> Parser { get { return _parser; } }
189 202
203 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
190 public static pbr::MessageDescriptor Descriptor { 204 public static pbr::MessageDescriptor Descriptor {
191 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[1]; } 205 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[1]; }
192 } 206 }
193 207
208 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
194 pbr::MessageDescriptor pb::IMessage.Descriptor { 209 pbr::MessageDescriptor pb::IMessage.Descriptor {
195 get { return Descriptor; } 210 get { return Descriptor; }
196 } 211 }
197 212
213 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
198 public Value() { 214 public Value() {
199 OnConstruction(); 215 OnConstruction();
200 } 216 }
201 217
202 partial void OnConstruction(); 218 partial void OnConstruction();
203 219
220 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
204 public Value(Value other) : this() { 221 public Value(Value other) : this() {
205 switch (other.KindCase) { 222 switch (other.KindCase) {
206 case KindOneofCase.NullValue: 223 case KindOneofCase.NullValue:
207 NullValue = other.NullValue; 224 NullValue = other.NullValue;
208 break; 225 break;
209 case KindOneofCase.NumberValue: 226 case KindOneofCase.NumberValue:
210 NumberValue = other.NumberValue; 227 NumberValue = other.NumberValue;
211 break; 228 break;
212 case KindOneofCase.StringValue: 229 case KindOneofCase.StringValue:
213 StringValue = other.StringValue; 230 StringValue = other.StringValue;
214 break; 231 break;
215 case KindOneofCase.BoolValue: 232 case KindOneofCase.BoolValue:
216 BoolValue = other.BoolValue; 233 BoolValue = other.BoolValue;
217 break; 234 break;
218 case KindOneofCase.StructValue: 235 case KindOneofCase.StructValue:
219 StructValue = other.StructValue.Clone(); 236 StructValue = other.StructValue.Clone();
220 break; 237 break;
221 case KindOneofCase.ListValue: 238 case KindOneofCase.ListValue:
222 ListValue = other.ListValue.Clone(); 239 ListValue = other.ListValue.Clone();
223 break; 240 break;
224 } 241 }
225 242
226 } 243 }
227 244
245 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
228 public Value Clone() { 246 public Value Clone() {
229 return new Value(this); 247 return new Value(this);
230 } 248 }
231 249
232 /// <summary>Field number for the "null_value" field.</summary> 250 /// <summary>Field number for the "null_value" field.</summary>
233 public const int NullValueFieldNumber = 1; 251 public const int NullValueFieldNumber = 1;
234 /// <summary> 252 /// <summary>
235 /// Represents a null value. 253 /// Represents a null value.
236 /// </summary> 254 /// </summary>
255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
237 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue { 256 public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
238 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protob uf.WellKnownTypes.NullValue) kind_ : 0; } 257 get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protob uf.WellKnownTypes.NullValue) kind_ : 0; }
239 set { 258 set {
240 kind_ = value; 259 kind_ = value;
241 kindCase_ = KindOneofCase.NullValue; 260 kindCase_ = KindOneofCase.NullValue;
242 } 261 }
243 } 262 }
244 263
245 /// <summary>Field number for the "number_value" field.</summary> 264 /// <summary>Field number for the "number_value" field.</summary>
246 public const int NumberValueFieldNumber = 2; 265 public const int NumberValueFieldNumber = 2;
247 /// <summary> 266 /// <summary>
248 /// Represents a double value. 267 /// Represents a double value.
249 /// </summary> 268 /// </summary>
269 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
250 public double NumberValue { 270 public double NumberValue {
251 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; } 271 get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; }
252 set { 272 set {
253 kind_ = value; 273 kind_ = value;
254 kindCase_ = KindOneofCase.NumberValue; 274 kindCase_ = KindOneofCase.NumberValue;
255 } 275 }
256 } 276 }
257 277
258 /// <summary>Field number for the "string_value" field.</summary> 278 /// <summary>Field number for the "string_value" field.</summary>
259 public const int StringValueFieldNumber = 3; 279 public const int StringValueFieldNumber = 3;
260 /// <summary> 280 /// <summary>
261 /// Represents a string value. 281 /// Represents a string value.
262 /// </summary> 282 /// </summary>
283 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
263 public string StringValue { 284 public string StringValue {
264 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; } 285 get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
265 set { 286 set {
266 kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 287 kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
267 kindCase_ = KindOneofCase.StringValue; 288 kindCase_ = KindOneofCase.StringValue;
268 } 289 }
269 } 290 }
270 291
271 /// <summary>Field number for the "bool_value" field.</summary> 292 /// <summary>Field number for the "bool_value" field.</summary>
272 public const int BoolValueFieldNumber = 4; 293 public const int BoolValueFieldNumber = 4;
273 /// <summary> 294 /// <summary>
274 /// Represents a boolean value. 295 /// Represents a boolean value.
275 /// </summary> 296 /// </summary>
297 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
276 public bool BoolValue { 298 public bool BoolValue {
277 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; } 299 get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
278 set { 300 set {
279 kind_ = value; 301 kind_ = value;
280 kindCase_ = KindOneofCase.BoolValue; 302 kindCase_ = KindOneofCase.BoolValue;
281 } 303 }
282 } 304 }
283 305
284 /// <summary>Field number for the "struct_value" field.</summary> 306 /// <summary>Field number for the "struct_value" field.</summary>
285 public const int StructValueFieldNumber = 5; 307 public const int StructValueFieldNumber = 5;
286 /// <summary> 308 /// <summary>
287 /// Represents a structured value. 309 /// Represents a structured value.
288 /// </summary> 310 /// </summary>
311 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
289 public global::Google.Protobuf.WellKnownTypes.Struct StructValue { 312 public global::Google.Protobuf.WellKnownTypes.Struct StructValue {
290 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Prot obuf.WellKnownTypes.Struct) kind_ : null; } 313 get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Prot obuf.WellKnownTypes.Struct) kind_ : null; }
291 set { 314 set {
292 kind_ = value; 315 kind_ = value;
293 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructVal ue; 316 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructVal ue;
294 } 317 }
295 } 318 }
296 319
297 /// <summary>Field number for the "list_value" field.</summary> 320 /// <summary>Field number for the "list_value" field.</summary>
298 public const int ListValueFieldNumber = 6; 321 public const int ListValueFieldNumber = 6;
299 /// <summary> 322 /// <summary>
300 /// Represents a repeated `Value`. 323 /// Represents a repeated `Value`.
301 /// </summary> 324 /// </summary>
325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
302 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue { 326 public global::Google.Protobuf.WellKnownTypes.ListValue ListValue {
303 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protob uf.WellKnownTypes.ListValue) kind_ : null; } 327 get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protob uf.WellKnownTypes.ListValue) kind_ : null; }
304 set { 328 set {
305 kind_ = value; 329 kind_ = value;
306 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue ; 330 kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue ;
307 } 331 }
308 } 332 }
309 333
310 private object kind_; 334 private object kind_;
311 /// <summary>Enum of possible cases for the "kind" oneof.</summary> 335 /// <summary>Enum of possible cases for the "kind" oneof.</summary>
312 public enum KindOneofCase { 336 public enum KindOneofCase {
313 None = 0, 337 None = 0,
314 NullValue = 1, 338 NullValue = 1,
315 NumberValue = 2, 339 NumberValue = 2,
316 StringValue = 3, 340 StringValue = 3,
317 BoolValue = 4, 341 BoolValue = 4,
318 StructValue = 5, 342 StructValue = 5,
319 ListValue = 6, 343 ListValue = 6,
320 } 344 }
321 private KindOneofCase kindCase_ = KindOneofCase.None; 345 private KindOneofCase kindCase_ = KindOneofCase.None;
346 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
322 public KindOneofCase KindCase { 347 public KindOneofCase KindCase {
323 get { return kindCase_; } 348 get { return kindCase_; }
324 } 349 }
325 350
351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
326 public void ClearKind() { 352 public void ClearKind() {
327 kindCase_ = KindOneofCase.None; 353 kindCase_ = KindOneofCase.None;
328 kind_ = null; 354 kind_ = null;
329 } 355 }
330 356
357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
331 public override bool Equals(object other) { 358 public override bool Equals(object other) {
332 return Equals(other as Value); 359 return Equals(other as Value);
333 } 360 }
334 361
362 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
335 public bool Equals(Value other) { 363 public bool Equals(Value other) {
336 if (ReferenceEquals(other, null)) { 364 if (ReferenceEquals(other, null)) {
337 return false; 365 return false;
338 } 366 }
339 if (ReferenceEquals(other, this)) { 367 if (ReferenceEquals(other, this)) {
340 return true; 368 return true;
341 } 369 }
342 if (NullValue != other.NullValue) return false; 370 if (NullValue != other.NullValue) return false;
343 if (NumberValue != other.NumberValue) return false; 371 if (NumberValue != other.NumberValue) return false;
344 if (StringValue != other.StringValue) return false; 372 if (StringValue != other.StringValue) return false;
345 if (BoolValue != other.BoolValue) return false; 373 if (BoolValue != other.BoolValue) return false;
346 if (!object.Equals(StructValue, other.StructValue)) return false; 374 if (!object.Equals(StructValue, other.StructValue)) return false;
347 if (!object.Equals(ListValue, other.ListValue)) return false; 375 if (!object.Equals(ListValue, other.ListValue)) return false;
348 if (KindCase != other.KindCase) return false; 376 if (KindCase != other.KindCase) return false;
349 return true; 377 return true;
350 } 378 }
351 379
380 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
352 public override int GetHashCode() { 381 public override int GetHashCode() {
353 int hash = 1; 382 int hash = 1;
354 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode(); 383 if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
355 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCod e(); 384 if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCod e();
356 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCod e(); 385 if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCod e();
357 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode(); 386 if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
358 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCod e(); 387 if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCod e();
359 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode(); 388 if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
360 hash ^= (int) kindCase_; 389 hash ^= (int) kindCase_;
361 return hash; 390 return hash;
362 } 391 }
363 392
393 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
364 public override string ToString() { 394 public override string ToString() {
365 return pb::JsonFormatter.ToDiagnosticString(this); 395 return pb::JsonFormatter.ToDiagnosticString(this);
366 } 396 }
367 397
398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
368 public void WriteTo(pb::CodedOutputStream output) { 399 public void WriteTo(pb::CodedOutputStream output) {
369 if (kindCase_ == KindOneofCase.NullValue) { 400 if (kindCase_ == KindOneofCase.NullValue) {
370 output.WriteRawTag(8); 401 output.WriteRawTag(8);
371 output.WriteEnum((int) NullValue); 402 output.WriteEnum((int) NullValue);
372 } 403 }
373 if (kindCase_ == KindOneofCase.NumberValue) { 404 if (kindCase_ == KindOneofCase.NumberValue) {
374 output.WriteRawTag(17); 405 output.WriteRawTag(17);
375 output.WriteDouble(NumberValue); 406 output.WriteDouble(NumberValue);
376 } 407 }
377 if (kindCase_ == KindOneofCase.StringValue) { 408 if (kindCase_ == KindOneofCase.StringValue) {
378 output.WriteRawTag(26); 409 output.WriteRawTag(26);
379 output.WriteString(StringValue); 410 output.WriteString(StringValue);
380 } 411 }
381 if (kindCase_ == KindOneofCase.BoolValue) { 412 if (kindCase_ == KindOneofCase.BoolValue) {
382 output.WriteRawTag(32); 413 output.WriteRawTag(32);
383 output.WriteBool(BoolValue); 414 output.WriteBool(BoolValue);
384 } 415 }
385 if (kindCase_ == KindOneofCase.StructValue) { 416 if (kindCase_ == KindOneofCase.StructValue) {
386 output.WriteRawTag(42); 417 output.WriteRawTag(42);
387 output.WriteMessage(StructValue); 418 output.WriteMessage(StructValue);
388 } 419 }
389 if (kindCase_ == KindOneofCase.ListValue) { 420 if (kindCase_ == KindOneofCase.ListValue) {
390 output.WriteRawTag(50); 421 output.WriteRawTag(50);
391 output.WriteMessage(ListValue); 422 output.WriteMessage(ListValue);
392 } 423 }
393 } 424 }
394 425
426 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
395 public int CalculateSize() { 427 public int CalculateSize() {
396 int size = 0; 428 int size = 0;
397 if (kindCase_ == KindOneofCase.NullValue) { 429 if (kindCase_ == KindOneofCase.NullValue) {
398 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue); 430 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
399 } 431 }
400 if (kindCase_ == KindOneofCase.NumberValue) { 432 if (kindCase_ == KindOneofCase.NumberValue) {
401 size += 1 + 8; 433 size += 1 + 8;
402 } 434 }
403 if (kindCase_ == KindOneofCase.StringValue) { 435 if (kindCase_ == KindOneofCase.StringValue) {
404 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue); 436 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
405 } 437 }
406 if (kindCase_ == KindOneofCase.BoolValue) { 438 if (kindCase_ == KindOneofCase.BoolValue) {
407 size += 1 + 1; 439 size += 1 + 1;
408 } 440 }
409 if (kindCase_ == KindOneofCase.StructValue) { 441 if (kindCase_ == KindOneofCase.StructValue) {
410 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue); 442 size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue);
411 } 443 }
412 if (kindCase_ == KindOneofCase.ListValue) { 444 if (kindCase_ == KindOneofCase.ListValue) {
413 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue); 445 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
414 } 446 }
415 return size; 447 return size;
416 } 448 }
417 449
450 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
418 public void MergeFrom(Value other) { 451 public void MergeFrom(Value other) {
419 if (other == null) { 452 if (other == null) {
420 return; 453 return;
421 } 454 }
422 switch (other.KindCase) { 455 switch (other.KindCase) {
423 case KindOneofCase.NullValue: 456 case KindOneofCase.NullValue:
424 NullValue = other.NullValue; 457 NullValue = other.NullValue;
425 break; 458 break;
426 case KindOneofCase.NumberValue: 459 case KindOneofCase.NumberValue:
427 NumberValue = other.NumberValue; 460 NumberValue = other.NumberValue;
428 break; 461 break;
429 case KindOneofCase.StringValue: 462 case KindOneofCase.StringValue:
430 StringValue = other.StringValue; 463 StringValue = other.StringValue;
431 break; 464 break;
432 case KindOneofCase.BoolValue: 465 case KindOneofCase.BoolValue:
433 BoolValue = other.BoolValue; 466 BoolValue = other.BoolValue;
434 break; 467 break;
435 case KindOneofCase.StructValue: 468 case KindOneofCase.StructValue:
436 StructValue = other.StructValue; 469 StructValue = other.StructValue;
437 break; 470 break;
438 case KindOneofCase.ListValue: 471 case KindOneofCase.ListValue:
439 ListValue = other.ListValue; 472 ListValue = other.ListValue;
440 break; 473 break;
441 } 474 }
442 475
443 } 476 }
444 477
478 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
445 public void MergeFrom(pb::CodedInputStream input) { 479 public void MergeFrom(pb::CodedInputStream input) {
446 uint tag; 480 uint tag;
447 while ((tag = input.ReadTag()) != 0) { 481 while ((tag = input.ReadTag()) != 0) {
448 switch(tag) { 482 switch(tag) {
449 default: 483 default:
450 input.SkipLastField(); 484 input.SkipLastField();
451 break; 485 break;
452 case 8: { 486 case 8: {
453 kind_ = input.ReadEnum(); 487 kind_ = input.ReadEnum();
454 kindCase_ = KindOneofCase.NullValue; 488 kindCase_ = KindOneofCase.NullValue;
(...skipping 29 matching lines...) Expand all
484 ListValue = subBuilder; 518 ListValue = subBuilder;
485 break; 519 break;
486 } 520 }
487 } 521 }
488 } 522 }
489 } 523 }
490 524
491 } 525 }
492 526
493 /// <summary> 527 /// <summary>
494 /// `ListValue` is a wrapper around a repeated field of values. 528 /// `ListValue` is a wrapper around a repeated field of values.
495 /// 529 ///
496 /// The JSON representation for `ListValue` is JSON array. 530 /// The JSON representation for `ListValue` is JSON array.
497 /// </summary> 531 /// </summary>
498 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
499 public sealed partial class ListValue : pb::IMessage<ListValue> { 532 public sealed partial class ListValue : pb::IMessage<ListValue> {
500 private static readonly pb::MessageParser<ListValue> _parser = new pb::Messa geParser<ListValue>(() => new ListValue()); 533 private static readonly pb::MessageParser<ListValue> _parser = new pb::Messa geParser<ListValue>(() => new ListValue());
534 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
501 public static pb::MessageParser<ListValue> Parser { get { return _parser; } } 535 public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
502 536
537 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
503 public static pbr::MessageDescriptor Descriptor { 538 public static pbr::MessageDescriptor Descriptor {
504 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[2]; } 539 get { return global::Google.Protobuf.WellKnownTypes.StructReflection.Descr iptor.MessageTypes[2]; }
505 } 540 }
506 541
542 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
507 pbr::MessageDescriptor pb::IMessage.Descriptor { 543 pbr::MessageDescriptor pb::IMessage.Descriptor {
508 get { return Descriptor; } 544 get { return Descriptor; }
509 } 545 }
510 546
547 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
511 public ListValue() { 548 public ListValue() {
512 OnConstruction(); 549 OnConstruction();
513 } 550 }
514 551
515 partial void OnConstruction(); 552 partial void OnConstruction();
516 553
554 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
517 public ListValue(ListValue other) : this() { 555 public ListValue(ListValue other) : this() {
518 values_ = other.values_.Clone(); 556 values_ = other.values_.Clone();
519 } 557 }
520 558
559 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
521 public ListValue Clone() { 560 public ListValue Clone() {
522 return new ListValue(this); 561 return new ListValue(this);
523 } 562 }
524 563
525 /// <summary>Field number for the "values" field.</summary> 564 /// <summary>Field number for the "values" field.</summary>
526 public const int ValuesFieldNumber = 1; 565 public const int ValuesFieldNumber = 1;
527 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType s.Value> _repeated_values_codec 566 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType s.Value> _repeated_values_codec
528 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.V alue.Parser); 567 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.V alue.Parser);
529 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.V alue> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Va lue>(); 568 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.V alue> values_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Va lue>();
530 /// <summary> 569 /// <summary>
531 /// Repeated field of dynamically typed values. 570 /// Repeated field of dynamically typed values.
532 /// </summary> 571 /// </summary>
572 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
533 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Valu es { 573 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Value> Valu es {
534 get { return values_; } 574 get { return values_; }
535 } 575 }
536 576
577 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
537 public override bool Equals(object other) { 578 public override bool Equals(object other) {
538 return Equals(other as ListValue); 579 return Equals(other as ListValue);
539 } 580 }
540 581
582 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
541 public bool Equals(ListValue other) { 583 public bool Equals(ListValue other) {
542 if (ReferenceEquals(other, null)) { 584 if (ReferenceEquals(other, null)) {
543 return false; 585 return false;
544 } 586 }
545 if (ReferenceEquals(other, this)) { 587 if (ReferenceEquals(other, this)) {
546 return true; 588 return true;
547 } 589 }
548 if(!values_.Equals(other.values_)) return false; 590 if(!values_.Equals(other.values_)) return false;
549 return true; 591 return true;
550 } 592 }
551 593
594 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
552 public override int GetHashCode() { 595 public override int GetHashCode() {
553 int hash = 1; 596 int hash = 1;
554 hash ^= values_.GetHashCode(); 597 hash ^= values_.GetHashCode();
555 return hash; 598 return hash;
556 } 599 }
557 600
601 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
558 public override string ToString() { 602 public override string ToString() {
559 return pb::JsonFormatter.ToDiagnosticString(this); 603 return pb::JsonFormatter.ToDiagnosticString(this);
560 } 604 }
561 605
606 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
562 public void WriteTo(pb::CodedOutputStream output) { 607 public void WriteTo(pb::CodedOutputStream output) {
563 values_.WriteTo(output, _repeated_values_codec); 608 values_.WriteTo(output, _repeated_values_codec);
564 } 609 }
565 610
611 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
566 public int CalculateSize() { 612 public int CalculateSize() {
567 int size = 0; 613 int size = 0;
568 size += values_.CalculateSize(_repeated_values_codec); 614 size += values_.CalculateSize(_repeated_values_codec);
569 return size; 615 return size;
570 } 616 }
571 617
618 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
572 public void MergeFrom(ListValue other) { 619 public void MergeFrom(ListValue other) {
573 if (other == null) { 620 if (other == null) {
574 return; 621 return;
575 } 622 }
576 values_.Add(other.values_); 623 values_.Add(other.values_);
577 } 624 }
578 625
626 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
579 public void MergeFrom(pb::CodedInputStream input) { 627 public void MergeFrom(pb::CodedInputStream input) {
580 uint tag; 628 uint tag;
581 while ((tag = input.ReadTag()) != 0) { 629 while ((tag = input.ReadTag()) != 0) {
582 switch(tag) { 630 switch(tag) {
583 default: 631 default:
584 input.SkipLastField(); 632 input.SkipLastField();
585 break; 633 break;
586 case 10: { 634 case 10: {
587 values_.AddEntriesFrom(input, _repeated_values_codec); 635 values_.AddEntriesFrom(input, _repeated_values_codec);
588 break; 636 break;
589 } 637 }
590 } 638 }
591 } 639 }
592 } 640 }
593 641
594 } 642 }
595 643
596 #endregion 644 #endregion
597 645
598 } 646 }
599 647
600 #endregion Designer generated code 648 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698