1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: src/proto/grpc/testing/payloads.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 Grpc.Testing { 13 14 /// <summary>Holder for reflection information generated from src/proto/grpc/testing/payloads.proto</summary> 15 public static partial class PayloadsReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for src/proto/grpc/testing/payloads.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 PayloadsReflection()24 static PayloadsReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3BheWxvYWRzLnByb3RvEgxncnBj", 28 "LnRlc3RpbmciNwoQQnl0ZUJ1ZmZlclBhcmFtcxIQCghyZXFfc2l6ZRgBIAEo", 29 "BRIRCglyZXNwX3NpemUYAiABKAUiOAoRU2ltcGxlUHJvdG9QYXJhbXMSEAoI", 30 "cmVxX3NpemUYASABKAUSEQoJcmVzcF9zaXplGAIgASgFIhQKEkNvbXBsZXhQ", 31 "cm90b1BhcmFtcyLKAQoNUGF5bG9hZENvbmZpZxI4Cg5ieXRlYnVmX3BhcmFt", 32 "cxgBIAEoCzIeLmdycGMudGVzdGluZy5CeXRlQnVmZmVyUGFyYW1zSAASOAoN", 33 "c2ltcGxlX3BhcmFtcxgCIAEoCzIfLmdycGMudGVzdGluZy5TaW1wbGVQcm90", 34 "b1BhcmFtc0gAEjoKDmNvbXBsZXhfcGFyYW1zGAMgASgLMiAuZ3JwYy50ZXN0", 35 "aW5nLkNvbXBsZXhQcm90b1BhcmFtc0gAQgkKB3BheWxvYWRiBnByb3RvMw==")); 36 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 37 new pbr::FileDescriptor[] { }, 38 new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { 39 new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ByteBufferParams), global::Grpc.Testing.ByteBufferParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), 40 new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleProtoParams), global::Grpc.Testing.SimpleProtoParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), 41 new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ComplexProtoParams), global::Grpc.Testing.ComplexProtoParams.Parser, null, null, null, null), 42 new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.PayloadConfig), global::Grpc.Testing.PayloadConfig.Parser, new[]{ "BytebufParams", "SimpleParams", "ComplexParams" }, new[]{ "Payload" }, null, null) 43 })); 44 } 45 #endregion 46 47 } 48 #region Messages 49 public sealed partial class ByteBufferParams : pb::IMessage<ByteBufferParams> { 50 private static readonly pb::MessageParser<ByteBufferParams> _parser = new pb::MessageParser<ByteBufferParams>(() => new ByteBufferParams()); 51 private pb::UnknownFieldSet _unknownFields; 52 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 public static pb::MessageParser<ByteBufferParams> Parser { get { return _parser; } } 54 55 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 56 public static pbr::MessageDescriptor Descriptor { 57 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[0]; } 58 } 59 60 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 61 pbr::MessageDescriptor pb::IMessage.Descriptor { 62 get { return Descriptor; } 63 } 64 65 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ByteBufferParams()66 public ByteBufferParams() { 67 OnConstruction(); 68 } 69 OnConstruction()70 partial void OnConstruction(); 71 72 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ByteBufferParams(ByteBufferParams other)73 public ByteBufferParams(ByteBufferParams other) : this() { 74 reqSize_ = other.reqSize_; 75 respSize_ = other.respSize_; 76 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 77 } 78 79 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()80 public ByteBufferParams Clone() { 81 return new ByteBufferParams(this); 82 } 83 84 /// <summary>Field number for the "req_size" field.</summary> 85 public const int ReqSizeFieldNumber = 1; 86 private int reqSize_; 87 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 88 public int ReqSize { 89 get { return reqSize_; } 90 set { 91 reqSize_ = value; 92 } 93 } 94 95 /// <summary>Field number for the "resp_size" field.</summary> 96 public const int RespSizeFieldNumber = 2; 97 private int respSize_; 98 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 99 public int RespSize { 100 get { return respSize_; } 101 set { 102 respSize_ = value; 103 } 104 } 105 106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)107 public override bool Equals(object other) { 108 return Equals(other as ByteBufferParams); 109 } 110 111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(ByteBufferParams other)112 public bool Equals(ByteBufferParams other) { 113 if (ReferenceEquals(other, null)) { 114 return false; 115 } 116 if (ReferenceEquals(other, this)) { 117 return true; 118 } 119 if (ReqSize != other.ReqSize) return false; 120 if (RespSize != other.RespSize) return false; 121 return Equals(_unknownFields, other._unknownFields); 122 } 123 124 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()125 public override int GetHashCode() { 126 int hash = 1; 127 if (ReqSize != 0) hash ^= ReqSize.GetHashCode(); 128 if (RespSize != 0) hash ^= RespSize.GetHashCode(); 129 if (_unknownFields != null) { 130 hash ^= _unknownFields.GetHashCode(); 131 } 132 return hash; 133 } 134 135 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()136 public override string ToString() { 137 return pb::JsonFormatter.ToDiagnosticString(this); 138 } 139 140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)141 public void WriteTo(pb::CodedOutputStream output) { 142 if (ReqSize != 0) { 143 output.WriteRawTag(8); 144 output.WriteInt32(ReqSize); 145 } 146 if (RespSize != 0) { 147 output.WriteRawTag(16); 148 output.WriteInt32(RespSize); 149 } 150 if (_unknownFields != null) { 151 _unknownFields.WriteTo(output); 152 } 153 } 154 155 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()156 public int CalculateSize() { 157 int size = 0; 158 if (ReqSize != 0) { 159 size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize); 160 } 161 if (RespSize != 0) { 162 size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize); 163 } 164 if (_unknownFields != null) { 165 size += _unknownFields.CalculateSize(); 166 } 167 return size; 168 } 169 170 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(ByteBufferParams other)171 public void MergeFrom(ByteBufferParams other) { 172 if (other == null) { 173 return; 174 } 175 if (other.ReqSize != 0) { 176 ReqSize = other.ReqSize; 177 } 178 if (other.RespSize != 0) { 179 RespSize = other.RespSize; 180 } 181 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 182 } 183 184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)185 public void MergeFrom(pb::CodedInputStream input) { 186 uint tag; 187 while ((tag = input.ReadTag()) != 0) { 188 switch(tag) { 189 default: 190 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 191 break; 192 case 8: { 193 ReqSize = input.ReadInt32(); 194 break; 195 } 196 case 16: { 197 RespSize = input.ReadInt32(); 198 break; 199 } 200 } 201 } 202 } 203 204 } 205 206 public sealed partial class SimpleProtoParams : pb::IMessage<SimpleProtoParams> { 207 private static readonly pb::MessageParser<SimpleProtoParams> _parser = new pb::MessageParser<SimpleProtoParams>(() => new SimpleProtoParams()); 208 private pb::UnknownFieldSet _unknownFields; 209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 210 public static pb::MessageParser<SimpleProtoParams> Parser { get { return _parser; } } 211 212 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 213 public static pbr::MessageDescriptor Descriptor { 214 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[1]; } 215 } 216 217 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 218 pbr::MessageDescriptor pb::IMessage.Descriptor { 219 get { return Descriptor; } 220 } 221 222 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] SimpleProtoParams()223 public SimpleProtoParams() { 224 OnConstruction(); 225 } 226 OnConstruction()227 partial void OnConstruction(); 228 229 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] SimpleProtoParams(SimpleProtoParams other)230 public SimpleProtoParams(SimpleProtoParams other) : this() { 231 reqSize_ = other.reqSize_; 232 respSize_ = other.respSize_; 233 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 234 } 235 236 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()237 public SimpleProtoParams Clone() { 238 return new SimpleProtoParams(this); 239 } 240 241 /// <summary>Field number for the "req_size" field.</summary> 242 public const int ReqSizeFieldNumber = 1; 243 private int reqSize_; 244 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 245 public int ReqSize { 246 get { return reqSize_; } 247 set { 248 reqSize_ = value; 249 } 250 } 251 252 /// <summary>Field number for the "resp_size" field.</summary> 253 public const int RespSizeFieldNumber = 2; 254 private int respSize_; 255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 256 public int RespSize { 257 get { return respSize_; } 258 set { 259 respSize_ = value; 260 } 261 } 262 263 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)264 public override bool Equals(object other) { 265 return Equals(other as SimpleProtoParams); 266 } 267 268 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(SimpleProtoParams other)269 public bool Equals(SimpleProtoParams other) { 270 if (ReferenceEquals(other, null)) { 271 return false; 272 } 273 if (ReferenceEquals(other, this)) { 274 return true; 275 } 276 if (ReqSize != other.ReqSize) return false; 277 if (RespSize != other.RespSize) return false; 278 return Equals(_unknownFields, other._unknownFields); 279 } 280 281 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()282 public override int GetHashCode() { 283 int hash = 1; 284 if (ReqSize != 0) hash ^= ReqSize.GetHashCode(); 285 if (RespSize != 0) hash ^= RespSize.GetHashCode(); 286 if (_unknownFields != null) { 287 hash ^= _unknownFields.GetHashCode(); 288 } 289 return hash; 290 } 291 292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()293 public override string ToString() { 294 return pb::JsonFormatter.ToDiagnosticString(this); 295 } 296 297 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)298 public void WriteTo(pb::CodedOutputStream output) { 299 if (ReqSize != 0) { 300 output.WriteRawTag(8); 301 output.WriteInt32(ReqSize); 302 } 303 if (RespSize != 0) { 304 output.WriteRawTag(16); 305 output.WriteInt32(RespSize); 306 } 307 if (_unknownFields != null) { 308 _unknownFields.WriteTo(output); 309 } 310 } 311 312 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()313 public int CalculateSize() { 314 int size = 0; 315 if (ReqSize != 0) { 316 size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize); 317 } 318 if (RespSize != 0) { 319 size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize); 320 } 321 if (_unknownFields != null) { 322 size += _unknownFields.CalculateSize(); 323 } 324 return size; 325 } 326 327 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(SimpleProtoParams other)328 public void MergeFrom(SimpleProtoParams other) { 329 if (other == null) { 330 return; 331 } 332 if (other.ReqSize != 0) { 333 ReqSize = other.ReqSize; 334 } 335 if (other.RespSize != 0) { 336 RespSize = other.RespSize; 337 } 338 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 339 } 340 341 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)342 public void MergeFrom(pb::CodedInputStream input) { 343 uint tag; 344 while ((tag = input.ReadTag()) != 0) { 345 switch(tag) { 346 default: 347 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 348 break; 349 case 8: { 350 ReqSize = input.ReadInt32(); 351 break; 352 } 353 case 16: { 354 RespSize = input.ReadInt32(); 355 break; 356 } 357 } 358 } 359 } 360 361 } 362 363 /// <summary> 364 /// TODO (vpai): Fill this in once the details of complex, representative 365 /// protos are decided 366 /// </summary> 367 public sealed partial class ComplexProtoParams : pb::IMessage<ComplexProtoParams> { 368 private static readonly pb::MessageParser<ComplexProtoParams> _parser = new pb::MessageParser<ComplexProtoParams>(() => new ComplexProtoParams()); 369 private pb::UnknownFieldSet _unknownFields; 370 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 371 public static pb::MessageParser<ComplexProtoParams> Parser { get { return _parser; } } 372 373 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 374 public static pbr::MessageDescriptor Descriptor { 375 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[2]; } 376 } 377 378 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 379 pbr::MessageDescriptor pb::IMessage.Descriptor { 380 get { return Descriptor; } 381 } 382 383 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ComplexProtoParams()384 public ComplexProtoParams() { 385 OnConstruction(); 386 } 387 OnConstruction()388 partial void OnConstruction(); 389 390 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ComplexProtoParams(ComplexProtoParams other)391 public ComplexProtoParams(ComplexProtoParams other) : this() { 392 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 393 } 394 395 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()396 public ComplexProtoParams Clone() { 397 return new ComplexProtoParams(this); 398 } 399 400 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)401 public override bool Equals(object other) { 402 return Equals(other as ComplexProtoParams); 403 } 404 405 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(ComplexProtoParams other)406 public bool Equals(ComplexProtoParams other) { 407 if (ReferenceEquals(other, null)) { 408 return false; 409 } 410 if (ReferenceEquals(other, this)) { 411 return true; 412 } 413 return Equals(_unknownFields, other._unknownFields); 414 } 415 416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()417 public override int GetHashCode() { 418 int hash = 1; 419 if (_unknownFields != null) { 420 hash ^= _unknownFields.GetHashCode(); 421 } 422 return hash; 423 } 424 425 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()426 public override string ToString() { 427 return pb::JsonFormatter.ToDiagnosticString(this); 428 } 429 430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)431 public void WriteTo(pb::CodedOutputStream output) { 432 if (_unknownFields != null) { 433 _unknownFields.WriteTo(output); 434 } 435 } 436 437 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()438 public int CalculateSize() { 439 int size = 0; 440 if (_unknownFields != null) { 441 size += _unknownFields.CalculateSize(); 442 } 443 return size; 444 } 445 446 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(ComplexProtoParams other)447 public void MergeFrom(ComplexProtoParams other) { 448 if (other == null) { 449 return; 450 } 451 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 452 } 453 454 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)455 public void MergeFrom(pb::CodedInputStream input) { 456 uint tag; 457 while ((tag = input.ReadTag()) != 0) { 458 switch(tag) { 459 default: 460 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 461 break; 462 } 463 } 464 } 465 466 } 467 468 public sealed partial class PayloadConfig : pb::IMessage<PayloadConfig> { 469 private static readonly pb::MessageParser<PayloadConfig> _parser = new pb::MessageParser<PayloadConfig>(() => new PayloadConfig()); 470 private pb::UnknownFieldSet _unknownFields; 471 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 472 public static pb::MessageParser<PayloadConfig> Parser { get { return _parser; } } 473 474 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 475 public static pbr::MessageDescriptor Descriptor { 476 get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[3]; } 477 } 478 479 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 480 pbr::MessageDescriptor pb::IMessage.Descriptor { 481 get { return Descriptor; } 482 } 483 484 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] PayloadConfig()485 public PayloadConfig() { 486 OnConstruction(); 487 } 488 OnConstruction()489 partial void OnConstruction(); 490 491 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] PayloadConfig(PayloadConfig other)492 public PayloadConfig(PayloadConfig other) : this() { 493 switch (other.PayloadCase) { 494 case PayloadOneofCase.BytebufParams: 495 BytebufParams = other.BytebufParams.Clone(); 496 break; 497 case PayloadOneofCase.SimpleParams: 498 SimpleParams = other.SimpleParams.Clone(); 499 break; 500 case PayloadOneofCase.ComplexParams: 501 ComplexParams = other.ComplexParams.Clone(); 502 break; 503 } 504 505 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 506 } 507 508 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()509 public PayloadConfig Clone() { 510 return new PayloadConfig(this); 511 } 512 513 /// <summary>Field number for the "bytebuf_params" field.</summary> 514 public const int BytebufParamsFieldNumber = 1; 515 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 516 public global::Grpc.Testing.ByteBufferParams BytebufParams { 517 get { return payloadCase_ == PayloadOneofCase.BytebufParams ? (global::Grpc.Testing.ByteBufferParams) payload_ : null; } 518 set { 519 payload_ = value; 520 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.BytebufParams; 521 } 522 } 523 524 /// <summary>Field number for the "simple_params" field.</summary> 525 public const int SimpleParamsFieldNumber = 2; 526 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 527 public global::Grpc.Testing.SimpleProtoParams SimpleParams { 528 get { return payloadCase_ == PayloadOneofCase.SimpleParams ? (global::Grpc.Testing.SimpleProtoParams) payload_ : null; } 529 set { 530 payload_ = value; 531 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.SimpleParams; 532 } 533 } 534 535 /// <summary>Field number for the "complex_params" field.</summary> 536 public const int ComplexParamsFieldNumber = 3; 537 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 538 public global::Grpc.Testing.ComplexProtoParams ComplexParams { 539 get { return payloadCase_ == PayloadOneofCase.ComplexParams ? (global::Grpc.Testing.ComplexProtoParams) payload_ : null; } 540 set { 541 payload_ = value; 542 payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.ComplexParams; 543 } 544 } 545 546 private object payload_; 547 /// <summary>Enum of possible cases for the "payload" oneof.</summary> 548 public enum PayloadOneofCase { 549 None = 0, 550 BytebufParams = 1, 551 SimpleParams = 2, 552 ComplexParams = 3, 553 } 554 private PayloadOneofCase payloadCase_ = PayloadOneofCase.None; 555 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 556 public PayloadOneofCase PayloadCase { 557 get { return payloadCase_; } 558 } 559 560 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ClearPayload()561 public void ClearPayload() { 562 payloadCase_ = PayloadOneofCase.None; 563 payload_ = null; 564 } 565 566 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)567 public override bool Equals(object other) { 568 return Equals(other as PayloadConfig); 569 } 570 571 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(PayloadConfig other)572 public bool Equals(PayloadConfig other) { 573 if (ReferenceEquals(other, null)) { 574 return false; 575 } 576 if (ReferenceEquals(other, this)) { 577 return true; 578 } 579 if (!object.Equals(BytebufParams, other.BytebufParams)) return false; 580 if (!object.Equals(SimpleParams, other.SimpleParams)) return false; 581 if (!object.Equals(ComplexParams, other.ComplexParams)) return false; 582 if (PayloadCase != other.PayloadCase) return false; 583 return Equals(_unknownFields, other._unknownFields); 584 } 585 586 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()587 public override int GetHashCode() { 588 int hash = 1; 589 if (payloadCase_ == PayloadOneofCase.BytebufParams) hash ^= BytebufParams.GetHashCode(); 590 if (payloadCase_ == PayloadOneofCase.SimpleParams) hash ^= SimpleParams.GetHashCode(); 591 if (payloadCase_ == PayloadOneofCase.ComplexParams) hash ^= ComplexParams.GetHashCode(); 592 hash ^= (int) payloadCase_; 593 if (_unknownFields != null) { 594 hash ^= _unknownFields.GetHashCode(); 595 } 596 return hash; 597 } 598 599 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()600 public override string ToString() { 601 return pb::JsonFormatter.ToDiagnosticString(this); 602 } 603 604 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)605 public void WriteTo(pb::CodedOutputStream output) { 606 if (payloadCase_ == PayloadOneofCase.BytebufParams) { 607 output.WriteRawTag(10); 608 output.WriteMessage(BytebufParams); 609 } 610 if (payloadCase_ == PayloadOneofCase.SimpleParams) { 611 output.WriteRawTag(18); 612 output.WriteMessage(SimpleParams); 613 } 614 if (payloadCase_ == PayloadOneofCase.ComplexParams) { 615 output.WriteRawTag(26); 616 output.WriteMessage(ComplexParams); 617 } 618 if (_unknownFields != null) { 619 _unknownFields.WriteTo(output); 620 } 621 } 622 623 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()624 public int CalculateSize() { 625 int size = 0; 626 if (payloadCase_ == PayloadOneofCase.BytebufParams) { 627 size += 1 + pb::CodedOutputStream.ComputeMessageSize(BytebufParams); 628 } 629 if (payloadCase_ == PayloadOneofCase.SimpleParams) { 630 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SimpleParams); 631 } 632 if (payloadCase_ == PayloadOneofCase.ComplexParams) { 633 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ComplexParams); 634 } 635 if (_unknownFields != null) { 636 size += _unknownFields.CalculateSize(); 637 } 638 return size; 639 } 640 641 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(PayloadConfig other)642 public void MergeFrom(PayloadConfig other) { 643 if (other == null) { 644 return; 645 } 646 switch (other.PayloadCase) { 647 case PayloadOneofCase.BytebufParams: 648 if (BytebufParams == null) { 649 BytebufParams = new global::Grpc.Testing.ByteBufferParams(); 650 } 651 BytebufParams.MergeFrom(other.BytebufParams); 652 break; 653 case PayloadOneofCase.SimpleParams: 654 if (SimpleParams == null) { 655 SimpleParams = new global::Grpc.Testing.SimpleProtoParams(); 656 } 657 SimpleParams.MergeFrom(other.SimpleParams); 658 break; 659 case PayloadOneofCase.ComplexParams: 660 if (ComplexParams == null) { 661 ComplexParams = new global::Grpc.Testing.ComplexProtoParams(); 662 } 663 ComplexParams.MergeFrom(other.ComplexParams); 664 break; 665 } 666 667 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 668 } 669 670 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)671 public void MergeFrom(pb::CodedInputStream input) { 672 uint tag; 673 while ((tag = input.ReadTag()) != 0) { 674 switch(tag) { 675 default: 676 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 677 break; 678 case 10: { 679 global::Grpc.Testing.ByteBufferParams subBuilder = new global::Grpc.Testing.ByteBufferParams(); 680 if (payloadCase_ == PayloadOneofCase.BytebufParams) { 681 subBuilder.MergeFrom(BytebufParams); 682 } 683 input.ReadMessage(subBuilder); 684 BytebufParams = subBuilder; 685 break; 686 } 687 case 18: { 688 global::Grpc.Testing.SimpleProtoParams subBuilder = new global::Grpc.Testing.SimpleProtoParams(); 689 if (payloadCase_ == PayloadOneofCase.SimpleParams) { 690 subBuilder.MergeFrom(SimpleParams); 691 } 692 input.ReadMessage(subBuilder); 693 SimpleParams = subBuilder; 694 break; 695 } 696 case 26: { 697 global::Grpc.Testing.ComplexProtoParams subBuilder = new global::Grpc.Testing.ComplexProtoParams(); 698 if (payloadCase_ == PayloadOneofCase.ComplexParams) { 699 subBuilder.MergeFrom(ComplexParams); 700 } 701 input.ReadMessage(subBuilder); 702 ComplexParams = subBuilder; 703 break; 704 } 705 } 706 } 707 } 708 709 } 710 711 #endregion 712 713 } 714 715 #endregion Designer generated code 716