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

Side by Side Diff: third_party/grpc/src/csharp/Grpc.IntegrationTesting/Payloads.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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
(Empty)
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: src/proto/grpc/testing/payloads.proto
3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code
5
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Grpc.Testing {
11
12 /// <summary>Holder for reflection information generated from src/proto/grpc/t esting/payloads.proto</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class PayloadsReflection {
15
16 #region Descriptor
17 /// <summary>File descriptor for src/proto/grpc/testing/payloads.proto</summ ary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
20 }
21 private static pbr::FileDescriptor descriptor;
22
23 static PayloadsReflection() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3BheWxvYWRzLnByb3RvEgxncnBj",
27 "LnRlc3RpbmciNwoQQnl0ZUJ1ZmZlclBhcmFtcxIQCghyZXFfc2l6ZRgBIAEo",
28 "BRIRCglyZXNwX3NpemUYAiABKAUiOAoRU2ltcGxlUHJvdG9QYXJhbXMSEAoI",
29 "cmVxX3NpemUYASABKAUSEQoJcmVzcF9zaXplGAIgASgFIhQKEkNvbXBsZXhQ",
30 "cm90b1BhcmFtcyLKAQoNUGF5bG9hZENvbmZpZxI4Cg5ieXRlYnVmX3BhcmFt",
31 "cxgBIAEoCzIeLmdycGMudGVzdGluZy5CeXRlQnVmZmVyUGFyYW1zSAASOAoN",
32 "c2ltcGxlX3BhcmFtcxgCIAEoCzIfLmdycGMudGVzdGluZy5TaW1wbGVQcm90",
33 "b1BhcmFtc0gAEjoKDmNvbXBsZXhfcGFyYW1zGAMgASgLMiAuZ3JwYy50ZXN0",
34 "aW5nLkNvbXBsZXhQcm90b1BhcmFtc0gAQgkKB3BheWxvYWRiBnByb3RvMw=="));
35 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
36 new pbr::FileDescriptor[] { },
37 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
38 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ByteBufferPar ams), global::Grpc.Testing.ByteBufferParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null),
39 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleProtoPa rams), global::Grpc.Testing.SimpleProtoParams.Parser, new[]{ "ReqSize", "RespSiz e" }, null, null, null),
40 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ComplexProtoP arams), global::Grpc.Testing.ComplexProtoParams.Parser, null, null, null, null),
41 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PayloadConfig ), global::Grpc.Testing.PayloadConfig.Parser, new[]{ "BytebufParams", "SimplePar ams", "ComplexParams" }, new[]{ "Payload" }, null, null)
42 }));
43 }
44 #endregion
45
46 }
47 #region Messages
48 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
49 public sealed partial class ByteBufferParams : pb::IMessage<ByteBufferParams> {
50 private static readonly pb::MessageParser<ByteBufferParams> _parser = new pb ::MessageParser<ByteBufferParams>(() => new ByteBufferParams());
51 public static pb::MessageParser<ByteBufferParams> Parser { get { return _par ser; } }
52
53 public static pbr::MessageDescriptor Descriptor {
54 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTyp es[0]; }
55 }
56
57 pbr::MessageDescriptor pb::IMessage.Descriptor {
58 get { return Descriptor; }
59 }
60
61 public ByteBufferParams() {
62 OnConstruction();
63 }
64
65 partial void OnConstruction();
66
67 public ByteBufferParams(ByteBufferParams other) : this() {
68 reqSize_ = other.reqSize_;
69 respSize_ = other.respSize_;
70 }
71
72 public ByteBufferParams Clone() {
73 return new ByteBufferParams(this);
74 }
75
76 /// <summary>Field number for the "req_size" field.</summary>
77 public const int ReqSizeFieldNumber = 1;
78 private int reqSize_;
79 public int ReqSize {
80 get { return reqSize_; }
81 set {
82 reqSize_ = value;
83 }
84 }
85
86 /// <summary>Field number for the "resp_size" field.</summary>
87 public const int RespSizeFieldNumber = 2;
88 private int respSize_;
89 public int RespSize {
90 get { return respSize_; }
91 set {
92 respSize_ = value;
93 }
94 }
95
96 public override bool Equals(object other) {
97 return Equals(other as ByteBufferParams);
98 }
99
100 public bool Equals(ByteBufferParams other) {
101 if (ReferenceEquals(other, null)) {
102 return false;
103 }
104 if (ReferenceEquals(other, this)) {
105 return true;
106 }
107 if (ReqSize != other.ReqSize) return false;
108 if (RespSize != other.RespSize) return false;
109 return true;
110 }
111
112 public override int GetHashCode() {
113 int hash = 1;
114 if (ReqSize != 0) hash ^= ReqSize.GetHashCode();
115 if (RespSize != 0) hash ^= RespSize.GetHashCode();
116 return hash;
117 }
118
119 public override string ToString() {
120 return pb::JsonFormatter.ToDiagnosticString(this);
121 }
122
123 public void WriteTo(pb::CodedOutputStream output) {
124 if (ReqSize != 0) {
125 output.WriteRawTag(8);
126 output.WriteInt32(ReqSize);
127 }
128 if (RespSize != 0) {
129 output.WriteRawTag(16);
130 output.WriteInt32(RespSize);
131 }
132 }
133
134 public int CalculateSize() {
135 int size = 0;
136 if (ReqSize != 0) {
137 size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize);
138 }
139 if (RespSize != 0) {
140 size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize);
141 }
142 return size;
143 }
144
145 public void MergeFrom(ByteBufferParams other) {
146 if (other == null) {
147 return;
148 }
149 if (other.ReqSize != 0) {
150 ReqSize = other.ReqSize;
151 }
152 if (other.RespSize != 0) {
153 RespSize = other.RespSize;
154 }
155 }
156
157 public void MergeFrom(pb::CodedInputStream input) {
158 uint tag;
159 while ((tag = input.ReadTag()) != 0) {
160 switch(tag) {
161 default:
162 input.SkipLastField();
163 break;
164 case 8: {
165 ReqSize = input.ReadInt32();
166 break;
167 }
168 case 16: {
169 RespSize = input.ReadInt32();
170 break;
171 }
172 }
173 }
174 }
175
176 }
177
178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
179 public sealed partial class SimpleProtoParams : pb::IMessage<SimpleProtoParams > {
180 private static readonly pb::MessageParser<SimpleProtoParams> _parser = new p b::MessageParser<SimpleProtoParams>(() => new SimpleProtoParams());
181 public static pb::MessageParser<SimpleProtoParams> Parser { get { return _pa rser; } }
182
183 public static pbr::MessageDescriptor Descriptor {
184 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTyp es[1]; }
185 }
186
187 pbr::MessageDescriptor pb::IMessage.Descriptor {
188 get { return Descriptor; }
189 }
190
191 public SimpleProtoParams() {
192 OnConstruction();
193 }
194
195 partial void OnConstruction();
196
197 public SimpleProtoParams(SimpleProtoParams other) : this() {
198 reqSize_ = other.reqSize_;
199 respSize_ = other.respSize_;
200 }
201
202 public SimpleProtoParams Clone() {
203 return new SimpleProtoParams(this);
204 }
205
206 /// <summary>Field number for the "req_size" field.</summary>
207 public const int ReqSizeFieldNumber = 1;
208 private int reqSize_;
209 public int ReqSize {
210 get { return reqSize_; }
211 set {
212 reqSize_ = value;
213 }
214 }
215
216 /// <summary>Field number for the "resp_size" field.</summary>
217 public const int RespSizeFieldNumber = 2;
218 private int respSize_;
219 public int RespSize {
220 get { return respSize_; }
221 set {
222 respSize_ = value;
223 }
224 }
225
226 public override bool Equals(object other) {
227 return Equals(other as SimpleProtoParams);
228 }
229
230 public bool Equals(SimpleProtoParams other) {
231 if (ReferenceEquals(other, null)) {
232 return false;
233 }
234 if (ReferenceEquals(other, this)) {
235 return true;
236 }
237 if (ReqSize != other.ReqSize) return false;
238 if (RespSize != other.RespSize) return false;
239 return true;
240 }
241
242 public override int GetHashCode() {
243 int hash = 1;
244 if (ReqSize != 0) hash ^= ReqSize.GetHashCode();
245 if (RespSize != 0) hash ^= RespSize.GetHashCode();
246 return hash;
247 }
248
249 public override string ToString() {
250 return pb::JsonFormatter.ToDiagnosticString(this);
251 }
252
253 public void WriteTo(pb::CodedOutputStream output) {
254 if (ReqSize != 0) {
255 output.WriteRawTag(8);
256 output.WriteInt32(ReqSize);
257 }
258 if (RespSize != 0) {
259 output.WriteRawTag(16);
260 output.WriteInt32(RespSize);
261 }
262 }
263
264 public int CalculateSize() {
265 int size = 0;
266 if (ReqSize != 0) {
267 size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize);
268 }
269 if (RespSize != 0) {
270 size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize);
271 }
272 return size;
273 }
274
275 public void MergeFrom(SimpleProtoParams other) {
276 if (other == null) {
277 return;
278 }
279 if (other.ReqSize != 0) {
280 ReqSize = other.ReqSize;
281 }
282 if (other.RespSize != 0) {
283 RespSize = other.RespSize;
284 }
285 }
286
287 public void MergeFrom(pb::CodedInputStream input) {
288 uint tag;
289 while ((tag = input.ReadTag()) != 0) {
290 switch(tag) {
291 default:
292 input.SkipLastField();
293 break;
294 case 8: {
295 ReqSize = input.ReadInt32();
296 break;
297 }
298 case 16: {
299 RespSize = input.ReadInt32();
300 break;
301 }
302 }
303 }
304 }
305
306 }
307
308 /// <summary>
309 /// TODO (vpai): Fill this in once the details of complex, representative
310 /// protos are decided
311 /// </summary>
312 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
313 public sealed partial class ComplexProtoParams : pb::IMessage<ComplexProtoPara ms> {
314 private static readonly pb::MessageParser<ComplexProtoParams> _parser = new pb::MessageParser<ComplexProtoParams>(() => new ComplexProtoParams());
315 public static pb::MessageParser<ComplexProtoParams> Parser { get { return _p arser; } }
316
317 public static pbr::MessageDescriptor Descriptor {
318 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTyp es[2]; }
319 }
320
321 pbr::MessageDescriptor pb::IMessage.Descriptor {
322 get { return Descriptor; }
323 }
324
325 public ComplexProtoParams() {
326 OnConstruction();
327 }
328
329 partial void OnConstruction();
330
331 public ComplexProtoParams(ComplexProtoParams other) : this() {
332 }
333
334 public ComplexProtoParams Clone() {
335 return new ComplexProtoParams(this);
336 }
337
338 public override bool Equals(object other) {
339 return Equals(other as ComplexProtoParams);
340 }
341
342 public bool Equals(ComplexProtoParams other) {
343 if (ReferenceEquals(other, null)) {
344 return false;
345 }
346 if (ReferenceEquals(other, this)) {
347 return true;
348 }
349 return true;
350 }
351
352 public override int GetHashCode() {
353 int hash = 1;
354 return hash;
355 }
356
357 public override string ToString() {
358 return pb::JsonFormatter.ToDiagnosticString(this);
359 }
360
361 public void WriteTo(pb::CodedOutputStream output) {
362 }
363
364 public int CalculateSize() {
365 int size = 0;
366 return size;
367 }
368
369 public void MergeFrom(ComplexProtoParams other) {
370 if (other == null) {
371 return;
372 }
373 }
374
375 public void MergeFrom(pb::CodedInputStream input) {
376 uint tag;
377 while ((tag = input.ReadTag()) != 0) {
378 switch(tag) {
379 default:
380 input.SkipLastField();
381 break;
382 }
383 }
384 }
385
386 }
387
388 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
389 public sealed partial class PayloadConfig : pb::IMessage<PayloadConfig> {
390 private static readonly pb::MessageParser<PayloadConfig> _parser = new pb::M essageParser<PayloadConfig>(() => new PayloadConfig());
391 public static pb::MessageParser<PayloadConfig> Parser { get { return _parser ; } }
392
393 public static pbr::MessageDescriptor Descriptor {
394 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTyp es[3]; }
395 }
396
397 pbr::MessageDescriptor pb::IMessage.Descriptor {
398 get { return Descriptor; }
399 }
400
401 public PayloadConfig() {
402 OnConstruction();
403 }
404
405 partial void OnConstruction();
406
407 public PayloadConfig(PayloadConfig other) : this() {
408 switch (other.PayloadCase) {
409 case PayloadOneofCase.BytebufParams:
410 BytebufParams = other.BytebufParams.Clone();
411 break;
412 case PayloadOneofCase.SimpleParams:
413 SimpleParams = other.SimpleParams.Clone();
414 break;
415 case PayloadOneofCase.ComplexParams:
416 ComplexParams = other.ComplexParams.Clone();
417 break;
418 }
419
420 }
421
422 public PayloadConfig Clone() {
423 return new PayloadConfig(this);
424 }
425
426 /// <summary>Field number for the "bytebuf_params" field.</summary>
427 public const int BytebufParamsFieldNumber = 1;
428 public global::Grpc.Testing.ByteBufferParams BytebufParams {
429 get { return payloadCase_ == PayloadOneofCase.BytebufParams ? (global::Grp c.Testing.ByteBufferParams) payload_ : null; }
430 set {
431 payload_ = value;
432 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase. BytebufParams;
433 }
434 }
435
436 /// <summary>Field number for the "simple_params" field.</summary>
437 public const int SimpleParamsFieldNumber = 2;
438 public global::Grpc.Testing.SimpleProtoParams SimpleParams {
439 get { return payloadCase_ == PayloadOneofCase.SimpleParams ? (global::Grpc .Testing.SimpleProtoParams) payload_ : null; }
440 set {
441 payload_ = value;
442 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase. SimpleParams;
443 }
444 }
445
446 /// <summary>Field number for the "complex_params" field.</summary>
447 public const int ComplexParamsFieldNumber = 3;
448 public global::Grpc.Testing.ComplexProtoParams ComplexParams {
449 get { return payloadCase_ == PayloadOneofCase.ComplexParams ? (global::Grp c.Testing.ComplexProtoParams) payload_ : null; }
450 set {
451 payload_ = value;
452 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase. ComplexParams;
453 }
454 }
455
456 private object payload_;
457 /// <summary>Enum of possible cases for the "payload" oneof.</summary>
458 public enum PayloadOneofCase {
459 None = 0,
460 BytebufParams = 1,
461 SimpleParams = 2,
462 ComplexParams = 3,
463 }
464 private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
465 public PayloadOneofCase PayloadCase {
466 get { return payloadCase_; }
467 }
468
469 public void ClearPayload() {
470 payloadCase_ = PayloadOneofCase.None;
471 payload_ = null;
472 }
473
474 public override bool Equals(object other) {
475 return Equals(other as PayloadConfig);
476 }
477
478 public bool Equals(PayloadConfig other) {
479 if (ReferenceEquals(other, null)) {
480 return false;
481 }
482 if (ReferenceEquals(other, this)) {
483 return true;
484 }
485 if (!object.Equals(BytebufParams, other.BytebufParams)) return false;
486 if (!object.Equals(SimpleParams, other.SimpleParams)) return false;
487 if (!object.Equals(ComplexParams, other.ComplexParams)) return false;
488 if (PayloadCase != other.PayloadCase) return false;
489 return true;
490 }
491
492 public override int GetHashCode() {
493 int hash = 1;
494 if (payloadCase_ == PayloadOneofCase.BytebufParams) hash ^= BytebufParams. GetHashCode();
495 if (payloadCase_ == PayloadOneofCase.SimpleParams) hash ^= SimpleParams.Ge tHashCode();
496 if (payloadCase_ == PayloadOneofCase.ComplexParams) hash ^= ComplexParams. GetHashCode();
497 hash ^= (int) payloadCase_;
498 return hash;
499 }
500
501 public override string ToString() {
502 return pb::JsonFormatter.ToDiagnosticString(this);
503 }
504
505 public void WriteTo(pb::CodedOutputStream output) {
506 if (payloadCase_ == PayloadOneofCase.BytebufParams) {
507 output.WriteRawTag(10);
508 output.WriteMessage(BytebufParams);
509 }
510 if (payloadCase_ == PayloadOneofCase.SimpleParams) {
511 output.WriteRawTag(18);
512 output.WriteMessage(SimpleParams);
513 }
514 if (payloadCase_ == PayloadOneofCase.ComplexParams) {
515 output.WriteRawTag(26);
516 output.WriteMessage(ComplexParams);
517 }
518 }
519
520 public int CalculateSize() {
521 int size = 0;
522 if (payloadCase_ == PayloadOneofCase.BytebufParams) {
523 size += 1 + pb::CodedOutputStream.ComputeMessageSize(BytebufParams);
524 }
525 if (payloadCase_ == PayloadOneofCase.SimpleParams) {
526 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SimpleParams);
527 }
528 if (payloadCase_ == PayloadOneofCase.ComplexParams) {
529 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ComplexParams);
530 }
531 return size;
532 }
533
534 public void MergeFrom(PayloadConfig other) {
535 if (other == null) {
536 return;
537 }
538 switch (other.PayloadCase) {
539 case PayloadOneofCase.BytebufParams:
540 BytebufParams = other.BytebufParams;
541 break;
542 case PayloadOneofCase.SimpleParams:
543 SimpleParams = other.SimpleParams;
544 break;
545 case PayloadOneofCase.ComplexParams:
546 ComplexParams = other.ComplexParams;
547 break;
548 }
549
550 }
551
552 public void MergeFrom(pb::CodedInputStream input) {
553 uint tag;
554 while ((tag = input.ReadTag()) != 0) {
555 switch(tag) {
556 default:
557 input.SkipLastField();
558 break;
559 case 10: {
560 global::Grpc.Testing.ByteBufferParams subBuilder = new global::Grpc. Testing.ByteBufferParams();
561 if (payloadCase_ == PayloadOneofCase.BytebufParams) {
562 subBuilder.MergeFrom(BytebufParams);
563 }
564 input.ReadMessage(subBuilder);
565 BytebufParams = subBuilder;
566 break;
567 }
568 case 18: {
569 global::Grpc.Testing.SimpleProtoParams subBuilder = new global::Grpc .Testing.SimpleProtoParams();
570 if (payloadCase_ == PayloadOneofCase.SimpleParams) {
571 subBuilder.MergeFrom(SimpleParams);
572 }
573 input.ReadMessage(subBuilder);
574 SimpleParams = subBuilder;
575 break;
576 }
577 case 26: {
578 global::Grpc.Testing.ComplexProtoParams subBuilder = new global::Grp c.Testing.ComplexProtoParams();
579 if (payloadCase_ == PayloadOneofCase.ComplexParams) {
580 subBuilder.MergeFrom(ComplexParams);
581 }
582 input.ReadMessage(subBuilder);
583 ComplexParams = subBuilder;
584 break;
585 }
586 }
587 }
588 }
589
590 }
591
592 #endregion
593
594 }
595
596 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698