1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: conformance.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 Conformance { 13 14 /// <summary>Holder for reflection information generated from conformance.proto</summary> 15 public static partial class ConformanceReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for conformance.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 ConformanceReflection()24 static ConformanceReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UiHQoKRmFpbHVyZVNl", 28 "dBIPCgdmYWlsdXJlGAEgAygJIuMCChJDb25mb3JtYW5jZVJlcXVlc3QSGgoQ", 29 "cHJvdG9idWZfcGF5bG9hZBgBIAEoDEgAEhYKDGpzb25fcGF5bG9hZBgCIAEo", 30 "CUgAEhYKDGpzcGJfcGF5bG9hZBgHIAEoCUgAEhYKDHRleHRfcGF5bG9hZBgI", 31 "IAEoCUgAEjgKF3JlcXVlc3RlZF9vdXRwdXRfZm9ybWF0GAMgASgOMhcuY29u", 32 "Zm9ybWFuY2UuV2lyZUZvcm1hdBIUCgxtZXNzYWdlX3R5cGUYBCABKAkSMAoN", 33 "dGVzdF9jYXRlZ29yeRgFIAEoDjIZLmNvbmZvcm1hbmNlLlRlc3RDYXRlZ29y", 34 "eRI+ChVqc3BiX2VuY29kaW5nX29wdGlvbnMYBiABKAsyHy5jb25mb3JtYW5j", 35 "ZS5Kc3BiRW5jb2RpbmdDb25maWcSHAoUcHJpbnRfdW5rbm93bl9maWVsZHMY", 36 "CSABKAhCCQoHcGF5bG9hZCLhAQoTQ29uZm9ybWFuY2VSZXNwb25zZRIVCgtw", 37 "YXJzZV9lcnJvchgBIAEoCUgAEhkKD3NlcmlhbGl6ZV9lcnJvchgGIAEoCUgA", 38 "EhcKDXJ1bnRpbWVfZXJyb3IYAiABKAlIABIaChBwcm90b2J1Zl9wYXlsb2Fk", 39 "GAMgASgMSAASFgoManNvbl9wYXlsb2FkGAQgASgJSAASEQoHc2tpcHBlZBgF", 40 "IAEoCUgAEhYKDGpzcGJfcGF5bG9hZBgHIAEoCUgAEhYKDHRleHRfcGF5bG9h", 41 "ZBgIIAEoCUgAQggKBnJlc3VsdCI3ChJKc3BiRW5jb2RpbmdDb25maWcSIQoZ", 42 "dXNlX2pzcGJfYXJyYXlfYW55X2Zvcm1hdBgBIAEoCCpQCgpXaXJlRm9ybWF0", 43 "Eg8KC1VOU1BFQ0lGSUVEEAASDAoIUFJPVE9CVUYQARIICgRKU09OEAISCAoE", 44 "SlNQQhADEg8KC1RFWFRfRk9STUFUEAQqjwEKDFRlc3RDYXRlZ29yeRIUChBV", 45 "TlNQRUNJRklFRF9URVNUEAASDwoLQklOQVJZX1RFU1QQARINCglKU09OX1RF", 46 "U1QQAhIkCiBKU09OX0lHTk9SRV9VTktOT1dOX1BBUlNJTkdfVEVTVBADEg0K", 47 "CUpTUEJfVEVTVBAEEhQKEFRFWFRfRk9STUFUX1RFU1QQBUIhCh9jb20uZ29v", 48 "Z2xlLnByb3RvYnVmLmNvbmZvcm1hbmNlYgZwcm90bzM=")); 49 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 50 new pbr::FileDescriptor[] { }, 51 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.TestCategory), }, null, new pbr::GeneratedClrTypeInfo[] { 52 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.FailureSet), global::Conformance.FailureSet.Parser, new[]{ "Failure" }, null, null, null, null), 53 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceRequest), global::Conformance.ConformanceRequest.Parser, new[]{ "ProtobufPayload", "JsonPayload", "JspbPayload", "TextPayload", "RequestedOutputFormat", "MessageType", "TestCategory", "JspbEncodingOptions", "PrintUnknownFields" }, new[]{ "Payload" }, null, null, null), 54 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped", "JspbPayload", "TextPayload" }, new[]{ "Result" }, null, null, null), 55 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.JspbEncodingConfig), global::Conformance.JspbEncodingConfig.Parser, new[]{ "UseJspbArrayAnyFormat" }, null, null, null, null) 56 })); 57 } 58 #endregion 59 60 } 61 #region Enums 62 public enum WireFormat { 63 [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0, 64 [pbr::OriginalName("PROTOBUF")] Protobuf = 1, 65 [pbr::OriginalName("JSON")] Json = 2, 66 /// <summary> 67 /// Google internal only. Opensource testees just skip it. 68 /// </summary> 69 [pbr::OriginalName("JSPB")] Jspb = 3, 70 [pbr::OriginalName("TEXT_FORMAT")] TextFormat = 4, 71 } 72 73 public enum TestCategory { 74 [pbr::OriginalName("UNSPECIFIED_TEST")] UnspecifiedTest = 0, 75 /// <summary> 76 /// Test binary wire format. 77 /// </summary> 78 [pbr::OriginalName("BINARY_TEST")] BinaryTest = 1, 79 /// <summary> 80 /// Test json wire format. 81 /// </summary> 82 [pbr::OriginalName("JSON_TEST")] JsonTest = 2, 83 /// <summary> 84 /// Similar to JSON_TEST. However, during parsing json, testee should ignore 85 /// unknown fields. This feature is optional. Each implementation can descide 86 /// whether to support it. See 87 /// https://developers.google.com/protocol-buffers/docs/proto3#json_options 88 /// for more detail. 89 /// </summary> 90 [pbr::OriginalName("JSON_IGNORE_UNKNOWN_PARSING_TEST")] JsonIgnoreUnknownParsingTest = 3, 91 /// <summary> 92 /// Test jspb wire format. Google internal only. Opensource testees just skip it. 93 /// </summary> 94 [pbr::OriginalName("JSPB_TEST")] JspbTest = 4, 95 /// <summary> 96 /// Test text format. For cpp, java and python, testees can already deal with 97 /// this type. Testees of other languages can simply skip it. 98 /// </summary> 99 [pbr::OriginalName("TEXT_FORMAT_TEST")] TextFormatTest = 5, 100 } 101 102 #endregion 103 104 #region Messages 105 /// <summary> 106 /// The conformance runner will request a list of failures as the first request. 107 /// This will be known by message_type == "conformance.FailureSet", a conformance 108 /// test should return a serialized FailureSet in protobuf_payload. 109 /// </summary> 110 public sealed partial class FailureSet : pb::IMessage<FailureSet> 111 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 112 , pb::IBufferMessage 113 #endif 114 { 115 private static readonly pb::MessageParser<FailureSet> _parser = new pb::MessageParser<FailureSet>(() => new FailureSet()); 116 private pb::UnknownFieldSet _unknownFields; 117 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 118 public static pb::MessageParser<FailureSet> Parser { get { return _parser; } } 119 120 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 121 public static pbr::MessageDescriptor Descriptor { 122 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[0]; } 123 } 124 125 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 126 pbr::MessageDescriptor pb::IMessage.Descriptor { 127 get { return Descriptor; } 128 } 129 130 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] FailureSet()131 public FailureSet() { 132 OnConstruction(); 133 } 134 OnConstruction()135 partial void OnConstruction(); 136 137 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] FailureSet(FailureSet other)138 public FailureSet(FailureSet other) : this() { 139 failure_ = other.failure_.Clone(); 140 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 141 } 142 143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()144 public FailureSet Clone() { 145 return new FailureSet(this); 146 } 147 148 /// <summary>Field number for the "failure" field.</summary> 149 public const int FailureFieldNumber = 1; 150 private static readonly pb::FieldCodec<string> _repeated_failure_codec 151 = pb::FieldCodec.ForString(10); 152 private readonly pbc::RepeatedField<string> failure_ = new pbc::RepeatedField<string>(); 153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 154 public pbc::RepeatedField<string> Failure { 155 get { return failure_; } 156 } 157 158 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)159 public override bool Equals(object other) { 160 return Equals(other as FailureSet); 161 } 162 163 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(FailureSet other)164 public bool Equals(FailureSet other) { 165 if (ReferenceEquals(other, null)) { 166 return false; 167 } 168 if (ReferenceEquals(other, this)) { 169 return true; 170 } 171 if(!failure_.Equals(other.failure_)) return false; 172 return Equals(_unknownFields, other._unknownFields); 173 } 174 175 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()176 public override int GetHashCode() { 177 int hash = 1; 178 hash ^= failure_.GetHashCode(); 179 if (_unknownFields != null) { 180 hash ^= _unknownFields.GetHashCode(); 181 } 182 return hash; 183 } 184 185 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()186 public override string ToString() { 187 return pb::JsonFormatter.ToDiagnosticString(this); 188 } 189 190 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)191 public void WriteTo(pb::CodedOutputStream output) { 192 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 193 output.WriteRawMessage(this); 194 #else 195 failure_.WriteTo(output, _repeated_failure_codec); 196 if (_unknownFields != null) { 197 _unknownFields.WriteTo(output); 198 } 199 #endif 200 } 201 202 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 203 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)204 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 205 failure_.WriteTo(ref output, _repeated_failure_codec); 206 if (_unknownFields != null) { 207 _unknownFields.WriteTo(ref output); 208 } 209 } 210 #endif 211 212 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()213 public int CalculateSize() { 214 int size = 0; 215 size += failure_.CalculateSize(_repeated_failure_codec); 216 if (_unknownFields != null) { 217 size += _unknownFields.CalculateSize(); 218 } 219 return size; 220 } 221 222 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(FailureSet other)223 public void MergeFrom(FailureSet other) { 224 if (other == null) { 225 return; 226 } 227 failure_.Add(other.failure_); 228 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 229 } 230 231 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)232 public void MergeFrom(pb::CodedInputStream input) { 233 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 234 input.ReadRawMessage(this); 235 #else 236 uint tag; 237 while ((tag = input.ReadTag()) != 0) { 238 switch(tag) { 239 default: 240 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 241 break; 242 case 10: { 243 failure_.AddEntriesFrom(input, _repeated_failure_codec); 244 break; 245 } 246 } 247 } 248 #endif 249 } 250 251 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 252 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)253 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 254 uint tag; 255 while ((tag = input.ReadTag()) != 0) { 256 switch(tag) { 257 default: 258 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 259 break; 260 case 10: { 261 failure_.AddEntriesFrom(ref input, _repeated_failure_codec); 262 break; 263 } 264 } 265 } 266 } 267 #endif 268 269 } 270 271 /// <summary> 272 /// Represents a single test case's input. The testee should: 273 /// 274 /// 1. parse this proto (which should always succeed) 275 /// 2. parse the protobuf or JSON payload in "payload" (which may fail) 276 /// 3. if the parse succeeded, serialize the message in the requested format. 277 /// </summary> 278 public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> 279 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 280 , pb::IBufferMessage 281 #endif 282 { 283 private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest()); 284 private pb::UnknownFieldSet _unknownFields; 285 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 286 public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } } 287 288 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 289 public static pbr::MessageDescriptor Descriptor { 290 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[1]; } 291 } 292 293 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 294 pbr::MessageDescriptor pb::IMessage.Descriptor { 295 get { return Descriptor; } 296 } 297 298 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ConformanceRequest()299 public ConformanceRequest() { 300 OnConstruction(); 301 } 302 OnConstruction()303 partial void OnConstruction(); 304 305 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ConformanceRequest(ConformanceRequest other)306 public ConformanceRequest(ConformanceRequest other) : this() { 307 requestedOutputFormat_ = other.requestedOutputFormat_; 308 messageType_ = other.messageType_; 309 testCategory_ = other.testCategory_; 310 jspbEncodingOptions_ = other.jspbEncodingOptions_ != null ? other.jspbEncodingOptions_.Clone() : null; 311 printUnknownFields_ = other.printUnknownFields_; 312 switch (other.PayloadCase) { 313 case PayloadOneofCase.ProtobufPayload: 314 ProtobufPayload = other.ProtobufPayload; 315 break; 316 case PayloadOneofCase.JsonPayload: 317 JsonPayload = other.JsonPayload; 318 break; 319 case PayloadOneofCase.JspbPayload: 320 JspbPayload = other.JspbPayload; 321 break; 322 case PayloadOneofCase.TextPayload: 323 TextPayload = other.TextPayload; 324 break; 325 } 326 327 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 328 } 329 330 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()331 public ConformanceRequest Clone() { 332 return new ConformanceRequest(this); 333 } 334 335 /// <summary>Field number for the "protobuf_payload" field.</summary> 336 public const int ProtobufPayloadFieldNumber = 1; 337 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 338 public pb::ByteString ProtobufPayload { 339 get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; } 340 set { 341 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 342 payloadCase_ = PayloadOneofCase.ProtobufPayload; 343 } 344 } 345 346 /// <summary>Field number for the "json_payload" field.</summary> 347 public const int JsonPayloadFieldNumber = 2; 348 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 349 public string JsonPayload { 350 get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; } 351 set { 352 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 353 payloadCase_ = PayloadOneofCase.JsonPayload; 354 } 355 } 356 357 /// <summary>Field number for the "jspb_payload" field.</summary> 358 public const int JspbPayloadFieldNumber = 7; 359 /// <summary> 360 /// Google internal only. Opensource testees just skip it. 361 /// </summary> 362 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 363 public string JspbPayload { 364 get { return payloadCase_ == PayloadOneofCase.JspbPayload ? (string) payload_ : ""; } 365 set { 366 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 367 payloadCase_ = PayloadOneofCase.JspbPayload; 368 } 369 } 370 371 /// <summary>Field number for the "text_payload" field.</summary> 372 public const int TextPayloadFieldNumber = 8; 373 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 374 public string TextPayload { 375 get { return payloadCase_ == PayloadOneofCase.TextPayload ? (string) payload_ : ""; } 376 set { 377 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 378 payloadCase_ = PayloadOneofCase.TextPayload; 379 } 380 } 381 382 /// <summary>Field number for the "requested_output_format" field.</summary> 383 public const int RequestedOutputFormatFieldNumber = 3; 384 private global::Conformance.WireFormat requestedOutputFormat_ = global::Conformance.WireFormat.Unspecified; 385 /// <summary> 386 /// Which format should the testee serialize its message to? 387 /// </summary> 388 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 389 public global::Conformance.WireFormat RequestedOutputFormat { 390 get { return requestedOutputFormat_; } 391 set { 392 requestedOutputFormat_ = value; 393 } 394 } 395 396 /// <summary>Field number for the "message_type" field.</summary> 397 public const int MessageTypeFieldNumber = 4; 398 private string messageType_ = ""; 399 /// <summary> 400 /// The full name for the test message to use; for the moment, either: 401 /// protobuf_test_messages.proto3.TestAllTypesProto3 or 402 /// protobuf_test_messages.proto2.TestAllTypesProto2. 403 /// </summary> 404 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 405 public string MessageType { 406 get { return messageType_; } 407 set { 408 messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 409 } 410 } 411 412 /// <summary>Field number for the "test_category" field.</summary> 413 public const int TestCategoryFieldNumber = 5; 414 private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest; 415 /// <summary> 416 /// Each test is given a specific test category. Some category may need 417 /// spedific support in testee programs. Refer to the definition of TestCategory 418 /// for more information. 419 /// </summary> 420 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 421 public global::Conformance.TestCategory TestCategory { 422 get { return testCategory_; } 423 set { 424 testCategory_ = value; 425 } 426 } 427 428 /// <summary>Field number for the "jspb_encoding_options" field.</summary> 429 public const int JspbEncodingOptionsFieldNumber = 6; 430 private global::Conformance.JspbEncodingConfig jspbEncodingOptions_; 431 /// <summary> 432 /// Specify details for how to encode jspb. 433 /// </summary> 434 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 435 public global::Conformance.JspbEncodingConfig JspbEncodingOptions { 436 get { return jspbEncodingOptions_; } 437 set { 438 jspbEncodingOptions_ = value; 439 } 440 } 441 442 /// <summary>Field number for the "print_unknown_fields" field.</summary> 443 public const int PrintUnknownFieldsFieldNumber = 9; 444 private bool printUnknownFields_; 445 /// <summary> 446 /// This can be used in json and text format. If true, testee should print 447 /// unknown fields instead of ignore. This feature is optional. 448 /// </summary> 449 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 450 public bool PrintUnknownFields { 451 get { return printUnknownFields_; } 452 set { 453 printUnknownFields_ = value; 454 } 455 } 456 457 private object payload_; 458 /// <summary>Enum of possible cases for the "payload" oneof.</summary> 459 public enum PayloadOneofCase { 460 None = 0, 461 ProtobufPayload = 1, 462 JsonPayload = 2, 463 JspbPayload = 7, 464 TextPayload = 8, 465 } 466 private PayloadOneofCase payloadCase_ = PayloadOneofCase.None; 467 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 468 public PayloadOneofCase PayloadCase { 469 get { return payloadCase_; } 470 } 471 472 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ClearPayload()473 public void ClearPayload() { 474 payloadCase_ = PayloadOneofCase.None; 475 payload_ = null; 476 } 477 478 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)479 public override bool Equals(object other) { 480 return Equals(other as ConformanceRequest); 481 } 482 483 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(ConformanceRequest other)484 public bool Equals(ConformanceRequest other) { 485 if (ReferenceEquals(other, null)) { 486 return false; 487 } 488 if (ReferenceEquals(other, this)) { 489 return true; 490 } 491 if (ProtobufPayload != other.ProtobufPayload) return false; 492 if (JsonPayload != other.JsonPayload) return false; 493 if (JspbPayload != other.JspbPayload) return false; 494 if (TextPayload != other.TextPayload) return false; 495 if (RequestedOutputFormat != other.RequestedOutputFormat) return false; 496 if (MessageType != other.MessageType) return false; 497 if (TestCategory != other.TestCategory) return false; 498 if (!object.Equals(JspbEncodingOptions, other.JspbEncodingOptions)) return false; 499 if (PrintUnknownFields != other.PrintUnknownFields) return false; 500 if (PayloadCase != other.PayloadCase) return false; 501 return Equals(_unknownFields, other._unknownFields); 502 } 503 504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()505 public override int GetHashCode() { 506 int hash = 1; 507 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); 508 if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); 509 if (payloadCase_ == PayloadOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode(); 510 if (payloadCase_ == PayloadOneofCase.TextPayload) hash ^= TextPayload.GetHashCode(); 511 if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) hash ^= RequestedOutputFormat.GetHashCode(); 512 if (MessageType.Length != 0) hash ^= MessageType.GetHashCode(); 513 if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) hash ^= TestCategory.GetHashCode(); 514 if (jspbEncodingOptions_ != null) hash ^= JspbEncodingOptions.GetHashCode(); 515 if (PrintUnknownFields != false) hash ^= PrintUnknownFields.GetHashCode(); 516 hash ^= (int) payloadCase_; 517 if (_unknownFields != null) { 518 hash ^= _unknownFields.GetHashCode(); 519 } 520 return hash; 521 } 522 523 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()524 public override string ToString() { 525 return pb::JsonFormatter.ToDiagnosticString(this); 526 } 527 528 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)529 public void WriteTo(pb::CodedOutputStream output) { 530 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 531 output.WriteRawMessage(this); 532 #else 533 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) { 534 output.WriteRawTag(10); 535 output.WriteBytes(ProtobufPayload); 536 } 537 if (payloadCase_ == PayloadOneofCase.JsonPayload) { 538 output.WriteRawTag(18); 539 output.WriteString(JsonPayload); 540 } 541 if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) { 542 output.WriteRawTag(24); 543 output.WriteEnum((int) RequestedOutputFormat); 544 } 545 if (MessageType.Length != 0) { 546 output.WriteRawTag(34); 547 output.WriteString(MessageType); 548 } 549 if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) { 550 output.WriteRawTag(40); 551 output.WriteEnum((int) TestCategory); 552 } 553 if (jspbEncodingOptions_ != null) { 554 output.WriteRawTag(50); 555 output.WriteMessage(JspbEncodingOptions); 556 } 557 if (payloadCase_ == PayloadOneofCase.JspbPayload) { 558 output.WriteRawTag(58); 559 output.WriteString(JspbPayload); 560 } 561 if (payloadCase_ == PayloadOneofCase.TextPayload) { 562 output.WriteRawTag(66); 563 output.WriteString(TextPayload); 564 } 565 if (PrintUnknownFields != false) { 566 output.WriteRawTag(72); 567 output.WriteBool(PrintUnknownFields); 568 } 569 if (_unknownFields != null) { 570 _unknownFields.WriteTo(output); 571 } 572 #endif 573 } 574 575 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 576 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)577 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 578 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) { 579 output.WriteRawTag(10); 580 output.WriteBytes(ProtobufPayload); 581 } 582 if (payloadCase_ == PayloadOneofCase.JsonPayload) { 583 output.WriteRawTag(18); 584 output.WriteString(JsonPayload); 585 } 586 if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) { 587 output.WriteRawTag(24); 588 output.WriteEnum((int) RequestedOutputFormat); 589 } 590 if (MessageType.Length != 0) { 591 output.WriteRawTag(34); 592 output.WriteString(MessageType); 593 } 594 if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) { 595 output.WriteRawTag(40); 596 output.WriteEnum((int) TestCategory); 597 } 598 if (jspbEncodingOptions_ != null) { 599 output.WriteRawTag(50); 600 output.WriteMessage(JspbEncodingOptions); 601 } 602 if (payloadCase_ == PayloadOneofCase.JspbPayload) { 603 output.WriteRawTag(58); 604 output.WriteString(JspbPayload); 605 } 606 if (payloadCase_ == PayloadOneofCase.TextPayload) { 607 output.WriteRawTag(66); 608 output.WriteString(TextPayload); 609 } 610 if (PrintUnknownFields != false) { 611 output.WriteRawTag(72); 612 output.WriteBool(PrintUnknownFields); 613 } 614 if (_unknownFields != null) { 615 _unknownFields.WriteTo(ref output); 616 } 617 } 618 #endif 619 620 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()621 public int CalculateSize() { 622 int size = 0; 623 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) { 624 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload); 625 } 626 if (payloadCase_ == PayloadOneofCase.JsonPayload) { 627 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload); 628 } 629 if (payloadCase_ == PayloadOneofCase.JspbPayload) { 630 size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload); 631 } 632 if (payloadCase_ == PayloadOneofCase.TextPayload) { 633 size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload); 634 } 635 if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) { 636 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat); 637 } 638 if (MessageType.Length != 0) { 639 size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType); 640 } 641 if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) { 642 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TestCategory); 643 } 644 if (jspbEncodingOptions_ != null) { 645 size += 1 + pb::CodedOutputStream.ComputeMessageSize(JspbEncodingOptions); 646 } 647 if (PrintUnknownFields != false) { 648 size += 1 + 1; 649 } 650 if (_unknownFields != null) { 651 size += _unknownFields.CalculateSize(); 652 } 653 return size; 654 } 655 656 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(ConformanceRequest other)657 public void MergeFrom(ConformanceRequest other) { 658 if (other == null) { 659 return; 660 } 661 if (other.RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) { 662 RequestedOutputFormat = other.RequestedOutputFormat; 663 } 664 if (other.MessageType.Length != 0) { 665 MessageType = other.MessageType; 666 } 667 if (other.TestCategory != global::Conformance.TestCategory.UnspecifiedTest) { 668 TestCategory = other.TestCategory; 669 } 670 if (other.jspbEncodingOptions_ != null) { 671 if (jspbEncodingOptions_ == null) { 672 JspbEncodingOptions = new global::Conformance.JspbEncodingConfig(); 673 } 674 JspbEncodingOptions.MergeFrom(other.JspbEncodingOptions); 675 } 676 if (other.PrintUnknownFields != false) { 677 PrintUnknownFields = other.PrintUnknownFields; 678 } 679 switch (other.PayloadCase) { 680 case PayloadOneofCase.ProtobufPayload: 681 ProtobufPayload = other.ProtobufPayload; 682 break; 683 case PayloadOneofCase.JsonPayload: 684 JsonPayload = other.JsonPayload; 685 break; 686 case PayloadOneofCase.JspbPayload: 687 JspbPayload = other.JspbPayload; 688 break; 689 case PayloadOneofCase.TextPayload: 690 TextPayload = other.TextPayload; 691 break; 692 } 693 694 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 695 } 696 697 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)698 public void MergeFrom(pb::CodedInputStream input) { 699 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 700 input.ReadRawMessage(this); 701 #else 702 uint tag; 703 while ((tag = input.ReadTag()) != 0) { 704 switch(tag) { 705 default: 706 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 707 break; 708 case 10: { 709 ProtobufPayload = input.ReadBytes(); 710 break; 711 } 712 case 18: { 713 JsonPayload = input.ReadString(); 714 break; 715 } 716 case 24: { 717 RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum(); 718 break; 719 } 720 case 34: { 721 MessageType = input.ReadString(); 722 break; 723 } 724 case 40: { 725 TestCategory = (global::Conformance.TestCategory) input.ReadEnum(); 726 break; 727 } 728 case 50: { 729 if (jspbEncodingOptions_ == null) { 730 JspbEncodingOptions = new global::Conformance.JspbEncodingConfig(); 731 } 732 input.ReadMessage(JspbEncodingOptions); 733 break; 734 } 735 case 58: { 736 JspbPayload = input.ReadString(); 737 break; 738 } 739 case 66: { 740 TextPayload = input.ReadString(); 741 break; 742 } 743 case 72: { 744 PrintUnknownFields = input.ReadBool(); 745 break; 746 } 747 } 748 } 749 #endif 750 } 751 752 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 753 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)754 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 755 uint tag; 756 while ((tag = input.ReadTag()) != 0) { 757 switch(tag) { 758 default: 759 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 760 break; 761 case 10: { 762 ProtobufPayload = input.ReadBytes(); 763 break; 764 } 765 case 18: { 766 JsonPayload = input.ReadString(); 767 break; 768 } 769 case 24: { 770 RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum(); 771 break; 772 } 773 case 34: { 774 MessageType = input.ReadString(); 775 break; 776 } 777 case 40: { 778 TestCategory = (global::Conformance.TestCategory) input.ReadEnum(); 779 break; 780 } 781 case 50: { 782 if (jspbEncodingOptions_ == null) { 783 JspbEncodingOptions = new global::Conformance.JspbEncodingConfig(); 784 } 785 input.ReadMessage(JspbEncodingOptions); 786 break; 787 } 788 case 58: { 789 JspbPayload = input.ReadString(); 790 break; 791 } 792 case 66: { 793 TextPayload = input.ReadString(); 794 break; 795 } 796 case 72: { 797 PrintUnknownFields = input.ReadBool(); 798 break; 799 } 800 } 801 } 802 } 803 #endif 804 805 } 806 807 /// <summary> 808 /// Represents a single test case's output. 809 /// </summary> 810 public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> 811 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 812 , pb::IBufferMessage 813 #endif 814 { 815 private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse()); 816 private pb::UnknownFieldSet _unknownFields; 817 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 818 public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } } 819 820 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 821 public static pbr::MessageDescriptor Descriptor { 822 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[2]; } 823 } 824 825 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 826 pbr::MessageDescriptor pb::IMessage.Descriptor { 827 get { return Descriptor; } 828 } 829 830 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ConformanceResponse()831 public ConformanceResponse() { 832 OnConstruction(); 833 } 834 OnConstruction()835 partial void OnConstruction(); 836 837 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ConformanceResponse(ConformanceResponse other)838 public ConformanceResponse(ConformanceResponse other) : this() { 839 switch (other.ResultCase) { 840 case ResultOneofCase.ParseError: 841 ParseError = other.ParseError; 842 break; 843 case ResultOneofCase.SerializeError: 844 SerializeError = other.SerializeError; 845 break; 846 case ResultOneofCase.RuntimeError: 847 RuntimeError = other.RuntimeError; 848 break; 849 case ResultOneofCase.ProtobufPayload: 850 ProtobufPayload = other.ProtobufPayload; 851 break; 852 case ResultOneofCase.JsonPayload: 853 JsonPayload = other.JsonPayload; 854 break; 855 case ResultOneofCase.Skipped: 856 Skipped = other.Skipped; 857 break; 858 case ResultOneofCase.JspbPayload: 859 JspbPayload = other.JspbPayload; 860 break; 861 case ResultOneofCase.TextPayload: 862 TextPayload = other.TextPayload; 863 break; 864 } 865 866 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 867 } 868 869 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()870 public ConformanceResponse Clone() { 871 return new ConformanceResponse(this); 872 } 873 874 /// <summary>Field number for the "parse_error" field.</summary> 875 public const int ParseErrorFieldNumber = 1; 876 /// <summary> 877 /// This string should be set to indicate parsing failed. The string can 878 /// provide more information about the parse error if it is available. 879 /// 880 /// Setting this string does not necessarily mean the testee failed the 881 /// test. Some of the test cases are intentionally invalid input. 882 /// </summary> 883 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 884 public string ParseError { 885 get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; } 886 set { 887 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 888 resultCase_ = ResultOneofCase.ParseError; 889 } 890 } 891 892 /// <summary>Field number for the "serialize_error" field.</summary> 893 public const int SerializeErrorFieldNumber = 6; 894 /// <summary> 895 /// If the input was successfully parsed but errors occurred when 896 /// serializing it to the requested output format, set the error message in 897 /// this field. 898 /// </summary> 899 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 900 public string SerializeError { 901 get { return resultCase_ == ResultOneofCase.SerializeError ? (string) result_ : ""; } 902 set { 903 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 904 resultCase_ = ResultOneofCase.SerializeError; 905 } 906 } 907 908 /// <summary>Field number for the "runtime_error" field.</summary> 909 public const int RuntimeErrorFieldNumber = 2; 910 /// <summary> 911 /// This should be set if some other error occurred. This will always 912 /// indicate that the test failed. The string can provide more information 913 /// about the failure. 914 /// </summary> 915 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 916 public string RuntimeError { 917 get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; } 918 set { 919 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 920 resultCase_ = ResultOneofCase.RuntimeError; 921 } 922 } 923 924 /// <summary>Field number for the "protobuf_payload" field.</summary> 925 public const int ProtobufPayloadFieldNumber = 3; 926 /// <summary> 927 /// If the input was successfully parsed and the requested output was 928 /// protobuf, serialize it to protobuf and set it in this field. 929 /// </summary> 930 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 931 public pb::ByteString ProtobufPayload { 932 get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; } 933 set { 934 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 935 resultCase_ = ResultOneofCase.ProtobufPayload; 936 } 937 } 938 939 /// <summary>Field number for the "json_payload" field.</summary> 940 public const int JsonPayloadFieldNumber = 4; 941 /// <summary> 942 /// If the input was successfully parsed and the requested output was JSON, 943 /// serialize to JSON and set it in this field. 944 /// </summary> 945 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 946 public string JsonPayload { 947 get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; } 948 set { 949 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 950 resultCase_ = ResultOneofCase.JsonPayload; 951 } 952 } 953 954 /// <summary>Field number for the "skipped" field.</summary> 955 public const int SkippedFieldNumber = 5; 956 /// <summary> 957 /// For when the testee skipped the test, likely because a certain feature 958 /// wasn't supported, like JSON input/output. 959 /// </summary> 960 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 961 public string Skipped { 962 get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; } 963 set { 964 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 965 resultCase_ = ResultOneofCase.Skipped; 966 } 967 } 968 969 /// <summary>Field number for the "jspb_payload" field.</summary> 970 public const int JspbPayloadFieldNumber = 7; 971 /// <summary> 972 /// If the input was successfully parsed and the requested output was JSPB, 973 /// serialize to JSPB and set it in this field. JSPB is google internal only 974 /// format. Opensource testees can just skip it. 975 /// </summary> 976 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 977 public string JspbPayload { 978 get { return resultCase_ == ResultOneofCase.JspbPayload ? (string) result_ : ""; } 979 set { 980 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 981 resultCase_ = ResultOneofCase.JspbPayload; 982 } 983 } 984 985 /// <summary>Field number for the "text_payload" field.</summary> 986 public const int TextPayloadFieldNumber = 8; 987 /// <summary> 988 /// If the input was successfully parsed and the requested output was 989 /// TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field. 990 /// </summary> 991 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 992 public string TextPayload { 993 get { return resultCase_ == ResultOneofCase.TextPayload ? (string) result_ : ""; } 994 set { 995 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 996 resultCase_ = ResultOneofCase.TextPayload; 997 } 998 } 999 1000 private object result_; 1001 /// <summary>Enum of possible cases for the "result" oneof.</summary> 1002 public enum ResultOneofCase { 1003 None = 0, 1004 ParseError = 1, 1005 SerializeError = 6, 1006 RuntimeError = 2, 1007 ProtobufPayload = 3, 1008 JsonPayload = 4, 1009 Skipped = 5, 1010 JspbPayload = 7, 1011 TextPayload = 8, 1012 } 1013 private ResultOneofCase resultCase_ = ResultOneofCase.None; 1014 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1015 public ResultOneofCase ResultCase { 1016 get { return resultCase_; } 1017 } 1018 1019 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ClearResult()1020 public void ClearResult() { 1021 resultCase_ = ResultOneofCase.None; 1022 result_ = null; 1023 } 1024 1025 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)1026 public override bool Equals(object other) { 1027 return Equals(other as ConformanceResponse); 1028 } 1029 1030 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(ConformanceResponse other)1031 public bool Equals(ConformanceResponse other) { 1032 if (ReferenceEquals(other, null)) { 1033 return false; 1034 } 1035 if (ReferenceEquals(other, this)) { 1036 return true; 1037 } 1038 if (ParseError != other.ParseError) return false; 1039 if (SerializeError != other.SerializeError) return false; 1040 if (RuntimeError != other.RuntimeError) return false; 1041 if (ProtobufPayload != other.ProtobufPayload) return false; 1042 if (JsonPayload != other.JsonPayload) return false; 1043 if (Skipped != other.Skipped) return false; 1044 if (JspbPayload != other.JspbPayload) return false; 1045 if (TextPayload != other.TextPayload) return false; 1046 if (ResultCase != other.ResultCase) return false; 1047 return Equals(_unknownFields, other._unknownFields); 1048 } 1049 1050 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()1051 public override int GetHashCode() { 1052 int hash = 1; 1053 if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode(); 1054 if (resultCase_ == ResultOneofCase.SerializeError) hash ^= SerializeError.GetHashCode(); 1055 if (resultCase_ == ResultOneofCase.RuntimeError) hash ^= RuntimeError.GetHashCode(); 1056 if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); 1057 if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); 1058 if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode(); 1059 if (resultCase_ == ResultOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode(); 1060 if (resultCase_ == ResultOneofCase.TextPayload) hash ^= TextPayload.GetHashCode(); 1061 hash ^= (int) resultCase_; 1062 if (_unknownFields != null) { 1063 hash ^= _unknownFields.GetHashCode(); 1064 } 1065 return hash; 1066 } 1067 1068 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()1069 public override string ToString() { 1070 return pb::JsonFormatter.ToDiagnosticString(this); 1071 } 1072 1073 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)1074 public void WriteTo(pb::CodedOutputStream output) { 1075 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1076 output.WriteRawMessage(this); 1077 #else 1078 if (resultCase_ == ResultOneofCase.ParseError) { 1079 output.WriteRawTag(10); 1080 output.WriteString(ParseError); 1081 } 1082 if (resultCase_ == ResultOneofCase.RuntimeError) { 1083 output.WriteRawTag(18); 1084 output.WriteString(RuntimeError); 1085 } 1086 if (resultCase_ == ResultOneofCase.ProtobufPayload) { 1087 output.WriteRawTag(26); 1088 output.WriteBytes(ProtobufPayload); 1089 } 1090 if (resultCase_ == ResultOneofCase.JsonPayload) { 1091 output.WriteRawTag(34); 1092 output.WriteString(JsonPayload); 1093 } 1094 if (resultCase_ == ResultOneofCase.Skipped) { 1095 output.WriteRawTag(42); 1096 output.WriteString(Skipped); 1097 } 1098 if (resultCase_ == ResultOneofCase.SerializeError) { 1099 output.WriteRawTag(50); 1100 output.WriteString(SerializeError); 1101 } 1102 if (resultCase_ == ResultOneofCase.JspbPayload) { 1103 output.WriteRawTag(58); 1104 output.WriteString(JspbPayload); 1105 } 1106 if (resultCase_ == ResultOneofCase.TextPayload) { 1107 output.WriteRawTag(66); 1108 output.WriteString(TextPayload); 1109 } 1110 if (_unknownFields != null) { 1111 _unknownFields.WriteTo(output); 1112 } 1113 #endif 1114 } 1115 1116 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1117 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1118 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1119 if (resultCase_ == ResultOneofCase.ParseError) { 1120 output.WriteRawTag(10); 1121 output.WriteString(ParseError); 1122 } 1123 if (resultCase_ == ResultOneofCase.RuntimeError) { 1124 output.WriteRawTag(18); 1125 output.WriteString(RuntimeError); 1126 } 1127 if (resultCase_ == ResultOneofCase.ProtobufPayload) { 1128 output.WriteRawTag(26); 1129 output.WriteBytes(ProtobufPayload); 1130 } 1131 if (resultCase_ == ResultOneofCase.JsonPayload) { 1132 output.WriteRawTag(34); 1133 output.WriteString(JsonPayload); 1134 } 1135 if (resultCase_ == ResultOneofCase.Skipped) { 1136 output.WriteRawTag(42); 1137 output.WriteString(Skipped); 1138 } 1139 if (resultCase_ == ResultOneofCase.SerializeError) { 1140 output.WriteRawTag(50); 1141 output.WriteString(SerializeError); 1142 } 1143 if (resultCase_ == ResultOneofCase.JspbPayload) { 1144 output.WriteRawTag(58); 1145 output.WriteString(JspbPayload); 1146 } 1147 if (resultCase_ == ResultOneofCase.TextPayload) { 1148 output.WriteRawTag(66); 1149 output.WriteString(TextPayload); 1150 } 1151 if (_unknownFields != null) { 1152 _unknownFields.WriteTo(ref output); 1153 } 1154 } 1155 #endif 1156 1157 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()1158 public int CalculateSize() { 1159 int size = 0; 1160 if (resultCase_ == ResultOneofCase.ParseError) { 1161 size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError); 1162 } 1163 if (resultCase_ == ResultOneofCase.SerializeError) { 1164 size += 1 + pb::CodedOutputStream.ComputeStringSize(SerializeError); 1165 } 1166 if (resultCase_ == ResultOneofCase.RuntimeError) { 1167 size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError); 1168 } 1169 if (resultCase_ == ResultOneofCase.ProtobufPayload) { 1170 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload); 1171 } 1172 if (resultCase_ == ResultOneofCase.JsonPayload) { 1173 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload); 1174 } 1175 if (resultCase_ == ResultOneofCase.Skipped) { 1176 size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped); 1177 } 1178 if (resultCase_ == ResultOneofCase.JspbPayload) { 1179 size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload); 1180 } 1181 if (resultCase_ == ResultOneofCase.TextPayload) { 1182 size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload); 1183 } 1184 if (_unknownFields != null) { 1185 size += _unknownFields.CalculateSize(); 1186 } 1187 return size; 1188 } 1189 1190 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(ConformanceResponse other)1191 public void MergeFrom(ConformanceResponse other) { 1192 if (other == null) { 1193 return; 1194 } 1195 switch (other.ResultCase) { 1196 case ResultOneofCase.ParseError: 1197 ParseError = other.ParseError; 1198 break; 1199 case ResultOneofCase.SerializeError: 1200 SerializeError = other.SerializeError; 1201 break; 1202 case ResultOneofCase.RuntimeError: 1203 RuntimeError = other.RuntimeError; 1204 break; 1205 case ResultOneofCase.ProtobufPayload: 1206 ProtobufPayload = other.ProtobufPayload; 1207 break; 1208 case ResultOneofCase.JsonPayload: 1209 JsonPayload = other.JsonPayload; 1210 break; 1211 case ResultOneofCase.Skipped: 1212 Skipped = other.Skipped; 1213 break; 1214 case ResultOneofCase.JspbPayload: 1215 JspbPayload = other.JspbPayload; 1216 break; 1217 case ResultOneofCase.TextPayload: 1218 TextPayload = other.TextPayload; 1219 break; 1220 } 1221 1222 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1223 } 1224 1225 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)1226 public void MergeFrom(pb::CodedInputStream input) { 1227 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1228 input.ReadRawMessage(this); 1229 #else 1230 uint tag; 1231 while ((tag = input.ReadTag()) != 0) { 1232 switch(tag) { 1233 default: 1234 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1235 break; 1236 case 10: { 1237 ParseError = input.ReadString(); 1238 break; 1239 } 1240 case 18: { 1241 RuntimeError = input.ReadString(); 1242 break; 1243 } 1244 case 26: { 1245 ProtobufPayload = input.ReadBytes(); 1246 break; 1247 } 1248 case 34: { 1249 JsonPayload = input.ReadString(); 1250 break; 1251 } 1252 case 42: { 1253 Skipped = input.ReadString(); 1254 break; 1255 } 1256 case 50: { 1257 SerializeError = input.ReadString(); 1258 break; 1259 } 1260 case 58: { 1261 JspbPayload = input.ReadString(); 1262 break; 1263 } 1264 case 66: { 1265 TextPayload = input.ReadString(); 1266 break; 1267 } 1268 } 1269 } 1270 #endif 1271 } 1272 1273 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1274 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1275 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1276 uint tag; 1277 while ((tag = input.ReadTag()) != 0) { 1278 switch(tag) { 1279 default: 1280 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1281 break; 1282 case 10: { 1283 ParseError = input.ReadString(); 1284 break; 1285 } 1286 case 18: { 1287 RuntimeError = input.ReadString(); 1288 break; 1289 } 1290 case 26: { 1291 ProtobufPayload = input.ReadBytes(); 1292 break; 1293 } 1294 case 34: { 1295 JsonPayload = input.ReadString(); 1296 break; 1297 } 1298 case 42: { 1299 Skipped = input.ReadString(); 1300 break; 1301 } 1302 case 50: { 1303 SerializeError = input.ReadString(); 1304 break; 1305 } 1306 case 58: { 1307 JspbPayload = input.ReadString(); 1308 break; 1309 } 1310 case 66: { 1311 TextPayload = input.ReadString(); 1312 break; 1313 } 1314 } 1315 } 1316 } 1317 #endif 1318 1319 } 1320 1321 /// <summary> 1322 /// Encoding options for jspb format. 1323 /// </summary> 1324 public sealed partial class JspbEncodingConfig : pb::IMessage<JspbEncodingConfig> 1325 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1326 , pb::IBufferMessage 1327 #endif 1328 { 1329 private static readonly pb::MessageParser<JspbEncodingConfig> _parser = new pb::MessageParser<JspbEncodingConfig>(() => new JspbEncodingConfig()); 1330 private pb::UnknownFieldSet _unknownFields; 1331 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1332 public static pb::MessageParser<JspbEncodingConfig> Parser { get { return _parser; } } 1333 1334 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1335 public static pbr::MessageDescriptor Descriptor { 1336 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[3]; } 1337 } 1338 1339 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1340 pbr::MessageDescriptor pb::IMessage.Descriptor { 1341 get { return Descriptor; } 1342 } 1343 1344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] JspbEncodingConfig()1345 public JspbEncodingConfig() { 1346 OnConstruction(); 1347 } 1348 OnConstruction()1349 partial void OnConstruction(); 1350 1351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] JspbEncodingConfig(JspbEncodingConfig other)1352 public JspbEncodingConfig(JspbEncodingConfig other) : this() { 1353 useJspbArrayAnyFormat_ = other.useJspbArrayAnyFormat_; 1354 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1355 } 1356 1357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()1358 public JspbEncodingConfig Clone() { 1359 return new JspbEncodingConfig(this); 1360 } 1361 1362 /// <summary>Field number for the "use_jspb_array_any_format" field.</summary> 1363 public const int UseJspbArrayAnyFormatFieldNumber = 1; 1364 private bool useJspbArrayAnyFormat_; 1365 /// <summary> 1366 /// Encode the value field of Any as jspb array if true, otherwise binary. 1367 /// </summary> 1368 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1369 public bool UseJspbArrayAnyFormat { 1370 get { return useJspbArrayAnyFormat_; } 1371 set { 1372 useJspbArrayAnyFormat_ = value; 1373 } 1374 } 1375 1376 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)1377 public override bool Equals(object other) { 1378 return Equals(other as JspbEncodingConfig); 1379 } 1380 1381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(JspbEncodingConfig other)1382 public bool Equals(JspbEncodingConfig other) { 1383 if (ReferenceEquals(other, null)) { 1384 return false; 1385 } 1386 if (ReferenceEquals(other, this)) { 1387 return true; 1388 } 1389 if (UseJspbArrayAnyFormat != other.UseJspbArrayAnyFormat) return false; 1390 return Equals(_unknownFields, other._unknownFields); 1391 } 1392 1393 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()1394 public override int GetHashCode() { 1395 int hash = 1; 1396 if (UseJspbArrayAnyFormat != false) hash ^= UseJspbArrayAnyFormat.GetHashCode(); 1397 if (_unknownFields != null) { 1398 hash ^= _unknownFields.GetHashCode(); 1399 } 1400 return hash; 1401 } 1402 1403 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()1404 public override string ToString() { 1405 return pb::JsonFormatter.ToDiagnosticString(this); 1406 } 1407 1408 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)1409 public void WriteTo(pb::CodedOutputStream output) { 1410 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1411 output.WriteRawMessage(this); 1412 #else 1413 if (UseJspbArrayAnyFormat != false) { 1414 output.WriteRawTag(8); 1415 output.WriteBool(UseJspbArrayAnyFormat); 1416 } 1417 if (_unknownFields != null) { 1418 _unknownFields.WriteTo(output); 1419 } 1420 #endif 1421 } 1422 1423 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1424 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1425 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1426 if (UseJspbArrayAnyFormat != false) { 1427 output.WriteRawTag(8); 1428 output.WriteBool(UseJspbArrayAnyFormat); 1429 } 1430 if (_unknownFields != null) { 1431 _unknownFields.WriteTo(ref output); 1432 } 1433 } 1434 #endif 1435 1436 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()1437 public int CalculateSize() { 1438 int size = 0; 1439 if (UseJspbArrayAnyFormat != false) { 1440 size += 1 + 1; 1441 } 1442 if (_unknownFields != null) { 1443 size += _unknownFields.CalculateSize(); 1444 } 1445 return size; 1446 } 1447 1448 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(JspbEncodingConfig other)1449 public void MergeFrom(JspbEncodingConfig other) { 1450 if (other == null) { 1451 return; 1452 } 1453 if (other.UseJspbArrayAnyFormat != false) { 1454 UseJspbArrayAnyFormat = other.UseJspbArrayAnyFormat; 1455 } 1456 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1457 } 1458 1459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)1460 public void MergeFrom(pb::CodedInputStream input) { 1461 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1462 input.ReadRawMessage(this); 1463 #else 1464 uint tag; 1465 while ((tag = input.ReadTag()) != 0) { 1466 switch(tag) { 1467 default: 1468 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1469 break; 1470 case 8: { 1471 UseJspbArrayAnyFormat = input.ReadBool(); 1472 break; 1473 } 1474 } 1475 } 1476 #endif 1477 } 1478 1479 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1480 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1481 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1482 uint tag; 1483 while ((tag = input.ReadTag()) != 0) { 1484 switch(tag) { 1485 default: 1486 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1487 break; 1488 case 8: { 1489 UseJspbArrayAnyFormat = input.ReadBool(); 1490 break; 1491 } 1492 } 1493 } 1494 } 1495 #endif 1496 1497 } 1498 1499 #endregion 1500 1501 } 1502 1503 #endregion Designer generated code 1504