Conformance.cs 45.2 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
            "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UiHQoKRmFpbHVyZVNl",
28
            "dBIPCgdmYWlsdXJlGAEgAygJIuMCChJDb25mb3JtYW5jZVJlcXVlc3QSGgoQ",
29
            "cHJvdG9idWZfcGF5bG9hZBgBIAEoDEgAEhYKDGpzb25fcGF5bG9hZBgCIAEo",
30 31 32 33 34
            "CUgAEhYKDGpzcGJfcGF5bG9hZBgHIAEoCUgAEhYKDHRleHRfcGF5bG9hZBgI",
            "IAEoCUgAEjgKF3JlcXVlc3RlZF9vdXRwdXRfZm9ybWF0GAMgASgOMhcuY29u",
            "Zm9ybWFuY2UuV2lyZUZvcm1hdBIUCgxtZXNzYWdlX3R5cGUYBCABKAkSMAoN",
            "dGVzdF9jYXRlZ29yeRgFIAEoDjIZLmNvbmZvcm1hbmNlLlRlc3RDYXRlZ29y",
            "eRI+ChVqc3BiX2VuY29kaW5nX29wdGlvbnMYBiABKAsyHy5jb25mb3JtYW5j",
35 36 37 38 39 40 41 42 43 44 45 46 47 48
            "ZS5Kc3BiRW5jb2RpbmdDb25maWcSHAoUcHJpbnRfdW5rbm93bl9maWVsZHMY",
            "CSABKAhCCQoHcGF5bG9hZCLhAQoTQ29uZm9ybWFuY2VSZXNwb25zZRIVCgtw",
            "YXJzZV9lcnJvchgBIAEoCUgAEhkKD3NlcmlhbGl6ZV9lcnJvchgGIAEoCUgA",
            "EhcKDXJ1bnRpbWVfZXJyb3IYAiABKAlIABIaChBwcm90b2J1Zl9wYXlsb2Fk",
            "GAMgASgMSAASFgoManNvbl9wYXlsb2FkGAQgASgJSAASEQoHc2tpcHBlZBgF",
            "IAEoCUgAEhYKDGpzcGJfcGF5bG9hZBgHIAEoCUgAEhYKDHRleHRfcGF5bG9h",
            "ZBgIIAEoCUgAQggKBnJlc3VsdCI3ChJKc3BiRW5jb2RpbmdDb25maWcSIQoZ",
            "dXNlX2pzcGJfYXJyYXlfYW55X2Zvcm1hdBgBIAEoCCpQCgpXaXJlRm9ybWF0",
            "Eg8KC1VOU1BFQ0lGSUVEEAASDAoIUFJPVE9CVUYQARIICgRKU09OEAISCAoE",
            "SlNQQhADEg8KC1RFWFRfRk9STUFUEAQqjwEKDFRlc3RDYXRlZ29yeRIUChBV",
            "TlNQRUNJRklFRF9URVNUEAASDwoLQklOQVJZX1RFU1QQARINCglKU09OX1RF",
            "U1QQAhIkCiBKU09OX0lHTk9SRV9VTktOT1dOX1BBUlNJTkdfVEVTVBADEg0K",
            "CUpTUEJfVEVTVBAEEhQKEFRFWFRfRk9STUFUX1RFU1QQBUIhCh9jb20uZ29v",
            "Z2xlLnByb3RvYnVmLmNvbmZvcm1hbmNlYgZwcm90bzM="));
49
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
50
          new pbr::FileDescriptor[] { },
51 52 53 54 55
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.TestCategory), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.FailureSet), global::Conformance.FailureSet.Parser, new[]{ "Failure" }, null, null, null, null),
            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),
            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),
            new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.JspbEncodingConfig), global::Conformance.JspbEncodingConfig.Parser, new[]{ "UseJspbArrayAnyFormat" }, null, null, null, null)
