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