Conformance.cs 36.1 KB
Newer Older
1 2 3 4
// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: conformance.proto
// </auto-generated>
5 6 7 8 9 10 11 12 13
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Conformance {

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 20 21 22 23
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

24
    static ConformanceReflection() {
25 26
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
27
            "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UirQIKEkNvbmZvcm1h",
28
            "bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv",
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
            "bl9wYXlsb2FkGAIgASgJSAASFgoManNwYl9wYXlsb2FkGAcgASgJSAASOAoX",
            "cmVxdWVzdGVkX291dHB1dF9mb3JtYXQYAyABKA4yFy5jb25mb3JtYW5jZS5X",
            "aXJlRm9ybWF0EhQKDG1lc3NhZ2VfdHlwZRgEIAEoCRIwCg10ZXN0X2NhdGVn",
            "b3J5GAUgASgOMhkuY29uZm9ybWFuY2UuVGVzdENhdGVnb3J5Ej4KFWpzcGJf",
            "ZW5jb2Rpbmdfb3B0aW9ucxgGIAEoCzIfLmNvbmZvcm1hbmNlLkpzcGJFbmNv",
            "ZGluZ0NvbmZpZ0IJCgdwYXlsb2FkIskBChNDb25mb3JtYW5jZVJlc3BvbnNl",
            "EhUKC3BhcnNlX2Vycm9yGAEgASgJSAASGQoPc2VyaWFsaXplX2Vycm9yGAYg",
            "ASgJSAASFwoNcnVudGltZV9lcnJvchgCIAEoCUgAEhoKEHByb3RvYnVmX3Bh",
            "eWxvYWQYAyABKAxIABIWCgxqc29uX3BheWxvYWQYBCABKAlIABIRCgdza2lw",
            "cGVkGAUgASgJSAASFgoManNwYl9wYXlsb2FkGAcgASgJSABCCAoGcmVzdWx0",
            "IjcKEkpzcGJFbmNvZGluZ0NvbmZpZxIhChl1c2VfanNwYl9hcnJheV9hbnlf",
            "Zm9ybWF0GAEgASgIKj8KCldpcmVGb3JtYXQSDwoLVU5TUEVDSUZJRUQQABIM",
            "CghQUk9UT0JVRhABEggKBEpTT04QAhIICgRKU1BCEAMqeQoMVGVzdENhdGVn",
            "b3J5EhQKEFVOU1BFQ0lGSUVEX1RFU1QQABIPCgtCSU5BUllfVEVTVBABEg0K",
            "CUpTT05fVEVTVBACEiQKIEpTT05fSUdOT1JFX1VOS05PV05fUEFSU0lOR19U",
            "RVNUEAMSDQoJSlNQQl9URVNUEARCIQofY29tLmdvb2dsZS5wcm90b2J1Zi5j",
            "b25mb3JtYW5jZWIGcHJvdG8z"));
46
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
47
          new pbr::FileDescriptor[] { },
48
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.TestCategory), }, new pbr::GeneratedClrTypeInfo[] {
49 50 51
            new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceRequest), global::Conformance.ConformanceRequest.Parser, new[]{ "ProtobufPayload", "JsonPayload", "JspbPayload", "RequestedOutputFormat", "MessageType", "TestCategory", "JspbEncodingOptions" }, new[]{ "Payload" }, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped", "JspbPayload" }, new[]{ "Result" }, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.JspbEncodingConfig), global::Conformance.JspbEncodingConfig.Parser, new[]{ "UseJspbArrayAnyFormat" }, null, null, null)