56 57 58 59 60 61 62
          }));
    }
    #endregion

  }
  #region Enums
  public enum WireFormat {
63 64 65
    [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
    [pbr::OriginalName("PROTOBUF")] Protobuf = 1,
    [pbr::OriginalName("JSON")] Json = 2,
66 67 68 69
    /// <summary>
    /// Google internal only. Opensource testees just skip it.
    /// </summary>
    [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 76 77
    /// <summary>
    /// Test binary wire format.
    /// </summary>
78
    [pbr::OriginalName("BINARY_TEST")] BinaryTest = 1,
79 80 81
    /// <summary>
    /// Test json wire format.
    /// </summary>
82
    [pbr::OriginalName("JSON_TEST")] JsonTest = 2,
83 84 85 86 87 88 89
    /// <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>
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 94
    /// </summary>
    [pbr::OriginalName("JSPB_TEST")] JspbTest = 4,
95
    /// <summary>
96
    /// Test text format. For cpp, java and python, testees can already deal with
97 98 99
    /// this type. Testees of other languages can simply skip it.
    /// </summary>
    [pbr::OriginalName("TEXT_FORMAT_TEST")] TextFormatTest = 5,
100 101
  }

102 103 104
  #endregion

  #region Messages
105 106 107 108 109
  /// <summary>
  /// The conformance runner will request a list of failures as the first request.
  /// This will be known by message_type == "conformance.FailureSet", a conformance
  /// test should return a serialized FailureSet in protobuf_payload.
  /// </summary>
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
  public sealed partial class FailureSet : pb::IMessage<FailureSet> {
    private static readonly pb::MessageParser<FailureSet> _parser = new pb::MessageParser<FailureSet>(() => new FailureSet());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<FailureSet> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "failure" field.</summary>
    public const int FailureFieldNumber = 1;
    private static readonly pb::FieldCodec<string> _repeated_failure_codec
        = pb::FieldCodec.ForString(10);
    private readonly pbc::RepeatedField<string> failure_ = new pbc::RepeatedField<string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Failure {
      get { return failure_; }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= failure_.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) {
      failure_.WriteTo(output, _repeated_failure_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(FailureSet other) {
      if (other == null) {
        return;
      }
      failure_.Add(other.failure_);
      _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:
219
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
220 221 222 223 224 225 226 227 228 229 230
            break;
          case 10: {
            failure_.AddEntriesFrom(input, _repeated_failure_codec);
            break;
          }
        }
      }
    }

  }

231
  /// <summary>
232
  /// Represents a single test case's input.  The testee should:
233
  ///
234 235 236
  ///   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.
237
  /// </summary>
238 239
  public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> {
    private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest());
240
    private pb::UnknownFieldSet _unknownFields;
241
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
242 243
    public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } }

244
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
245
    public static pbr::MessageDescriptor Descriptor {
246
      get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[1]; }
247 248
    }

249
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
250 251 252 253
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

254
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
255 256 257 258 259 260
    public ConformanceRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

261
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
262 263
    public ConformanceRequest(ConformanceRequest other) : this() {
      requestedOutputFormat_ = other.requestedOutputFormat_;
Yilun Chong's avatar
Yilun Chong committed
264
      messageType_ = other.messageType_;
265
      testCategory_ = other.testCategory_;
266
      jspbEncodingOptions_ = other.jspbEncodingOptions_ != null ? other.jspbEncodingOptions_.Clone() : null;
267
      printUnknownFields_ = other.printUnknownFields_;
268 269 270 271 272 273 274
      switch (other.PayloadCase) {
        case PayloadOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case PayloadOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
275 276 277
        case PayloadOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
278 279 280
        case PayloadOneofCase.TextPayload:
          TextPayload = other.TextPayload;
          break;
281 282
      }

283
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
284 285
    }

286
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
287 288 289 290
    public ConformanceRequest Clone() {
      return new ConformanceRequest(this);
    }

291
    /// <summary>Field number for the "protobuf_payload" field.</summary>
