blob: f6118ea2782cb5be23b96db013ee482137b2bc8d [file] [log] [blame]
Austin Schuh40c16522018-10-28 20:27:54 -07001// <auto-generated>
2// Generated by the protocol buffer compiler. DO NOT EDIT!
3// source: conformance.proto
4// </auto-generated>
Brian Silverman9c614bc2016-02-15 20:20:02 -05005#pragma warning disable 1591, 0612, 3021
6#region Designer generated code
7
8using pb = global::Google.Protobuf;
9using pbc = global::Google.Protobuf.Collections;
10using pbr = global::Google.Protobuf.Reflection;
11using scg = global::System.Collections.Generic;
12namespace Conformance {
13
14 /// <summary>Holder for reflection information generated from conformance.proto</summary>
Brian Silverman9c614bc2016-02-15 20:20:02 -050015 public static partial class ConformanceReflection {
16
17 #region Descriptor
18 /// <summary>File descriptor for conformance.proto</summary>
19 public static pbr::FileDescriptor Descriptor {
20 get { return descriptor; }
21 }
22 private static pbr::FileDescriptor descriptor;
23
24 static ConformanceReflection() {
25 byte[] descriptorData = global::System.Convert.FromBase64String(
26 string.Concat(
Austin Schuh40c16522018-10-28 20:27:54 -070027 "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UiowEKEkNvbmZvcm1h",
28 "bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv",
29 "bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY",
30 "AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0EhQKDG1lc3NhZ2VfdHlw",
31 "ZRgEIAEoCUIJCgdwYXlsb2FkIrEBChNDb25mb3JtYW5jZVJlc3BvbnNlEhUK",
32 "C3BhcnNlX2Vycm9yGAEgASgJSAASGQoPc2VyaWFsaXplX2Vycm9yGAYgASgJ",
33 "SAASFwoNcnVudGltZV9lcnJvchgCIAEoCUgAEhoKEHByb3RvYnVmX3BheWxv",
34 "YWQYAyABKAxIABIWCgxqc29uX3BheWxvYWQYBCABKAlIABIRCgdza2lwcGVk",
35 "GAUgASgJSABCCAoGcmVzdWx0KjUKCldpcmVGb3JtYXQSDwoLVU5TUEVDSUZJ",
36 "RUQQABIMCghQUk9UT0JVRhABEggKBEpTT04QAkIhCh9jb20uZ29vZ2xlLnBy",
37 "b3RvYnVmLmNvbmZvcm1hbmNlYgZwcm90bzM="));
Brian Silverman9c614bc2016-02-15 20:20:02 -050038 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Austin Schuh40c16522018-10-28 20:27:54 -070039 new pbr::FileDescriptor[] { },
40 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), }, new pbr::GeneratedClrTypeInfo[] {
41 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceRequest), global::Conformance.ConformanceRequest.Parser, new[]{ "ProtobufPayload", "JsonPayload", "RequestedOutputFormat", "MessageType" }, new[]{ "Payload" }, null, null),
42 new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped" }, new[]{ "Result" }, null, null)
Brian Silverman9c614bc2016-02-15 20:20:02 -050043 }));
44 }
45 #endregion
46
47 }
48 #region Enums
49 public enum WireFormat {
Austin Schuh40c16522018-10-28 20:27:54 -070050 [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
51 [pbr::OriginalName("PROTOBUF")] Protobuf = 1,
52 [pbr::OriginalName("JSON")] Json = 2,
Brian Silverman9c614bc2016-02-15 20:20:02 -050053 }
54
55 #endregion
56
57 #region Messages
58 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -070059 /// Represents a single test case's input. The testee should:
Brian Silverman9c614bc2016-02-15 20:20:02 -050060 ///
Austin Schuh40c16522018-10-28 20:27:54 -070061 /// 1. parse this proto (which should always succeed)
62 /// 2. parse the protobuf or JSON payload in "payload" (which may fail)
63 /// 3. if the parse succeeded, serialize the message in the requested format.
Brian Silverman9c614bc2016-02-15 20:20:02 -050064 /// </summary>
Brian Silverman9c614bc2016-02-15 20:20:02 -050065 public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> {
66 private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest());
Austin Schuh40c16522018-10-28 20:27:54 -070067 private pb::UnknownFieldSet _unknownFields;
68 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -050069 public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } }
70
Austin Schuh40c16522018-10-28 20:27:54 -070071 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -050072 public static pbr::MessageDescriptor Descriptor {
73 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[0]; }
74 }
75
Austin Schuh40c16522018-10-28 20:27:54 -070076 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -050077 pbr::MessageDescriptor pb::IMessage.Descriptor {
78 get { return Descriptor; }
79 }
80
Austin Schuh40c16522018-10-28 20:27:54 -070081 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -050082 public ConformanceRequest() {
83 OnConstruction();
84 }
85
86 partial void OnConstruction();
87
Austin Schuh40c16522018-10-28 20:27:54 -070088 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -050089 public ConformanceRequest(ConformanceRequest other) : this() {
90 requestedOutputFormat_ = other.requestedOutputFormat_;
Austin Schuh40c16522018-10-28 20:27:54 -070091 messageType_ = other.messageType_;
Brian Silverman9c614bc2016-02-15 20:20:02 -050092 switch (other.PayloadCase) {
93 case PayloadOneofCase.ProtobufPayload:
94 ProtobufPayload = other.ProtobufPayload;
95 break;
96 case PayloadOneofCase.JsonPayload:
97 JsonPayload = other.JsonPayload;
98 break;
99 }
100
Austin Schuh40c16522018-10-28 20:27:54 -0700101 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500102 }
103
Austin Schuh40c16522018-10-28 20:27:54 -0700104 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500105 public ConformanceRequest Clone() {
106 return new ConformanceRequest(this);
107 }
108
109 /// <summary>Field number for the "protobuf_payload" field.</summary>
110 public const int ProtobufPayloadFieldNumber = 1;
Austin Schuh40c16522018-10-28 20:27:54 -0700111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500112 public pb::ByteString ProtobufPayload {
113 get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; }
114 set {
115 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
116 payloadCase_ = PayloadOneofCase.ProtobufPayload;
117 }
118 }
119
120 /// <summary>Field number for the "json_payload" field.</summary>
121 public const int JsonPayloadFieldNumber = 2;
Austin Schuh40c16522018-10-28 20:27:54 -0700122 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500123 public string JsonPayload {
124 get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; }
125 set {
126 payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
127 payloadCase_ = PayloadOneofCase.JsonPayload;
128 }
129 }
130
131 /// <summary>Field number for the "requested_output_format" field.</summary>
132 public const int RequestedOutputFormatFieldNumber = 3;
Austin Schuh40c16522018-10-28 20:27:54 -0700133 private global::Conformance.WireFormat requestedOutputFormat_ = 0;
Brian Silverman9c614bc2016-02-15 20:20:02 -0500134 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700135 /// Which format should the testee serialize its message to?
Brian Silverman9c614bc2016-02-15 20:20:02 -0500136 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700137 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500138 public global::Conformance.WireFormat RequestedOutputFormat {
139 get { return requestedOutputFormat_; }
140 set {
141 requestedOutputFormat_ = value;
142 }
143 }
144
Austin Schuh40c16522018-10-28 20:27:54 -0700145 /// <summary>Field number for the "message_type" field.</summary>
146 public const int MessageTypeFieldNumber = 4;
147 private string messageType_ = "";
148 /// <summary>
149 /// The full name for the test message to use; for the moment, either:
150 /// protobuf_test_messages.proto3.TestAllTypesProto3 or
151 /// protobuf_test_messages.proto2.TestAllTypesProto2.
152 /// </summary>
153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
154 public string MessageType {
155 get { return messageType_; }
156 set {
157 messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
158 }
159 }
160
Brian Silverman9c614bc2016-02-15 20:20:02 -0500161 private object payload_;
162 /// <summary>Enum of possible cases for the "payload" oneof.</summary>
163 public enum PayloadOneofCase {
164 None = 0,
165 ProtobufPayload = 1,
166 JsonPayload = 2,
167 }
168 private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
Austin Schuh40c16522018-10-28 20:27:54 -0700169 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500170 public PayloadOneofCase PayloadCase {
171 get { return payloadCase_; }
172 }
173
Austin Schuh40c16522018-10-28 20:27:54 -0700174 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500175 public void ClearPayload() {
176 payloadCase_ = PayloadOneofCase.None;
177 payload_ = null;
178 }
179
Austin Schuh40c16522018-10-28 20:27:54 -0700180 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500181 public override bool Equals(object other) {
182 return Equals(other as ConformanceRequest);
183 }
184
Austin Schuh40c16522018-10-28 20:27:54 -0700185 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500186 public bool Equals(ConformanceRequest other) {
187 if (ReferenceEquals(other, null)) {
188 return false;
189 }
190 if (ReferenceEquals(other, this)) {
191 return true;
192 }
193 if (ProtobufPayload != other.ProtobufPayload) return false;
194 if (JsonPayload != other.JsonPayload) return false;
195 if (RequestedOutputFormat != other.RequestedOutputFormat) return false;
Austin Schuh40c16522018-10-28 20:27:54 -0700196 if (MessageType != other.MessageType) return false;
Brian Silverman9c614bc2016-02-15 20:20:02 -0500197 if (PayloadCase != other.PayloadCase) return false;
Austin Schuh40c16522018-10-28 20:27:54 -0700198 return Equals(_unknownFields, other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500199 }
200
Austin Schuh40c16522018-10-28 20:27:54 -0700201 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500202 public override int GetHashCode() {
203 int hash = 1;
204 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
205 if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
Austin Schuh40c16522018-10-28 20:27:54 -0700206 if (RequestedOutputFormat != 0) hash ^= RequestedOutputFormat.GetHashCode();
207 if (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
Brian Silverman9c614bc2016-02-15 20:20:02 -0500208 hash ^= (int) payloadCase_;
Austin Schuh40c16522018-10-28 20:27:54 -0700209 if (_unknownFields != null) {
210 hash ^= _unknownFields.GetHashCode();
211 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500212 return hash;
213 }
214
Austin Schuh40c16522018-10-28 20:27:54 -0700215 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500216 public override string ToString() {
217 return pb::JsonFormatter.ToDiagnosticString(this);
218 }
219
Austin Schuh40c16522018-10-28 20:27:54 -0700220 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500221 public void WriteTo(pb::CodedOutputStream output) {
222 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
223 output.WriteRawTag(10);
224 output.WriteBytes(ProtobufPayload);
225 }
226 if (payloadCase_ == PayloadOneofCase.JsonPayload) {
227 output.WriteRawTag(18);
228 output.WriteString(JsonPayload);
229 }
Austin Schuh40c16522018-10-28 20:27:54 -0700230 if (RequestedOutputFormat != 0) {
Brian Silverman9c614bc2016-02-15 20:20:02 -0500231 output.WriteRawTag(24);
232 output.WriteEnum((int) RequestedOutputFormat);
233 }
Austin Schuh40c16522018-10-28 20:27:54 -0700234 if (MessageType.Length != 0) {
235 output.WriteRawTag(34);
236 output.WriteString(MessageType);
237 }
238 if (_unknownFields != null) {
239 _unknownFields.WriteTo(output);
240 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500241 }
242
Austin Schuh40c16522018-10-28 20:27:54 -0700243 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500244 public int CalculateSize() {
245 int size = 0;
246 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
247 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
248 }
249 if (payloadCase_ == PayloadOneofCase.JsonPayload) {
250 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
251 }
Austin Schuh40c16522018-10-28 20:27:54 -0700252 if (RequestedOutputFormat != 0) {
Brian Silverman9c614bc2016-02-15 20:20:02 -0500253 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat);
254 }
Austin Schuh40c16522018-10-28 20:27:54 -0700255 if (MessageType.Length != 0) {
256 size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType);
257 }
258 if (_unknownFields != null) {
259 size += _unknownFields.CalculateSize();
260 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500261 return size;
262 }
263
Austin Schuh40c16522018-10-28 20:27:54 -0700264 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500265 public void MergeFrom(ConformanceRequest other) {
266 if (other == null) {
267 return;
268 }
Austin Schuh40c16522018-10-28 20:27:54 -0700269 if (other.RequestedOutputFormat != 0) {
Brian Silverman9c614bc2016-02-15 20:20:02 -0500270 RequestedOutputFormat = other.RequestedOutputFormat;
271 }
Austin Schuh40c16522018-10-28 20:27:54 -0700272 if (other.MessageType.Length != 0) {
273 MessageType = other.MessageType;
274 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500275 switch (other.PayloadCase) {
276 case PayloadOneofCase.ProtobufPayload:
277 ProtobufPayload = other.ProtobufPayload;
278 break;
279 case PayloadOneofCase.JsonPayload:
280 JsonPayload = other.JsonPayload;
281 break;
282 }
283
Austin Schuh40c16522018-10-28 20:27:54 -0700284 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500285 }
286
Austin Schuh40c16522018-10-28 20:27:54 -0700287 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500288 public void MergeFrom(pb::CodedInputStream input) {
289 uint tag;
290 while ((tag = input.ReadTag()) != 0) {
291 switch(tag) {
292 default:
Austin Schuh40c16522018-10-28 20:27:54 -0700293 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500294 break;
295 case 10: {
296 ProtobufPayload = input.ReadBytes();
297 break;
298 }
299 case 18: {
300 JsonPayload = input.ReadString();
301 break;
302 }
303 case 24: {
304 requestedOutputFormat_ = (global::Conformance.WireFormat) input.ReadEnum();
305 break;
306 }
Austin Schuh40c16522018-10-28 20:27:54 -0700307 case 34: {
308 MessageType = input.ReadString();
309 break;
310 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500311 }
312 }
313 }
314
315 }
316
317 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700318 /// Represents a single test case's output.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500319 /// </summary>
Brian Silverman9c614bc2016-02-15 20:20:02 -0500320 public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> {
321 private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse());
Austin Schuh40c16522018-10-28 20:27:54 -0700322 private pb::UnknownFieldSet _unknownFields;
323 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500324 public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } }
325
Austin Schuh40c16522018-10-28 20:27:54 -0700326 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500327 public static pbr::MessageDescriptor Descriptor {
328 get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[1]; }
329 }
330
Austin Schuh40c16522018-10-28 20:27:54 -0700331 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500332 pbr::MessageDescriptor pb::IMessage.Descriptor {
333 get { return Descriptor; }
334 }
335
Austin Schuh40c16522018-10-28 20:27:54 -0700336 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500337 public ConformanceResponse() {
338 OnConstruction();
339 }
340
341 partial void OnConstruction();
342
Austin Schuh40c16522018-10-28 20:27:54 -0700343 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500344 public ConformanceResponse(ConformanceResponse other) : this() {
345 switch (other.ResultCase) {
346 case ResultOneofCase.ParseError:
347 ParseError = other.ParseError;
348 break;
349 case ResultOneofCase.SerializeError:
350 SerializeError = other.SerializeError;
351 break;
352 case ResultOneofCase.RuntimeError:
353 RuntimeError = other.RuntimeError;
354 break;
355 case ResultOneofCase.ProtobufPayload:
356 ProtobufPayload = other.ProtobufPayload;
357 break;
358 case ResultOneofCase.JsonPayload:
359 JsonPayload = other.JsonPayload;
360 break;
361 case ResultOneofCase.Skipped:
362 Skipped = other.Skipped;
363 break;
364 }
365
Austin Schuh40c16522018-10-28 20:27:54 -0700366 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500367 }
368
Austin Schuh40c16522018-10-28 20:27:54 -0700369 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500370 public ConformanceResponse Clone() {
371 return new ConformanceResponse(this);
372 }
373
374 /// <summary>Field number for the "parse_error" field.</summary>
375 public const int ParseErrorFieldNumber = 1;
376 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700377 /// This string should be set to indicate parsing failed. The string can
378 /// provide more information about the parse error if it is available.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500379 ///
Austin Schuh40c16522018-10-28 20:27:54 -0700380 /// Setting this string does not necessarily mean the testee failed the
381 /// test. Some of the test cases are intentionally invalid input.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500382 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700383 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500384 public string ParseError {
385 get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; }
386 set {
387 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
388 resultCase_ = ResultOneofCase.ParseError;
389 }
390 }
391
392 /// <summary>Field number for the "serialize_error" field.</summary>
393 public const int SerializeErrorFieldNumber = 6;
394 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700395 /// If the input was successfully parsed but errors occurred when
396 /// serializing it to the requested output format, set the error message in
397 /// this field.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500398 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700399 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500400 public string SerializeError {
401 get { return resultCase_ == ResultOneofCase.SerializeError ? (string) result_ : ""; }
402 set {
403 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
404 resultCase_ = ResultOneofCase.SerializeError;
405 }
406 }
407
408 /// <summary>Field number for the "runtime_error" field.</summary>
409 public const int RuntimeErrorFieldNumber = 2;
410 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700411 /// This should be set if some other error occurred. This will always
412 /// indicate that the test failed. The string can provide more information
413 /// about the failure.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500414 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700415 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500416 public string RuntimeError {
417 get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; }
418 set {
419 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
420 resultCase_ = ResultOneofCase.RuntimeError;
421 }
422 }
423
424 /// <summary>Field number for the "protobuf_payload" field.</summary>
425 public const int ProtobufPayloadFieldNumber = 3;
426 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700427 /// If the input was successfully parsed and the requested output was
428 /// protobuf, serialize it to protobuf and set it in this field.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500429 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500431 public pb::ByteString ProtobufPayload {
432 get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; }
433 set {
434 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
435 resultCase_ = ResultOneofCase.ProtobufPayload;
436 }
437 }
438
439 /// <summary>Field number for the "json_payload" field.</summary>
440 public const int JsonPayloadFieldNumber = 4;
441 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700442 /// If the input was successfully parsed and the requested output was JSON,
443 /// serialize to JSON and set it in this field.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500444 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700445 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500446 public string JsonPayload {
447 get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; }
448 set {
449 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
450 resultCase_ = ResultOneofCase.JsonPayload;
451 }
452 }
453
454 /// <summary>Field number for the "skipped" field.</summary>
455 public const int SkippedFieldNumber = 5;
456 /// <summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700457 /// For when the testee skipped the test, likely because a certain feature
458 /// wasn't supported, like JSON input/output.
Brian Silverman9c614bc2016-02-15 20:20:02 -0500459 /// </summary>
Austin Schuh40c16522018-10-28 20:27:54 -0700460 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500461 public string Skipped {
462 get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; }
463 set {
464 result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
465 resultCase_ = ResultOneofCase.Skipped;
466 }
467 }
468
469 private object result_;
470 /// <summary>Enum of possible cases for the "result" oneof.</summary>
471 public enum ResultOneofCase {
472 None = 0,
473 ParseError = 1,
474 SerializeError = 6,
475 RuntimeError = 2,
476 ProtobufPayload = 3,
477 JsonPayload = 4,
478 Skipped = 5,
479 }
480 private ResultOneofCase resultCase_ = ResultOneofCase.None;
Austin Schuh40c16522018-10-28 20:27:54 -0700481 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500482 public ResultOneofCase ResultCase {
483 get { return resultCase_; }
484 }
485
Austin Schuh40c16522018-10-28 20:27:54 -0700486 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500487 public void ClearResult() {
488 resultCase_ = ResultOneofCase.None;
489 result_ = null;
490 }
491
Austin Schuh40c16522018-10-28 20:27:54 -0700492 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500493 public override bool Equals(object other) {
494 return Equals(other as ConformanceResponse);
495 }
496
Austin Schuh40c16522018-10-28 20:27:54 -0700497 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500498 public bool Equals(ConformanceResponse other) {
499 if (ReferenceEquals(other, null)) {
500 return false;
501 }
502 if (ReferenceEquals(other, this)) {
503 return true;
504 }
505 if (ParseError != other.ParseError) return false;
506 if (SerializeError != other.SerializeError) return false;
507 if (RuntimeError != other.RuntimeError) return false;
508 if (ProtobufPayload != other.ProtobufPayload) return false;
509 if (JsonPayload != other.JsonPayload) return false;
510 if (Skipped != other.Skipped) return false;
511 if (ResultCase != other.ResultCase) return false;
Austin Schuh40c16522018-10-28 20:27:54 -0700512 return Equals(_unknownFields, other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500513 }
514
Austin Schuh40c16522018-10-28 20:27:54 -0700515 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500516 public override int GetHashCode() {
517 int hash = 1;
518 if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode();
519 if (resultCase_ == ResultOneofCase.SerializeError) hash ^= SerializeError.GetHashCode();
520 if (resultCase_ == ResultOneofCase.RuntimeError) hash ^= RuntimeError.GetHashCode();
521 if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
522 if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
523 if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode();
524 hash ^= (int) resultCase_;
Austin Schuh40c16522018-10-28 20:27:54 -0700525 if (_unknownFields != null) {
526 hash ^= _unknownFields.GetHashCode();
527 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500528 return hash;
529 }
530
Austin Schuh40c16522018-10-28 20:27:54 -0700531 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500532 public override string ToString() {
533 return pb::JsonFormatter.ToDiagnosticString(this);
534 }
535
Austin Schuh40c16522018-10-28 20:27:54 -0700536 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500537 public void WriteTo(pb::CodedOutputStream output) {
538 if (resultCase_ == ResultOneofCase.ParseError) {
539 output.WriteRawTag(10);
540 output.WriteString(ParseError);
541 }
542 if (resultCase_ == ResultOneofCase.RuntimeError) {
543 output.WriteRawTag(18);
544 output.WriteString(RuntimeError);
545 }
546 if (resultCase_ == ResultOneofCase.ProtobufPayload) {
547 output.WriteRawTag(26);
548 output.WriteBytes(ProtobufPayload);
549 }
550 if (resultCase_ == ResultOneofCase.JsonPayload) {
551 output.WriteRawTag(34);
552 output.WriteString(JsonPayload);
553 }
554 if (resultCase_ == ResultOneofCase.Skipped) {
555 output.WriteRawTag(42);
556 output.WriteString(Skipped);
557 }
558 if (resultCase_ == ResultOneofCase.SerializeError) {
559 output.WriteRawTag(50);
560 output.WriteString(SerializeError);
561 }
Austin Schuh40c16522018-10-28 20:27:54 -0700562 if (_unknownFields != null) {
563 _unknownFields.WriteTo(output);
564 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500565 }
566
Austin Schuh40c16522018-10-28 20:27:54 -0700567 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500568 public int CalculateSize() {
569 int size = 0;
570 if (resultCase_ == ResultOneofCase.ParseError) {
571 size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError);
572 }
573 if (resultCase_ == ResultOneofCase.SerializeError) {
574 size += 1 + pb::CodedOutputStream.ComputeStringSize(SerializeError);
575 }
576 if (resultCase_ == ResultOneofCase.RuntimeError) {
577 size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError);
578 }
579 if (resultCase_ == ResultOneofCase.ProtobufPayload) {
580 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
581 }
582 if (resultCase_ == ResultOneofCase.JsonPayload) {
583 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
584 }
585 if (resultCase_ == ResultOneofCase.Skipped) {
586 size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped);
587 }
Austin Schuh40c16522018-10-28 20:27:54 -0700588 if (_unknownFields != null) {
589 size += _unknownFields.CalculateSize();
590 }
Brian Silverman9c614bc2016-02-15 20:20:02 -0500591 return size;
592 }
593
Austin Schuh40c16522018-10-28 20:27:54 -0700594 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500595 public void MergeFrom(ConformanceResponse other) {
596 if (other == null) {
597 return;
598 }
599 switch (other.ResultCase) {
600 case ResultOneofCase.ParseError:
601 ParseError = other.ParseError;
602 break;
603 case ResultOneofCase.SerializeError:
604 SerializeError = other.SerializeError;
605 break;
606 case ResultOneofCase.RuntimeError:
607 RuntimeError = other.RuntimeError;
608 break;
609 case ResultOneofCase.ProtobufPayload:
610 ProtobufPayload = other.ProtobufPayload;
611 break;
612 case ResultOneofCase.JsonPayload:
613 JsonPayload = other.JsonPayload;
614 break;
615 case ResultOneofCase.Skipped:
616 Skipped = other.Skipped;
617 break;
618 }
619
Austin Schuh40c16522018-10-28 20:27:54 -0700620 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500621 }
622
Austin Schuh40c16522018-10-28 20:27:54 -0700623 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Brian Silverman9c614bc2016-02-15 20:20:02 -0500624 public void MergeFrom(pb::CodedInputStream input) {
625 uint tag;
626 while ((tag = input.ReadTag()) != 0) {
627 switch(tag) {
628 default:
Austin Schuh40c16522018-10-28 20:27:54 -0700629 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
Brian Silverman9c614bc2016-02-15 20:20:02 -0500630 break;
631 case 10: {
632 ParseError = input.ReadString();
633 break;
634 }
635 case 18: {
636 RuntimeError = input.ReadString();
637 break;
638 }
639 case 26: {
640 ProtobufPayload = input.ReadBytes();
641 break;
642 }
643 case 34: {
644 JsonPayload = input.ReadString();
645 break;
646 }
647 case 42: {
648 Skipped = input.ReadString();
649 break;
650 }
651 case 50: {
652 SerializeError = input.ReadString();
653 break;
654 }
655 }
656 }
657 }
658
659 }
660
Brian Silverman9c614bc2016-02-15 20:20:02 -0500661 #endregion
662
663}
664
665#endregion Designer generated code