52 53 54 55 56 57 58
          }));
    }
    #endregion

  }
  #region Enums
  public enum WireFormat {
59 60 61
    [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
    [pbr::OriginalName("PROTOBUF")] Protobuf = 1,
    [pbr::OriginalName("JSON")] Json = 2,
62 63 64 65
    /// <summary>
    /// Google internal only. Opensource testees just skip it.
    /// </summary>
    [pbr::OriginalName("JSPB")] Jspb = 3,
66 67
  }

68
  public enum TestCategory {
69
    [pbr::OriginalName("UNSPECIFIED_TEST")] UnspecifiedTest = 0,
70 71 72
    /// <summary>
    /// Test binary wire format.
    /// </summary>
73
    [pbr::OriginalName("BINARY_TEST")] BinaryTest = 1,
74 75 76
    /// <summary>
    /// Test json wire format.
    /// </summary>
77
    [pbr::OriginalName("JSON_TEST")] JsonTest = 2,
78 79 80 81 82 83 84
    /// <summary>
    /// Similar to JSON_TEST. However, during parsing json, testee should ignore
    /// unknown fields. This feature is optional. Each implementation can descide
    /// whether to support it.  See
    /// https://developers.google.com/protocol-buffers/docs/proto3#json_options
    /// for more detail.
    /// </summary>
85
    [pbr::OriginalName("JSON_IGNORE_UNKNOWN_PARSING_TEST")] JsonIgnoreUnknownParsingTest = 3,
86 87 88 89
    /// <summary>
    /// Test jspb wire format. Google internal only.
    /// </summary>
    [pbr::OriginalName("JSPB_TEST")] JspbTest = 4,
90 91
  }

92 93 94
  #endregion

  #region Messages
95
  /// <summary>
96
  /// Represents a single test case's input.  The testee should:
97
  ///
98 99 100
  ///   1. parse this proto (which should always succeed)
  ///   2. parse the protobuf or JSON payload in "payload" (which may fail)
  ///   3. if the parse succeeded, serialize the message in the requested format.
101
  /// </summary>
102 103
  public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> {
    private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest());
104
    private pb::UnknownFieldSet _unknownFields;
105
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
106 107
    public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } }

108
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
109
    public static pbr::MessageDescriptor Descriptor {
110
      get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[0]; }
111 112
    }

113
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
114 115 116 117
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

118
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
119 120 121 122 123 124
    public ConformanceRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

125
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
126 127
    public ConformanceRequest(ConformanceRequest other) : this() {
      requestedOutputFormat_ = other.requestedOutputFormat_;
Yilun Chong's avatar
Yilun Chong committed
128
      messageType_ = other.messageType_;
129
      testCategory_ = other.testCategory_;
130
      jspbEncodingOptions_ = other.jspbEncodingOptions_ != null ? other.jspbEncodingOptions_.Clone() : null;
131 132 133 134 135 136 137
      switch (other.PayloadCase) {
        case PayloadOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case PayloadOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
138 139 140
        case PayloadOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
141 142
      }

143
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
144 145
    }

146
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
147 148 149 150
    public ConformanceRequest Clone() {
      return new ConformanceRequest(this);
    }

151
    /// <summary>Field number for the "protobuf_payload" field.</summary>
152
    public const int ProtobufPayloadFieldNumber = 1;
153
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
154 155 156
    public pb::ByteString ProtobufPayload {
      get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; }
      set {
157
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
158 159 160 161
        payloadCase_ = PayloadOneofCase.ProtobufPayload;
      }
    }

162
    /// <summary>Field number for the "json_payload" field.</summary>
163
    public const int JsonPayloadFieldNumber = 2;
164
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
165 166 167
    public string JsonPayload {
      get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; }
      set {
168
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
169 170 171 172
        payloadCase_ = PayloadOneofCase.JsonPayload;
      }
    }

173 174 175 176 177 178 179 180 181 182 183 184 185 186
    /// <summary>Field number for the "jspb_payload" field.</summary>
    public const int JspbPayloadFieldNumber = 7;
    /// <summary>
    /// Google internal only.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string JspbPayload {
      get { return payloadCase_ == PayloadOneofCase.JspbPayload ? (string) payload_ : ""; }
      set {
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        payloadCase_ = PayloadOneofCase.JspbPayload;
      }
    }

187
    /// <summary>Field number for the "requested_output_format" field.</summary>
188
    public const int RequestedOutputFormatFieldNumber = 3;
189
    private global::Conformance.WireFormat requestedOutputFormat_ = 0;
190
    /// <summary>
191
    /// Which format should the testee serialize its message to?
192
    /// </summary>