292
    public const int ProtobufPayloadFieldNumber = 1;
293
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
294 295 296
    public pb::ByteString ProtobufPayload {
      get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; }
      set {
297
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
298 299 300 301
        payloadCase_ = PayloadOneofCase.ProtobufPayload;
      }
    }

302
    /// <summary>Field number for the "json_payload" field.</summary>
303
    public const int JsonPayloadFieldNumber = 2;
304
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
305 306 307
    public string JsonPayload {
      get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; }
      set {
308
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
309 310 311 312
        payloadCase_ = PayloadOneofCase.JsonPayload;
      }
    }

313 314 315
    /// <summary>Field number for the "jspb_payload" field.</summary>
    public const int JspbPayloadFieldNumber = 7;
    /// <summary>
316
    /// Google internal only.  Opensource testees just skip it.
317 318 319 320 321 322 323 324 325 326
    /// </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;
      }
    }

327 328 329 330 331 332 333 334 335 336 337
    /// <summary>Field number for the "text_payload" field.</summary>
    public const int TextPayloadFieldNumber = 8;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string TextPayload {
      get { return payloadCase_ == PayloadOneofCase.TextPayload ? (string) payload_ : ""; }
      set {
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        payloadCase_ = PayloadOneofCase.TextPayload;
      }
    }

338
    /// <summary>Field number for the "requested_output_format" field.</summary>
339
    public const int RequestedOutputFormatFieldNumber = 3;
340
    private global::Conformance.WireFormat requestedOutputFormat_ = global::Conformance.WireFormat.Unspecified;
341
    /// <summary>
342
    /// Which format should the testee serialize its message to?
343
    /// </summary>
344
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
345 346 347 348 349 350 351
    public global::Conformance.WireFormat RequestedOutputFormat {
      get { return requestedOutputFormat_; }
      set {
        requestedOutputFormat_ = value;
      }
    }

Yilun Chong's avatar
Yilun Chong committed
352 353 354 355
    /// <summary>Field number for the "message_type" field.</summary>
    public const int MessageTypeFieldNumber = 4;
    private string messageType_ = "";
    /// <summary>
356 357
    /// The full name for the test message to use; for the moment, either:
    /// protobuf_test_messages.proto3.TestAllTypesProto3 or
358
    /// protobuf_test_messages.proto2.TestAllTypesProto2.
Yilun Chong's avatar
Yilun Chong committed
359 360 361 362 363 364 365 366 367
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string MessageType {
      get { return messageType_; }
      set {
        messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

368 369
    /// <summary>Field number for the "test_category" field.</summary>
    public const int TestCategoryFieldNumber = 5;
370
    private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest;
371
    /// <summary>
372 373 374
    /// 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.
375
    /// </summary>
376
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
377 378
    public global::Conformance.TestCategory TestCategory {
      get { return testCategory_; }
379
      set {
380
        testCategory_ = value;
381 382 383
      }
    }

384 385 386 387 388 389 390 391 392 393 394 395 396 397
    /// <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;
      }
    }

398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
    /// <summary>Field number for the "print_unknown_fields" field.</summary>
    public const int PrintUnknownFieldsFieldNumber = 9;
    private bool printUnknownFields_;
    /// <summary>
    /// This can be used in json and text format. If true, testee should print
    /// unknown fields instead of ignore. This feature is optional.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool PrintUnknownFields {
      get { return printUnknownFields_; }
      set {
        printUnknownFields_ = value;
      }
    }

413
    private object payload_;
414
    /// <summary>Enum of possible cases for the "payload" oneof.</summary>
415 416 417 418
    public enum PayloadOneofCase {
      None = 0,
      ProtobufPayload = 1,
      JsonPayload = 2,
419
      JspbPayload = 7,
420
      TextPayload = 8,
421 422
    }
    private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
423
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
424 425 426 427
    public PayloadOneofCase PayloadCase {
      get { return payloadCase_; }
    }

428
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
429 430 431 432 433
    public void ClearPayload() {
      payloadCase_ = PayloadOneofCase.None;
      payload_ = null;
    }

434
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
435 436 437 438
    public override bool Equals(object other) {
      return Equals(other as ConformanceRequest);
    }

439
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
440 441 442 443 444 445 446 447 448
    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;
449
      if (JspbPayload != other.JspbPayload) return false;
450
      if (TextPayload != other.TextPayload) return false;
451
      if (RequestedOutputFormat != other.RequestedOutputFormat) return false;
Yilun Chong's avatar
Yilun Chong committed
452
      if (MessageType != other.MessageType) return false;
453
      if (TestCategory != other.TestCategory) return false;
454
      if (!object.Equals(JspbEncodingOptions, other.JspbEncodingOptions)) return false;
455
      if (PrintUnknownFields != other.PrintUnknownFields) return false;
456
      if (PayloadCase != other.PayloadCase) return false;
457
      return Equals(_unknownFields, other._unknownFields);
458 459
    }

460
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
461 462 463 464
    public override int GetHashCode() {
      int hash = 1;
      if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
      if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
465
      if (payloadCase_ == PayloadOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode();
466
      if (payloadCase_ == PayloadOneofCase.TextPayload) hash ^= TextPayload.GetHashCode();
467
      if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) hash ^= RequestedOutputFormat.GetHashCode();
Yilun Chong's avatar
Yilun Chong committed
468
      if (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
469
      if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) hash ^= TestCategory.GetHashCode();
470
      if (jspbEncodingOptions_ != null) hash ^= JspbEncodingOptions.GetHashCode();
471
      if (PrintUnknownFields != false) hash ^= PrintUnknownFields.GetHashCode();
472
      hash ^= (int) payloadCase_;
473 474 475
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
476 477 478
      return hash;
    }

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

484
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
485 486 487 488 489 490 491 492 493
    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);
      }
494
      if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
495 496 497
        output.WriteRawTag(24);
        output.WriteEnum((int) RequestedOutputFormat);
      }
Yilun Chong's avatar
Yilun Chong committed
498 499 500 501
      if (MessageType.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(MessageType);
      }
502
      if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
503
        output.WriteRawTag(40);
504
        output.WriteEnum((int) TestCategory);
505
      }
506 507 508 509 510 511 512 513
      if (jspbEncodingOptions_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(JspbEncodingOptions);
      }
      if (payloadCase_ == PayloadOneofCase.JspbPayload) {
        output.WriteRawTag(58);
        output.WriteString(JspbPayload);
      }
514 515 516 517
      if (payloadCase_ == PayloadOneofCase.TextPayload) {
        output.WriteRawTag(66);
        output.WriteString(TextPayload);
      }
518 519 520 521
      if (PrintUnknownFields != false) {
        output.WriteRawTag(72);
        output.WriteBool(PrintUnknownFields);
      }
522 523 524
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
525 526
    }

527
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
528 529 530 531 532 533 534 535
    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);
      }
536 537 538
      if (payloadCase_ == PayloadOneofCase.JspbPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
      }
539 540 541
      if (payloadCase_ == PayloadOneofCase.TextPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload);
      }
542
      if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
543 544
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat);
      }
Yilun Chong's avatar
Yilun Chong committed
545 546 547
      if (MessageType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType);
      }
548
      if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
549
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TestCategory);
550
      }
551 552 553
      if (jspbEncodingOptions_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(JspbEncodingOptions);
      }
554 555 556
      if (PrintUnknownFields != false) {
        size += 1 + 1;
      }
557 558 559
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
560 561 562
      return size;
    }