193
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
194 195 196 197 198 199 200
    public global::Conformance.WireFormat RequestedOutputFormat {
      get { return requestedOutputFormat_; }
      set {
        requestedOutputFormat_ = value;
      }
    }

Yilun Chong's avatar
Yilun Chong committed
201 202 203 204
    /// <summary>Field number for the "message_type" field.</summary>
    public const int MessageTypeFieldNumber = 4;
    private string messageType_ = "";
    /// <summary>
205 206 207
    /// The full name for the test message to use; for the moment, either:
    /// protobuf_test_messages.proto3.TestAllTypesProto3 or
    /// protobuf_test_messages.proto2.TestAllTypesProto2.
Yilun Chong's avatar
Yilun Chong committed
208 209 210 211 212 213 214 215 216
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string MessageType {
      get { return messageType_; }
      set {
        messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

217 218 219 220
    /// <summary>Field number for the "test_category" field.</summary>
    public const int TestCategoryFieldNumber = 5;
    private global::Conformance.TestCategory testCategory_ = 0;
    /// <summary>
221 222 223
    /// Each test is given a specific test category. Some category may need
    /// spedific support in testee programs. Refer to the defintion of TestCategory
    /// for more information.
224
    /// </summary>
225
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
226 227
    public global::Conformance.TestCategory TestCategory {
      get { return testCategory_; }
228
      set {
229
        testCategory_ = value;
230 231 232
      }
    }

233 234 235 236 237 238 239 240 241 242 243 244 245 246
    /// <summary>Field number for the "jspb_encoding_options" field.</summary>
    public const int JspbEncodingOptionsFieldNumber = 6;
    private global::Conformance.JspbEncodingConfig jspbEncodingOptions_;
    /// <summary>
    /// Specify details for how to encode jspb.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Conformance.JspbEncodingConfig JspbEncodingOptions {
      get { return jspbEncodingOptions_; }
      set {
        jspbEncodingOptions_ = value;
      }
    }

247
    private object payload_;
248
    /// <summary>Enum of possible cases for the "payload" oneof.</summary>
249 250 251 252
    public enum PayloadOneofCase {
      None = 0,
      ProtobufPayload = 1,
      JsonPayload = 2,
253
      JspbPayload = 7,
254 255
    }
    private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
256
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
257 258 259 260
    public PayloadOneofCase PayloadCase {
      get { return payloadCase_; }
    }

261
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
262 263 264 265 266
    public void ClearPayload() {
      payloadCase_ = PayloadOneofCase.None;
      payload_ = null;
    }

267
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
268 269 270 271
    public override bool Equals(object other) {
      return Equals(other as ConformanceRequest);
    }

272
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
273 274 275 276 277 278 279 280 281
    public bool Equals(ConformanceRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ProtobufPayload != other.ProtobufPayload) return false;
      if (JsonPayload != other.JsonPayload) return false;
282
      if (JspbPayload != other.JspbPayload) return false;
283
      if (RequestedOutputFormat != other.RequestedOutputFormat) return false;
Yilun Chong's avatar
Yilun Chong committed
284
      if (MessageType != other.MessageType) return false;
285
      if (TestCategory != other.TestCategory) return false;
286
      if (!object.Equals(JspbEncodingOptions, other.JspbEncodingOptions)) return false;
287
      if (PayloadCase != other.PayloadCase) return false;
288
      return Equals(_unknownFields, other._unknownFields);
289 290
    }