563
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
564 565 566 567
    public void MergeFrom(ConformanceRequest other) {
      if (other == null) {
        return;
      }
568
      if (other.RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
569 570
        RequestedOutputFormat = other.RequestedOutputFormat;
      }
Yilun Chong's avatar
Yilun Chong committed
571 572 573
      if (other.MessageType.Length != 0) {
        MessageType = other.MessageType;
      }
574
      if (other.TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
575
        TestCategory = other.TestCategory;
576
      }
577 578 579 580 581 582
      if (other.jspbEncodingOptions_ != null) {
        if (jspbEncodingOptions_ == null) {
          JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
        }
        JspbEncodingOptions.MergeFrom(other.JspbEncodingOptions);
      }
583 584 585
      if (other.PrintUnknownFields != false) {
        PrintUnknownFields = other.PrintUnknownFields;
      }
586 587 588 589 590 591 592
      switch (other.PayloadCase) {
        case PayloadOneofCase.ProtobufPayload:
          ProtobufPayload = other.ProtobufPayload;
          break;
        case PayloadOneofCase.JsonPayload:
          JsonPayload = other.JsonPayload;
          break;
593 594 595
        case PayloadOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
596 597 598
        case PayloadOneofCase.TextPayload:
          TextPayload = other.TextPayload;
          break;
599 600
      }

601
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
602 603
    }

604
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
605 606
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
607
      while ((tag = input.ReadTag()) != 0) {
608 609
        switch(tag) {
          default:
610
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
611 612 613 614 615 616 617 618 619 620
            break;
          case 10: {
            ProtobufPayload = input.ReadBytes();
            break;
          }
          case 18: {
            JsonPayload = input.ReadString();
            break;
          }
          case 24: {
621
            RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum();
622 623
            break;
          }
Yilun Chong's avatar
Yilun Chong committed
624 625 626 627
          case 34: {
            MessageType = input.ReadString();
            break;
          }
628
          case 40: {
629
            TestCategory = (global::Conformance.TestCategory) input.ReadEnum();
630 631
            break;
          }
632 633 634 635 636 637 638 639 640 641 642
          case 50: {
            if (jspbEncodingOptions_ == null) {
              JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
            }
            input.ReadMessage(JspbEncodingOptions);
            break;
          }
          case 58: {
            JspbPayload = input.ReadString();
            break;
          }
643 644 645 646
          case 66: {
            TextPayload = input.ReadString();
            break;
          }
647 648 649 650
          case 72: {
            PrintUnknownFields = input.ReadBool();
            break;
          }
651 652 653 654 655 656
        }
      }
    }

  }

657
  /// <summary>
658
  /// Represents a single test case's output.
659
  /// </summary>
660 661
  public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> {
    private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse());
662
    private pb::UnknownFieldSet _unknownFields;
663
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
664 665
    public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } }

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

671
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
672 673 674 675
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

676
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
677 678 679 680 681 682
    public ConformanceResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

683
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
684 685 686 687 688
    public ConformanceResponse(ConformanceResponse other) : this() {
      switch (other.ResultCase) {
        case ResultOneofCase.ParseError:
          ParseError = other.ParseError;
          break;
689 690 691
        case ResultOneofCase.SerializeError:
          SerializeError = other.SerializeError;
          break;
692 693 694 695 696 697 698 699 700 701 702 703
        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;
704 705 706
        case ResultOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
707 708 709
        case ResultOneofCase.TextPayload:
          TextPayload = other.TextPayload;
          break;
710 711
      }

712
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
713 714
    }

715
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
716 717 718 719
    public ConformanceResponse Clone() {
      return new ConformanceResponse(this);
    }

720
    /// <summary>Field number for the "parse_error" field.</summary>
721
    public const int ParseErrorFieldNumber = 1;
722
    /// <summary>
723 724
    /// This string should be set to indicate parsing failed.  The string can
    /// provide more information about the parse error if it is available.
725
    ///
726 727
    /// Setting this string does not necessarily mean the testee failed the
    /// test.  Some of the test cases are intentionally invalid input.
728
    /// </summary>