291
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
292 293 294 295
    public override int GetHashCode() {
      int hash = 1;
      if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
      if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
296
      if (payloadCase_ == PayloadOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode();
297
      if (RequestedOutputFormat != 0) hash ^= RequestedOutputFormat.GetHashCode();
Yilun Chong's avatar
Yilun Chong committed
298
      if (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
299
      if (TestCategory != 0) hash ^= TestCategory.GetHashCode();
300
      if (jspbEncodingOptions_ != null) hash ^= JspbEncodingOptions.GetHashCode();
301
      hash ^= (int) payloadCase_;
302 303 304
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
305 306 307
      return hash;
    }

308
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
309
    public override string ToString() {
310
      return pb::JsonFormatter.ToDiagnosticString(this);
311 312
    }

313
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
314 315 316 317 318 319 320 321 322
    public void WriteTo(pb::CodedOutputStream output) {
      if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
        output.WriteRawTag(10);
        output.WriteBytes(ProtobufPayload);
      }
      if (payloadCase_ == PayloadOneofCase.JsonPayload) {
        output.WriteRawTag(18);
        output.WriteString(JsonPayload);
      }
323
      if (RequestedOutputFormat != 0) {
324 325 326
        output.WriteRawTag(24);
        output.WriteEnum((int) RequestedOutputFormat);
      }
Yilun Chong's avatar
Yilun Chong committed
327 328 329 330
      if (MessageType.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(MessageType);
      }
331
      if (TestCategory != 0) {
332
        output.WriteRawTag(40);
333
        output.WriteEnum((int) TestCategory);
334
      }
335 336 337 338 339 340 341 342
      if (jspbEncodingOptions_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(JspbEncodingOptions);
      }
      if (payloadCase_ == PayloadOneofCase.JspbPayload) {
        output.WriteRawTag(58);
        output.WriteString(JspbPayload);
      }
343 344 345
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
346 347
    }

348
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
349 350 351 352 353 354 355 356
    public int CalculateSize() {
      int size = 0;
      if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
      }
      if (payloadCase_ == PayloadOneofCase.JsonPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
      }
357 358 359
      if (payloadCase_ == PayloadOneofCase.JspbPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
      }
360
      if (RequestedOutputFormat != 0) {
361 362
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat);
      }
Yilun Chong's avatar
Yilun Chong committed
363 364 365
      if (MessageType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType);
      }
366 367
      if (TestCategory != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TestCategory);
368
      }
369 370 371
      if (jspbEncodingOptions_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(JspbEncodingOptions);
      }
372 373 374
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
375 376 377
      return size;
    }

378
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
379 380 381 382
    public void MergeFrom(ConformanceRequest other) {
      if (other == null) {
        return;
      }
383
      if (other.RequestedOutputFormat != 0) {
384 385
        RequestedOutputFormat = other.RequestedOutputFormat;
      }
Yilun Chong's avatar
Yilun Chong committed
386 387 388
      if (other.MessageType.Length != 0) {
        MessageType = other.MessageType;
      }
389 390
      if (other.TestCategory != 0) {
        TestCategory = other.TestCategory;
391
      }
392 393 394 395 396 397
      if (other.jspbEncodingOptions_ != null) {
        if (jspbEncodingOptions_ == null) {
          JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
        }
        JspbEncodingOptions.MergeFrom(other.JspbEncodingOptions);
      }
398 399 400 401 402 403 404
      switch (other.PayloadCase) {
        case PayloadOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case PayloadOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
405 406 407
        case PayloadOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
408 409
      }

410
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
411 412
    }

413
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
414 415
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
416
      while ((tag = input.ReadTag()) != 0) {
417 418
        switch(tag) {
          default:
419 420 421
            if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {
              return;
            }
422 423 424 425 426 427 428 429 430 431
            break;
          case 10: {
            ProtobufPayload = input.ReadBytes();
            break;
          }
          case 18: {
            JsonPayload = input.ReadString();
            break;
          }
          case 24: {
432
            RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum();
433 434
            break;
          }
Yilun Chong's avatar
Yilun Chong committed
435 436 437 438
          case 34: {
            MessageType = input.ReadString();
            break;
          }
439
          case 40: {
440
            TestCategory = (global::Conformance.TestCategory) input.ReadEnum();
441 442
            break;
          }
443 444 445 446 447 448 449 450 451 452 453
          case 50: {
            if (jspbEncodingOptions_ == null) {
              JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
            }
            input.ReadMessage(JspbEncodingOptions);
            break;
          }
          case 58: {
            JspbPayload = input.ReadString();
            break;
          }
454 455 456 457 458 459
        }
      }
    }

  }

460
  /// <summary>
461
  /// Represents a single test case's output.
462
  /// </summary>
463 464
  public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> {
    private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse());
465
    private pb::UnknownFieldSet _unknownFields;
466
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
467 468
    public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } }

469
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
470
    public static pbr::MessageDescriptor Descriptor {
471
      get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[1]; }
472 473
    }

474
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
475 476 477 478
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

479
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
480 481 482 483 484 485
    public ConformanceResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

486
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
487 488 489 490 491
    public ConformanceResponse(ConformanceResponse other) : this() {
      switch (other.ResultCase) {
        case ResultOneofCase.ParseError:
          ParseError = other.ParseError;
          break;
492 493 494
        case ResultOneofCase.SerializeError:
          SerializeError = other.SerializeError;
          break;
495 496 497 498 499 500 501 502 503 504 505 506
        case ResultOneofCase.RuntimeError:
          RuntimeError = other.RuntimeError;
          break;
        case ResultOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case ResultOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
        case ResultOneofCase.Skipped:
          Skipped = other.Skipped;
          break;
507 508 509
        case ResultOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
510 511
      }

512
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
513 514
    }

515
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
516 517 518 519
    public ConformanceResponse Clone() {
      return new ConformanceResponse(this);
    }

520
    /// <summary>Field number for the "parse_error" field.</summary>
521
    public const int ParseErrorFieldNumber = 1;
522
    /// <summary>
523 524
    /// This string should be set to indicate parsing failed.  The string can
    /// provide more information about the parse error if it is available.
525
    ///
526 527
    /// Setting this string does not necessarily mean the testee failed the
    /// test.  Some of the test cases are intentionally invalid input.
528
    /// </summary>
529
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
530 531 532
    public string ParseError {
      get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; }
      set {
533
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
534 535 536 537
        resultCase_ = ResultOneofCase.ParseError;
      }
    }

538 539 540
    /// <summary>Field number for the "serialize_error" field.</summary>
    public const int SerializeErrorFieldNumber = 6;
    /// <summary>
541 542 543
    /// If the input was successfully parsed but errors occurred when
    /// serializing it to the requested output format, set the error message in
    /// this field.
544
    /// </summary>
545
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
546 547 548
    public string SerializeError {
      get { return resultCase_ == ResultOneofCase.SerializeError ? (string) result_ : ""; }
      set {
549
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
550 551 552 553
        resultCase_ = ResultOneofCase.SerializeError;
      }
    }

554
    /// <summary>Field number for the "runtime_error" field.</summary>
555
    public const int RuntimeErrorFieldNumber = 2;
556
    /// <summary>
557 558 559
    /// This should be set if some other error occurred.  This will always
    /// indicate that the test failed.  The string can provide more information
    /// about the failure.
560
    /// </summary>
561
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
562 563 564
    public string RuntimeError {
      get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; }
      set {
565
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
566 567 568 569
        resultCase_ = ResultOneofCase.RuntimeError;
      }
    }

570
    /// <summary>Field number for the "protobuf_payload" field.</summary>
571
    public const int ProtobufPayloadFieldNumber = 3;
572
    /// <summary>
573 574
    /// If the input was successfully parsed and the requested output was
    /// protobuf, serialize it to protobuf and set it in this field.
575
    /// </summary>
576
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
577 578 579
    public pb::ByteString ProtobufPayload {
      get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; }
      set {
580
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
581 582 583 584
        resultCase_ = ResultOneofCase.ProtobufPayload;
      }
    }

585
    /// <summary>Field number for the "json_payload" field.</summary>
586
    public const int JsonPayloadFieldNumber = 4;
587
    /// <summary>
588 589
    /// If the input was successfully parsed and the requested output was JSON,
    /// serialize to JSON and set it in this field.
590
    /// </summary>
591
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
592 593 594
    public string JsonPayload {
      get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; }
      set {
595
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
596 597 598 599
        resultCase_ = ResultOneofCase.JsonPayload;
      }
    }

600
    /// <summary>Field number for the "skipped" field.</summary>
601
    public const int SkippedFieldNumber = 5;
602
    /// <summary>
603 604
    /// For when the testee skipped the test, likely because a certain feature
    /// wasn't supported, like JSON input/output.
605
    /// </summary>
606
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
607 608 609
    public string Skipped {
      get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; }
      set {
610
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
611 612 613 614
        resultCase_ = ResultOneofCase.Skipped;
      }
    }

615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
    /// <summary>Field number for the "jspb_payload" field.</summary>
    public const int JspbPayloadFieldNumber = 7;
    /// <summary>
    /// If the input was successfully parsed and the requested output was JSPB,
    /// serialize to JSPB and set it in this field. JSPB is google internal only
    /// format. Opensource testees can just skip it.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string JspbPayload {
      get { return resultCase_ == ResultOneofCase.JspbPayload ? (string) result_ : ""; }
      set {
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        resultCase_ = ResultOneofCase.JspbPayload;
      }
    }

631
    private object result_;
632
    /// <summary>Enum of possible cases for the "result" oneof.</summary>
633 634 635
    public enum ResultOneofCase {
      None = 0,
      ParseError = 1,
636
      SerializeError = 6,
637 638 639 640
      RuntimeError = 2,
      ProtobufPayload = 3,
      JsonPayload = 4,
      Skipped = 5,
641
      JspbPayload = 7,
642 643
    }
    private ResultOneofCase resultCase_ = ResultOneofCase.None;
644
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
645 646 647 648
    public ResultOneofCase ResultCase {
      get { return resultCase_; }
    }

649
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
650 651 652 653 654
    public void ClearResult() {
      resultCase_ = ResultOneofCase.None;
      result_ = null;
    }

655
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
656 657 658 659
    public override bool Equals(object other) {
      return Equals(other as ConformanceResponse);
    }

660
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
661 662 663 664 665 666 667 668
    public bool Equals(ConformanceResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ParseError != other.ParseError) return false;
669
      if (SerializeError != other.SerializeError) return false;
670 671 672 673
      if (RuntimeError != other.RuntimeError) return false;
      if (ProtobufPayload != other.ProtobufPayload) return false;
      if (JsonPayload != other.JsonPayload) return false;
      if (Skipped != other.Skipped) return false;
674
      if (JspbPayload != other.JspbPayload) return false;
675
      if (ResultCase != other.ResultCase) return false;
676
      return Equals(_unknownFields, other._unknownFields);
677 678
    }

679
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
680 681 682
    public override int GetHashCode() {
      int hash = 1;
      if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode();
683
      if (resultCase_ == ResultOneofCase.SerializeError) hash ^= SerializeError.GetHashCode();
684 685 686 687
      if (resultCase_ == ResultOneofCase.RuntimeError) hash ^= RuntimeError.GetHashCode();
      if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
      if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
      if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode();
688
      if (resultCase_ == ResultOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode();
689
      hash ^= (int) resultCase_;
690 691 692
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
693 694 695
      return hash;
    }

696
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
697
    public override string ToString() {
698
      return pb::JsonFormatter.ToDiagnosticString(this);
699 700
    }

701
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
    public void WriteTo(pb::CodedOutputStream output) {
      if (resultCase_ == ResultOneofCase.ParseError) {
        output.WriteRawTag(10);
        output.WriteString(ParseError);
      }
      if (resultCase_ == ResultOneofCase.RuntimeError) {
        output.WriteRawTag(18);
        output.WriteString(RuntimeError);
      }
      if (resultCase_ == ResultOneofCase.ProtobufPayload) {
        output.WriteRawTag(26);
        output.WriteBytes(ProtobufPayload);
      }
      if (resultCase_ == ResultOneofCase.JsonPayload) {
        output.WriteRawTag(34);
        output.WriteString(JsonPayload);
      }
      if (resultCase_ == ResultOneofCase.Skipped) {
        output.WriteRawTag(42);
        output.WriteString(Skipped);
      }
723 724 725 726
      if (resultCase_ == ResultOneofCase.SerializeError) {
        output.WriteRawTag(50);
        output.WriteString(SerializeError);
      }
727 728 729 730
      if (resultCase_ == ResultOneofCase.JspbPayload) {
        output.WriteRawTag(58);
        output.WriteString(JspbPayload);
      }
731 732 733
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
734 735
    }

736
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
737 738 739 740 741
    public int CalculateSize() {
      int size = 0;
      if (resultCase_ == ResultOneofCase.ParseError) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError);
      }