729
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
730 731 732
    public string ParseError {
      get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; }
      set {
733
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
734 735 736 737
        resultCase_ = ResultOneofCase.ParseError;
      }
    }

738 739 740
    /// <summary>Field number for the "serialize_error" field.</summary>
    public const int SerializeErrorFieldNumber = 6;
    /// <summary>
741 742 743
    /// If the input was successfully parsed but errors occurred when
    /// serializing it to the requested output format, set the error message in
    /// this field.
744
    /// </summary>
745
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
746 747 748
    public string SerializeError {
      get { return resultCase_ == ResultOneofCase.SerializeError ? (string) result_ : ""; }
      set {
749
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
750 751 752 753
        resultCase_ = ResultOneofCase.SerializeError;
      }
    }

754
    /// <summary>Field number for the "runtime_error" field.</summary>
755
    public const int RuntimeErrorFieldNumber = 2;
756
    /// <summary>
757 758 759
    /// 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.
760
    /// </summary>
761
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
762 763 764
    public string RuntimeError {
      get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; }
      set {
765
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
766 767 768 769
        resultCase_ = ResultOneofCase.RuntimeError;
      }
    }

770
    /// <summary>Field number for the "protobuf_payload" field.</summary>
771
    public const int ProtobufPayloadFieldNumber = 3;
772
    /// <summary>
773 774
    /// If the input was successfully parsed and the requested output was
    /// protobuf, serialize it to protobuf and set it in this field.
775
    /// </summary>
776
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
777 778 779
    public pb::ByteString ProtobufPayload {
      get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; }
      set {
780
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
781 782 783 784
        resultCase_ = ResultOneofCase.ProtobufPayload;
      }
    }

785
    /// <summary>Field number for the "json_payload" field.</summary>
786
    public const int JsonPayloadFieldNumber = 4;
787
    /// <summary>
788 789
    /// If the input was successfully parsed and the requested output was JSON,
    /// serialize to JSON and set it in this field.
790
    /// </summary>
791
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
792 793 794
    public string JsonPayload {
      get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; }
      set {
795
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
796 797 798 799
        resultCase_ = ResultOneofCase.JsonPayload;
      }
    }

800
    /// <summary>Field number for the "skipped" field.</summary>
801
    public const int SkippedFieldNumber = 5;
802
    /// <summary>
803 804
    /// For when the testee skipped the test, likely because a certain feature
    /// wasn't supported, like JSON input/output.
805
    /// </summary>
806
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
807 808 809
    public string Skipped {
      get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; }
      set {
810
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
811 812 813 814
        resultCase_ = ResultOneofCase.Skipped;
      }
    }

815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830
    /// <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;
      }
    }

831 832 833 834 835 836 837 838 839 840 841 842 843 844 845
    /// <summary>Field number for the "text_payload" field.</summary>
    public const int TextPayloadFieldNumber = 8;
    /// <summary>
    /// If the input was successfully parsed and the requested output was
    /// TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string TextPayload {
      get { return resultCase_ == ResultOneofCase.TextPayload ? (string) result_ : ""; }
      set {
        result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        resultCase_ = ResultOneofCase.TextPayload;
      }
    }

846
    private object result_;
847
    /// <summary>Enum of possible cases for the "result" oneof.</summary>
848 849 850
    public enum ResultOneofCase {
      None = 0,
      ParseError = 1,
851
      SerializeError = 6,
852 853 854 855
      RuntimeError = 2,
      ProtobufPayload = 3,
      JsonPayload = 4,
      Skipped = 5,
856
      JspbPayload = 7,
857
      TextPayload = 8,
858 859
    }
    private ResultOneofCase resultCase_ = ResultOneofCase.None;
860
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
861 862 863 864
    public ResultOneofCase ResultCase {
      get { return resultCase_; }
    }

865
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
866 867 868 869 870
    public void ClearResult() {
      resultCase_ = ResultOneofCase.None;
      result_ = null;
    }