742 743 744
      if (resultCase_ == ResultOneofCase.SerializeError) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SerializeError);
      }
745 746 747 748 749 750 751 752 753 754 755 756
      if (resultCase_ == ResultOneofCase.RuntimeError) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError);
      }
      if (resultCase_ == ResultOneofCase.ProtobufPayload) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
      }
      if (resultCase_ == ResultOneofCase.JsonPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
      }
      if (resultCase_ == ResultOneofCase.Skipped) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped);
      }
757 758 759
      if (resultCase_ == ResultOneofCase.JspbPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
      }
760 761 762
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
763 764 765
      return size;
    }

766
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
767 768 769 770 771 772 773 774
    public void MergeFrom(ConformanceResponse other) {
      if (other == null) {
        return;
      }
      switch (other.ResultCase) {
        case ResultOneofCase.ParseError:
          ParseError = other.ParseError;
          break;
775 776 777
        case ResultOneofCase.SerializeError:
          SerializeError = other.SerializeError;
          break;
778 779 780 781 782 783 784 785 786 787 788 789
        case ResultOneofCase.RuntimeError:
          RuntimeError = other.RuntimeError;
          break;
        case ResultOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case ResultOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
        case ResultOneofCase.Skipped:
          Skipped = other.Skipped;
          break;
790 791 792
        case ResultOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
793 794
      }

795
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
796 797
    }

798
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
799 800
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
801
      while ((tag = input.ReadTag()) != 0) {
802 803
        switch(tag) {
          default:
804 805 806
            if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {
              return;
            }
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
            break;
          case 10: {
            ParseError = input.ReadString();
            break;
          }
          case 18: {
            RuntimeError = input.ReadString();
            break;
          }
          case 26: {
            ProtobufPayload = input.ReadBytes();
            break;
          }
          case 34: {
            JsonPayload = input.ReadString();
            break;
          }
          case 42: {
            Skipped = input.ReadString();
            break;
          }
828 829 830 831
          case 50: {
            SerializeError = input.ReadString();
            break;
          }
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972
          case 58: {
            JspbPayload = input.ReadString();
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// Encoding options for jspb format.
  /// </summary>
  public sealed partial class JspbEncodingConfig : pb::IMessage<JspbEncodingConfig> {
    private static readonly pb::MessageParser<JspbEncodingConfig> _parser = new pb::MessageParser<JspbEncodingConfig>(() => new JspbEncodingConfig());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<JspbEncodingConfig> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JspbEncodingConfig() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JspbEncodingConfig(JspbEncodingConfig other) : this() {
      useJspbArrayAnyFormat_ = other.useJspbArrayAnyFormat_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public JspbEncodingConfig Clone() {
      return new JspbEncodingConfig(this);
    }

    /// <summary>Field number for the "use_jspb_array_any_format" field.</summary>
    public const int UseJspbArrayAnyFormatFieldNumber = 1;
    private bool useJspbArrayAnyFormat_;
    /// <summary>
    /// Encode the value field of Any as jspb array if ture, otherwise binary.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool UseJspbArrayAnyFormat {
      get { return useJspbArrayAnyFormat_; }
      set {
        useJspbArrayAnyFormat_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as JspbEncodingConfig);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(JspbEncodingConfig other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (UseJspbArrayAnyFormat != other.UseJspbArrayAnyFormat) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (UseJspbArrayAnyFormat != false) hash ^= UseJspbArrayAnyFormat.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (UseJspbArrayAnyFormat != false) {
        output.WriteRawTag(8);
        output.WriteBool(UseJspbArrayAnyFormat);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (UseJspbArrayAnyFormat != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(JspbEncodingConfig other) {
      if (other == null) {
        return;
      }
      if (other.UseJspbArrayAnyFormat != false) {
        UseJspbArrayAnyFormat = other.UseJspbArrayAnyFormat;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {
              return;
            }
            break;
          case 8: {
            UseJspbArrayAnyFormat = input.ReadBool();
            break;
          }
973 974 975 976 977 978 979 980 981 982 983
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code