871
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
872 873 874 875
    public override bool Equals(object other) {
      return Equals(other as ConformanceResponse);
    }

876
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
877 878 879 880 881 882 883 884
    public bool Equals(ConformanceResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ParseError != other.ParseError) return false;
885
      if (SerializeError != other.SerializeError) return false;
886 887 888 889
      if (RuntimeError != other.RuntimeError) return false;
      if (ProtobufPayload != other.ProtobufPayload) return false;
      if (JsonPayload != other.JsonPayload) return false;
      if (Skipped != other.Skipped) return false;
890
      if (JspbPayload != other.JspbPayload) return false;
891
      if (TextPayload != other.TextPayload) return false;
892
      if (ResultCase != other.ResultCase) return false;
893
      return Equals(_unknownFields, other._unknownFields);
894 895
    }

896
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
897 898 899
    public override int GetHashCode() {
      int hash = 1;
      if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode();
900
      if (resultCase_ == ResultOneofCase.SerializeError) hash ^= SerializeError.GetHashCode();
901 902 903 904
      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();
905
      if (resultCase_ == ResultOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode();
906
      if (resultCase_ == ResultOneofCase.TextPayload) hash ^= TextPayload.GetHashCode();
907
      hash ^= (int) resultCase_;
908 909 910
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
911 912 913
      return hash;
    }

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

919
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940
    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);
      }
941 942 943 944
      if (resultCase_ == ResultOneofCase.SerializeError) {
        output.WriteRawTag(50);
        output.WriteString(SerializeError);
      }
945 946 947 948
      if (resultCase_ == ResultOneofCase.JspbPayload) {
        output.WriteRawTag(58);
        output.WriteString(JspbPayload);
      }
949 950 951 952
      if (resultCase_ == ResultOneofCase.TextPayload) {
        output.WriteRawTag(66);
        output.WriteString(TextPayload);
      }
953 954 955
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
956 957
    }

958
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
959 960 961 962 963
    public int CalculateSize() {
      int size = 0;
      if (resultCase_ == ResultOneofCase.ParseError) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError);
      }
964 965 966
      if (resultCase_ == ResultOneofCase.SerializeError) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SerializeError);
      }
967 968 969 970 971 972 973 974 975 976 977 978
      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);
      }
979 980 981
      if (resultCase_ == ResultOneofCase.JspbPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
      }
982 983 984
      if (resultCase_ == ResultOneofCase.TextPayload) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload);
      }
985 986 987
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
988 989 990
      return size;
    }

991
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
992 993 994 995 996 997 998 999
    public void MergeFrom(ConformanceResponse other) {
      if (other == null) {
        return;
      }
      switch (other.ResultCase) {
        case ResultOneofCase.ParseError:
          ParseError = other.ParseError;
          break;
1000 1001 1002
        case ResultOneofCase.SerializeError:
          SerializeError = other.SerializeError;
          break;
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
        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;
1015 1016 1017
        case ResultOneofCase.JspbPayload:
          JspbPayload = other.JspbPayload;
          break;
1018 1019 1020
        case ResultOneofCase.TextPayload:
          TextPayload = other.TextPayload;
          break;
1021 1022
      }

1023
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1024 1025
    }

1026
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1027 1028
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
1029
      while ((tag = input.ReadTag()) != 0) {
1030 1031
        switch(tag) {
          default:
1032
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
            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;
          }
1054 1055 1056 1057
          case 50: {
            SerializeError = input.ReadString();
            break;
          }
1058 1059 1060 1061
          case 58: {
            JspbPayload = input.ReadString();
            break;
          }
1062 1063 1064 1065
          case 66: {
            TextPayload = input.ReadString();
            break;
          }
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082
        }
      }
    }

  }

  /// <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 {
1083
      get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[3]; }
1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194
    }

    [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:
1195
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1196 1197 1198 1199 1200
            break;
          case 8: {
            UseJspbArrayAnyFormat = input.ReadBool();
            break;
          }
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code