blob: e905d4e4e1120df30f5240839ca4302eb9aa2a42 [file] [log] [blame]
Jon Skeet044c36e2015-08-04 09:25:38 +01001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: conformance.proto
3#pragma warning disable 1591, 0612, 3021
4#region Designer generated code
5
6using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
8using pbr = global::Google.Protobuf.Reflection;
9using scg = global::System.Collections.Generic;
10namespace Conformance {
11
12 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
13 public static partial class Conformance {
14
15 #region Descriptor
16 public static pbr::FileDescriptor Descriptor {
17 get { return descriptor; }
18 }
19 private static pbr::FileDescriptor descriptor;
20
21 static Conformance() {
22 byte[] descriptorData = global::System.Convert.FromBase64String(
23 string.Concat(
24 "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UijQEKEkNvbmZvcm1h",
25 "bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv",
26 "bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY",
27 "AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0QgkKB3BheWxvYWQilgEK",
28 "E0NvbmZvcm1hbmNlUmVzcG9uc2USFQoLcGFyc2VfZXJyb3IYASABKAlIABIX",
29 "Cg1ydW50aW1lX2Vycm9yGAIgASgJSAASGgoQcHJvdG9idWZfcGF5bG9hZBgD",
30 "IAEoDEgAEhYKDGpzb25fcGF5bG9hZBgEIAEoCUgAEhEKB3NraXBwZWQYBSAB",
31 "KAlIAEIICgZyZXN1bHQi6yIKDFRlc3RBbGxUeXBlcxIWCg5vcHRpb25hbF9p",
32 "bnQzMhgBIAEoBRIWCg5vcHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25h",
33 "bF91aW50MzIYAyABKA0SFwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29w",
34 "dGlvbmFsX3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klFRBAAEgwKCFBST1RP",
132 "QlVGEAESCAoESlNPThACKkAKC0ZvcmVpZ25FbnVtEg8KC0ZPUkVJR05fRk9P",
133 "EAASDwoLRk9SRUlHTl9CQVIQARIPCgtGT1JFSUdOX0JBWhACQiEKH2NvbS5n",
134 "b29nbGUucHJvdG9idWYuY29uZm9ybWFuY2ViBnByb3RvMw=="));
135 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
136 new pbr::FileDescriptor[] { },
137 new pbr::GeneratedCodeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.ForeignEnum), }, new pbr::GeneratedCodeInfo[] {
138 new pbr::GeneratedCodeInfo(typeof(global::Conformance.ConformanceRequest), new[]{ "ProtobufPayload", "JsonPayload", "RequestedOutputFormat" }, new[]{ "Payload" }, null, null),
139 new pbr::GeneratedCodeInfo(typeof(global::Conformance.ConformanceResponse), new[]{ "ParseError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped" }, new[]{ "Result" }, null, null),
140 new pbr::GeneratedCodeInfo(typeof(global::Conformance.TestAllTypes), new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Conformance.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Conformance.TestAllTypes.Types.NestedMessage), new[]{ "A", "Corecursive" }, null, null, null),
141 null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
142 new pbr::GeneratedCodeInfo(typeof(global::Conformance.ForeignMessage), new[]{ "C" }, null, null, null)
143 }));
144 }
145 #endregion
146
147 }
148 #region Enums
149 public enum WireFormat {
150 UNSPECIFIED = 0,
151 PROTOBUF = 1,
152 JSON = 2,
153 }
154
155 public enum ForeignEnum {
156 FOREIGN_FOO = 0,
157 FOREIGN_BAR = 1,
158 FOREIGN_BAZ = 2,
159 }
160
161 #endregion
162
163 #region Messages
164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
165 public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> {
166 private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest());
167 public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } }
168
169 public static pbr::MessageDescriptor Descriptor {
170 get { return global::Conformance.Conformance.Descriptor.MessageTypes[0]; }
171 }
172
173 pbr::MessageDescriptor pb::IMessage.Descriptor {
174 get { return Descriptor; }
175 }
176
177 public ConformanceRequest() {
178 OnConstruction();
179 }
180
181 partial void OnConstruction();
182
183 public ConformanceRequest(ConformanceRequest other) : this() {
184 requestedOutputFormat_ = other.requestedOutputFormat_;
185 switch (other.PayloadCase) {
186 case PayloadOneofCase.ProtobufPayload:
187 ProtobufPayload = other.ProtobufPayload;
188 break;
189 case PayloadOneofCase.JsonPayload:
190 JsonPayload = other.JsonPayload;
191 break;
192 }
193
194 }
195
196 public ConformanceRequest Clone() {
197 return new ConformanceRequest(this);
198 }
199
200 public const int ProtobufPayloadFieldNumber = 1;
201 public pb::ByteString ProtobufPayload {
202 get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; }
203 set {
204 payload_ = pb::Preconditions.CheckNotNull(value, "value");
205 payloadCase_ = PayloadOneofCase.ProtobufPayload;
206 }
207 }
208
209 public const int JsonPayloadFieldNumber = 2;
210 public string JsonPayload {
211 get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; }
212 set {
213 payload_ = pb::Preconditions.CheckNotNull(value, "value");
214 payloadCase_ = PayloadOneofCase.JsonPayload;
215 }
216 }
217
218 public const int RequestedOutputFormatFieldNumber = 3;
219 private global::Conformance.WireFormat requestedOutputFormat_ = global::Conformance.WireFormat.UNSPECIFIED;
220 public global::Conformance.WireFormat RequestedOutputFormat {
221 get { return requestedOutputFormat_; }
222 set {
223 requestedOutputFormat_ = value;
224 }
225 }
226
227 private object payload_;
228 public enum PayloadOneofCase {
229 None = 0,
230 ProtobufPayload = 1,
231 JsonPayload = 2,
232 }
233 private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
234 public PayloadOneofCase PayloadCase {
235 get { return payloadCase_; }
236 }
237
238 public void ClearPayload() {
239 payloadCase_ = PayloadOneofCase.None;
240 payload_ = null;
241 }
242
243 public override bool Equals(object other) {
244 return Equals(other as ConformanceRequest);
245 }
246
247 public bool Equals(ConformanceRequest other) {
248 if (ReferenceEquals(other, null)) {
249 return false;
250 }
251 if (ReferenceEquals(other, this)) {
252 return true;
253 }
254 if (ProtobufPayload != other.ProtobufPayload) return false;
255 if (JsonPayload != other.JsonPayload) return false;
256 if (RequestedOutputFormat != other.RequestedOutputFormat) return false;
257 return true;
258 }
259
260 public override int GetHashCode() {
261 int hash = 1;
262 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
263 if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
264 if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) hash ^= RequestedOutputFormat.GetHashCode();
265 return hash;
266 }
267
268 public override string ToString() {
269 return pb::JsonFormatter.Default.Format(this);
270 }
271
272 public void WriteTo(pb::CodedOutputStream output) {
273 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
274 output.WriteRawTag(10);
275 output.WriteBytes(ProtobufPayload);
276 }
277 if (payloadCase_ == PayloadOneofCase.JsonPayload) {
278 output.WriteRawTag(18);
279 output.WriteString(JsonPayload);
280 }
281 if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) {
282 output.WriteRawTag(24);
283 output.WriteEnum((int) RequestedOutputFormat);
284 }
285 }
286
287 public int CalculateSize() {
288 int size = 0;
289 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) {
290 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
291 }
292 if (payloadCase_ == PayloadOneofCase.JsonPayload) {
293 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
294 }
295 if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) {
296 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat);
297 }
298 return size;
299 }
300
301 public void MergeFrom(ConformanceRequest other) {
302 if (other == null) {
303 return;
304 }
305 if (other.RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) {
306 RequestedOutputFormat = other.RequestedOutputFormat;
307 }
308 switch (other.PayloadCase) {
309 case PayloadOneofCase.ProtobufPayload:
310 ProtobufPayload = other.ProtobufPayload;
311 break;
312 case PayloadOneofCase.JsonPayload:
313 JsonPayload = other.JsonPayload;
314 break;
315 }
316
317 }
318
319 public void MergeFrom(pb::CodedInputStream input) {
320 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100321 while ((tag = input.ReadTag()) != 0) {
Jon Skeet044c36e2015-08-04 09:25:38 +0100322 switch(tag) {
Jon Skeet044c36e2015-08-04 09:25:38 +0100323 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100324 input.SkipLastField();
Jon Skeet044c36e2015-08-04 09:25:38 +0100325 break;
326 case 10: {
327 ProtobufPayload = input.ReadBytes();
328 break;
329 }
330 case 18: {
331 JsonPayload = input.ReadString();
332 break;
333 }
334 case 24: {
335 requestedOutputFormat_ = (global::Conformance.WireFormat) input.ReadEnum();
336 break;
337 }
338 }
339 }
340 }
341
342 }
343
344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
345 public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> {
346 private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse());
347 public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } }
348
349 public static pbr::MessageDescriptor Descriptor {
350 get { return global::Conformance.Conformance.Descriptor.MessageTypes[1]; }
351 }
352
353 pbr::MessageDescriptor pb::IMessage.Descriptor {
354 get { return Descriptor; }
355 }
356
357 public ConformanceResponse() {
358 OnConstruction();
359 }
360
361 partial void OnConstruction();
362
363 public ConformanceResponse(ConformanceResponse other) : this() {
364 switch (other.ResultCase) {
365 case ResultOneofCase.ParseError:
366 ParseError = other.ParseError;
367 break;
368 case ResultOneofCase.RuntimeError:
369 RuntimeError = other.RuntimeError;
370 break;
371 case ResultOneofCase.ProtobufPayload:
372 ProtobufPayload = other.ProtobufPayload;
373 break;
374 case ResultOneofCase.JsonPayload:
375 JsonPayload = other.JsonPayload;
376 break;
377 case ResultOneofCase.Skipped:
378 Skipped = other.Skipped;
379 break;
380 }
381
382 }
383
384 public ConformanceResponse Clone() {
385 return new ConformanceResponse(this);
386 }
387
388 public const int ParseErrorFieldNumber = 1;
389 public string ParseError {
390 get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; }
391 set {
392 result_ = pb::Preconditions.CheckNotNull(value, "value");
393 resultCase_ = ResultOneofCase.ParseError;
394 }
395 }
396
397 public const int RuntimeErrorFieldNumber = 2;
398 public string RuntimeError {
399 get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; }
400 set {
401 result_ = pb::Preconditions.CheckNotNull(value, "value");
402 resultCase_ = ResultOneofCase.RuntimeError;
403 }
404 }
405
406 public const int ProtobufPayloadFieldNumber = 3;
407 public pb::ByteString ProtobufPayload {
408 get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; }
409 set {
410 result_ = pb::Preconditions.CheckNotNull(value, "value");
411 resultCase_ = ResultOneofCase.ProtobufPayload;
412 }
413 }
414
415 public const int JsonPayloadFieldNumber = 4;
416 public string JsonPayload {
417 get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; }
418 set {
419 result_ = pb::Preconditions.CheckNotNull(value, "value");
420 resultCase_ = ResultOneofCase.JsonPayload;
421 }
422 }
423
424 public const int SkippedFieldNumber = 5;
425 public string Skipped {
426 get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; }
427 set {
428 result_ = pb::Preconditions.CheckNotNull(value, "value");
429 resultCase_ = ResultOneofCase.Skipped;
430 }
431 }
432
433 private object result_;
434 public enum ResultOneofCase {
435 None = 0,
436 ParseError = 1,
437 RuntimeError = 2,
438 ProtobufPayload = 3,
439 JsonPayload = 4,
440 Skipped = 5,
441 }
442 private ResultOneofCase resultCase_ = ResultOneofCase.None;
443 public ResultOneofCase ResultCase {
444 get { return resultCase_; }
445 }
446
447 public void ClearResult() {
448 resultCase_ = ResultOneofCase.None;
449 result_ = null;
450 }
451
452 public override bool Equals(object other) {
453 return Equals(other as ConformanceResponse);
454 }
455
456 public bool Equals(ConformanceResponse other) {
457 if (ReferenceEquals(other, null)) {
458 return false;
459 }
460 if (ReferenceEquals(other, this)) {
461 return true;
462 }
463 if (ParseError != other.ParseError) return false;
464 if (RuntimeError != other.RuntimeError) return false;
465 if (ProtobufPayload != other.ProtobufPayload) return false;
466 if (JsonPayload != other.JsonPayload) return false;
467 if (Skipped != other.Skipped) return false;
468 return true;
469 }
470
471 public override int GetHashCode() {
472 int hash = 1;
473 if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode();
474 if (resultCase_ == ResultOneofCase.RuntimeError) hash ^= RuntimeError.GetHashCode();
475 if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
476 if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode();
477 if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode();
478 return hash;
479 }
480
481 public override string ToString() {
482 return pb::JsonFormatter.Default.Format(this);
483 }
484
485 public void WriteTo(pb::CodedOutputStream output) {
486 if (resultCase_ == ResultOneofCase.ParseError) {
487 output.WriteRawTag(10);
488 output.WriteString(ParseError);
489 }
490 if (resultCase_ == ResultOneofCase.RuntimeError) {
491 output.WriteRawTag(18);
492 output.WriteString(RuntimeError);
493 }
494 if (resultCase_ == ResultOneofCase.ProtobufPayload) {
495 output.WriteRawTag(26);
496 output.WriteBytes(ProtobufPayload);
497 }
498 if (resultCase_ == ResultOneofCase.JsonPayload) {
499 output.WriteRawTag(34);
500 output.WriteString(JsonPayload);
501 }
502 if (resultCase_ == ResultOneofCase.Skipped) {
503 output.WriteRawTag(42);
504 output.WriteString(Skipped);
505 }
506 }
507
508 public int CalculateSize() {
509 int size = 0;
510 if (resultCase_ == ResultOneofCase.ParseError) {
511 size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError);
512 }
513 if (resultCase_ == ResultOneofCase.RuntimeError) {
514 size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError);
515 }
516 if (resultCase_ == ResultOneofCase.ProtobufPayload) {
517 size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
518 }
519 if (resultCase_ == ResultOneofCase.JsonPayload) {
520 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
521 }
522 if (resultCase_ == ResultOneofCase.Skipped) {
523 size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped);
524 }
525 return size;
526 }
527
528 public void MergeFrom(ConformanceResponse other) {
529 if (other == null) {
530 return;
531 }
532 switch (other.ResultCase) {
533 case ResultOneofCase.ParseError:
534 ParseError = other.ParseError;
535 break;
536 case ResultOneofCase.RuntimeError:
537 RuntimeError = other.RuntimeError;
538 break;
539 case ResultOneofCase.ProtobufPayload:
540 ProtobufPayload = other.ProtobufPayload;
541 break;
542 case ResultOneofCase.JsonPayload:
543 JsonPayload = other.JsonPayload;
544 break;
545 case ResultOneofCase.Skipped:
546 Skipped = other.Skipped;
547 break;
548 }
549
550 }
551
552 public void MergeFrom(pb::CodedInputStream input) {
553 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100554 while ((tag = input.ReadTag()) != 0) {
Jon Skeet044c36e2015-08-04 09:25:38 +0100555 switch(tag) {
Jon Skeet044c36e2015-08-04 09:25:38 +0100556 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100557 input.SkipLastField();
Jon Skeet044c36e2015-08-04 09:25:38 +0100558 break;
559 case 10: {
560 ParseError = input.ReadString();
561 break;
562 }
563 case 18: {
564 RuntimeError = input.ReadString();
565 break;
566 }
567 case 26: {
568 ProtobufPayload = input.ReadBytes();
569 break;
570 }
571 case 34: {
572 JsonPayload = input.ReadString();
573 break;
574 }
575 case 42: {
576 Skipped = input.ReadString();
577 break;
578 }
579 }
580 }
581 }
582
583 }
584
585 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
586 public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
587 private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
588 public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
589
590 public static pbr::MessageDescriptor Descriptor {
591 get { return global::Conformance.Conformance.Descriptor.MessageTypes[2]; }
592 }
593
594 pbr::MessageDescriptor pb::IMessage.Descriptor {
595 get { return Descriptor; }
596 }
597
598 public TestAllTypes() {
599 OnConstruction();
600 }
601
602 partial void OnConstruction();
603
604 public TestAllTypes(TestAllTypes other) : this() {
605 optionalInt32_ = other.optionalInt32_;
606 optionalInt64_ = other.optionalInt64_;
607 optionalUint32_ = other.optionalUint32_;
608 optionalUint64_ = other.optionalUint64_;
609 optionalSint32_ = other.optionalSint32_;
610 optionalSint64_ = other.optionalSint64_;
611 optionalFixed32_ = other.optionalFixed32_;
612 optionalFixed64_ = other.optionalFixed64_;
613 optionalSfixed32_ = other.optionalSfixed32_;
614 optionalSfixed64_ = other.optionalSfixed64_;
615 optionalFloat_ = other.optionalFloat_;
616 optionalDouble_ = other.optionalDouble_;
617 optionalBool_ = other.optionalBool_;
618 optionalString_ = other.optionalString_;
619 optionalBytes_ = other.optionalBytes_;
620 OptionalNestedMessage = other.optionalNestedMessage_ != null ? other.OptionalNestedMessage.Clone() : null;
621 OptionalForeignMessage = other.optionalForeignMessage_ != null ? other.OptionalForeignMessage.Clone() : null;
622 optionalNestedEnum_ = other.optionalNestedEnum_;
623 optionalForeignEnum_ = other.optionalForeignEnum_;
624 optionalStringPiece_ = other.optionalStringPiece_;
625 optionalCord_ = other.optionalCord_;
626 RecursiveMessage = other.recursiveMessage_ != null ? other.RecursiveMessage.Clone() : null;
627 repeatedInt32_ = other.repeatedInt32_.Clone();
628 repeatedInt64_ = other.repeatedInt64_.Clone();
629 repeatedUint32_ = other.repeatedUint32_.Clone();
630 repeatedUint64_ = other.repeatedUint64_.Clone();
631 repeatedSint32_ = other.repeatedSint32_.Clone();
632 repeatedSint64_ = other.repeatedSint64_.Clone();
633 repeatedFixed32_ = other.repeatedFixed32_.Clone();
634 repeatedFixed64_ = other.repeatedFixed64_.Clone();
635 repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
636 repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
637 repeatedFloat_ = other.repeatedFloat_.Clone();
638 repeatedDouble_ = other.repeatedDouble_.Clone();
639 repeatedBool_ = other.repeatedBool_.Clone();
640 repeatedString_ = other.repeatedString_.Clone();
641 repeatedBytes_ = other.repeatedBytes_.Clone();
642 repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
643 repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
644 repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
645 repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
646 repeatedStringPiece_ = other.repeatedStringPiece_.Clone();
647 repeatedCord_ = other.repeatedCord_.Clone();
648 mapInt32Int32_ = other.mapInt32Int32_.Clone();
649 mapInt64Int64_ = other.mapInt64Int64_.Clone();
650 mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
651 mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
652 mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
653 mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
654 mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
655 mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
656 mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
657 mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
658 mapInt32Float_ = other.mapInt32Float_.Clone();
659 mapInt32Double_ = other.mapInt32Double_.Clone();
660 mapBoolBool_ = other.mapBoolBool_.Clone();
661 mapStringString_ = other.mapStringString_.Clone();
662 mapStringBytes_ = other.mapStringBytes_.Clone();
663 mapStringNestedMessage_ = other.mapStringNestedMessage_.Clone();
664 mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone();
665 mapStringNestedEnum_ = other.mapStringNestedEnum_.Clone();
666 mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone();
667 switch (other.OneofFieldCase) {
668 case OneofFieldOneofCase.OneofUint32:
669 OneofUint32 = other.OneofUint32;
670 break;
671 case OneofFieldOneofCase.OneofNestedMessage:
672 OneofNestedMessage = other.OneofNestedMessage.Clone();
673 break;
674 case OneofFieldOneofCase.OneofString:
675 OneofString = other.OneofString;
676 break;
677 case OneofFieldOneofCase.OneofBytes:
678 OneofBytes = other.OneofBytes;
679 break;
680 }
681
682 }
683
684 public TestAllTypes Clone() {
685 return new TestAllTypes(this);
686 }
687
688 public const int OptionalInt32FieldNumber = 1;
689 private int optionalInt32_;
690 public int OptionalInt32 {
691 get { return optionalInt32_; }
692 set {
693 optionalInt32_ = value;
694 }
695 }
696
697 public const int OptionalInt64FieldNumber = 2;
698 private long optionalInt64_;
699 public long OptionalInt64 {
700 get { return optionalInt64_; }
701 set {
702 optionalInt64_ = value;
703 }
704 }
705
706 public const int OptionalUint32FieldNumber = 3;
707 private uint optionalUint32_;
708 public uint OptionalUint32 {
709 get { return optionalUint32_; }
710 set {
711 optionalUint32_ = value;
712 }
713 }
714
715 public const int OptionalUint64FieldNumber = 4;
716 private ulong optionalUint64_;
717 public ulong OptionalUint64 {
718 get { return optionalUint64_; }
719 set {
720 optionalUint64_ = value;
721 }
722 }
723
724 public const int OptionalSint32FieldNumber = 5;
725 private int optionalSint32_;
726 public int OptionalSint32 {
727 get { return optionalSint32_; }
728 set {
729 optionalSint32_ = value;
730 }
731 }
732
733 public const int OptionalSint64FieldNumber = 6;
734 private long optionalSint64_;
735 public long OptionalSint64 {
736 get { return optionalSint64_; }
737 set {
738 optionalSint64_ = value;
739 }
740 }
741
742 public const int OptionalFixed32FieldNumber = 7;
743 private uint optionalFixed32_;
744 public uint OptionalFixed32 {
745 get { return optionalFixed32_; }
746 set {
747 optionalFixed32_ = value;
748 }
749 }
750
751 public const int OptionalFixed64FieldNumber = 8;
752 private ulong optionalFixed64_;
753 public ulong OptionalFixed64 {
754 get { return optionalFixed64_; }
755 set {
756 optionalFixed64_ = value;
757 }
758 }
759
760 public const int OptionalSfixed32FieldNumber = 9;
761 private int optionalSfixed32_;
762 public int OptionalSfixed32 {
763 get { return optionalSfixed32_; }
764 set {
765 optionalSfixed32_ = value;
766 }
767 }
768
769 public const int OptionalSfixed64FieldNumber = 10;
770 private long optionalSfixed64_;
771 public long OptionalSfixed64 {
772 get { return optionalSfixed64_; }
773 set {
774 optionalSfixed64_ = value;
775 }
776 }
777
778 public const int OptionalFloatFieldNumber = 11;
779 private float optionalFloat_;
780 public float OptionalFloat {
781 get { return optionalFloat_; }
782 set {
783 optionalFloat_ = value;
784 }
785 }
786
787 public const int OptionalDoubleFieldNumber = 12;
788 private double optionalDouble_;
789 public double OptionalDouble {
790 get { return optionalDouble_; }
791 set {
792 optionalDouble_ = value;
793 }
794 }
795
796 public const int OptionalBoolFieldNumber = 13;
797 private bool optionalBool_;
798 public bool OptionalBool {
799 get { return optionalBool_; }
800 set {
801 optionalBool_ = value;
802 }
803 }
804
805 public const int OptionalStringFieldNumber = 14;
806 private string optionalString_ = "";
807 public string OptionalString {
808 get { return optionalString_; }
809 set {
810 optionalString_ = pb::Preconditions.CheckNotNull(value, "value");
811 }
812 }
813
814 public const int OptionalBytesFieldNumber = 15;
815 private pb::ByteString optionalBytes_ = pb::ByteString.Empty;
816 public pb::ByteString OptionalBytes {
817 get { return optionalBytes_; }
818 set {
819 optionalBytes_ = pb::Preconditions.CheckNotNull(value, "value");
820 }
821 }
822
823 public const int OptionalNestedMessageFieldNumber = 18;
824 private global::Conformance.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
825 public global::Conformance.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
826 get { return optionalNestedMessage_; }
827 set {
828 optionalNestedMessage_ = value;
829 }
830 }
831
832 public const int OptionalForeignMessageFieldNumber = 19;
833 private global::Conformance.ForeignMessage optionalForeignMessage_;
834 public global::Conformance.ForeignMessage OptionalForeignMessage {
835 get { return optionalForeignMessage_; }
836 set {
837 optionalForeignMessage_ = value;
838 }
839 }
840
841 public const int OptionalNestedEnumFieldNumber = 21;
842 private global::Conformance.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = global::Conformance.TestAllTypes.Types.NestedEnum.FOO;
843 public global::Conformance.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
844 get { return optionalNestedEnum_; }
845 set {
846 optionalNestedEnum_ = value;
847 }
848 }
849
850 public const int OptionalForeignEnumFieldNumber = 22;
851 private global::Conformance.ForeignEnum optionalForeignEnum_ = global::Conformance.ForeignEnum.FOREIGN_FOO;
852 public global::Conformance.ForeignEnum OptionalForeignEnum {
853 get { return optionalForeignEnum_; }
854 set {
855 optionalForeignEnum_ = value;
856 }
857 }
858
859 public const int OptionalStringPieceFieldNumber = 24;
860 private string optionalStringPiece_ = "";
861 public string OptionalStringPiece {
862 get { return optionalStringPiece_; }
863 set {
864 optionalStringPiece_ = pb::Preconditions.CheckNotNull(value, "value");
865 }
866 }
867
868 public const int OptionalCordFieldNumber = 25;
869 private string optionalCord_ = "";
870 public string OptionalCord {
871 get { return optionalCord_; }
872 set {
873 optionalCord_ = pb::Preconditions.CheckNotNull(value, "value");
874 }
875 }
876
877 public const int RecursiveMessageFieldNumber = 27;
878 private global::Conformance.TestAllTypes recursiveMessage_;
879 public global::Conformance.TestAllTypes RecursiveMessage {
880 get { return recursiveMessage_; }
881 set {
882 recursiveMessage_ = value;
883 }
884 }
885
886 public const int RepeatedInt32FieldNumber = 31;
887 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
888 = pb::FieldCodec.ForInt32(250);
889 private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
890 public pbc::RepeatedField<int> RepeatedInt32 {
891 get { return repeatedInt32_; }
892 }
893
894 public const int RepeatedInt64FieldNumber = 32;
895 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
896 = pb::FieldCodec.ForInt64(258);
897 private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
898 public pbc::RepeatedField<long> RepeatedInt64 {
899 get { return repeatedInt64_; }
900 }
901
902 public const int RepeatedUint32FieldNumber = 33;
903 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
904 = pb::FieldCodec.ForUInt32(266);
905 private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
906 public pbc::RepeatedField<uint> RepeatedUint32 {
907 get { return repeatedUint32_; }
908 }
909
910 public const int RepeatedUint64FieldNumber = 34;
911 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
912 = pb::FieldCodec.ForUInt64(274);
913 private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
914 public pbc::RepeatedField<ulong> RepeatedUint64 {
915 get { return repeatedUint64_; }
916 }
917
918 public const int RepeatedSint32FieldNumber = 35;
919 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
920 = pb::FieldCodec.ForSInt32(282);
921 private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
922 public pbc::RepeatedField<int> RepeatedSint32 {
923 get { return repeatedSint32_; }
924 }
925
926 public const int RepeatedSint64FieldNumber = 36;
927 private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
928 = pb::FieldCodec.ForSInt64(290);
929 private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
930 public pbc::RepeatedField<long> RepeatedSint64 {
931 get { return repeatedSint64_; }
932 }
933
934 public const int RepeatedFixed32FieldNumber = 37;
935 private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
936 = pb::FieldCodec.ForFixed32(298);
937 private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
938 public pbc::RepeatedField<uint> RepeatedFixed32 {
939 get { return repeatedFixed32_; }
940 }
941
942 public const int RepeatedFixed64FieldNumber = 38;
943 private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
944 = pb::FieldCodec.ForFixed64(306);
945 private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
946 public pbc::RepeatedField<ulong> RepeatedFixed64 {
947 get { return repeatedFixed64_; }
948 }
949
950 public const int RepeatedSfixed32FieldNumber = 39;
951 private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
952 = pb::FieldCodec.ForSFixed32(314);
953 private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
954 public pbc::RepeatedField<int> RepeatedSfixed32 {
955 get { return repeatedSfixed32_; }
956 }
957
958 public const int RepeatedSfixed64FieldNumber = 40;
959 private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
960 = pb::FieldCodec.ForSFixed64(322);
961 private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
962 public pbc::RepeatedField<long> RepeatedSfixed64 {
963 get { return repeatedSfixed64_; }
964 }
965
966 public const int RepeatedFloatFieldNumber = 41;
967 private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
968 = pb::FieldCodec.ForFloat(330);
969 private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
970 public pbc::RepeatedField<float> RepeatedFloat {
971 get { return repeatedFloat_; }
972 }
973
974 public const int RepeatedDoubleFieldNumber = 42;
975 private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
976 = pb::FieldCodec.ForDouble(338);
977 private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
978 public pbc::RepeatedField<double> RepeatedDouble {
979 get { return repeatedDouble_; }
980 }
981
982 public const int RepeatedBoolFieldNumber = 43;
983 private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
984 = pb::FieldCodec.ForBool(346);
985 private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
986 public pbc::RepeatedField<bool> RepeatedBool {
987 get { return repeatedBool_; }
988 }
989
990 public const int RepeatedStringFieldNumber = 44;
991 private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
992 = pb::FieldCodec.ForString(354);
993 private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
994 public pbc::RepeatedField<string> RepeatedString {
995 get { return repeatedString_; }
996 }
997
998 public const int RepeatedBytesFieldNumber = 45;
999 private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
1000 = pb::FieldCodec.ForBytes(362);
1001 private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
1002 public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
1003 get { return repeatedBytes_; }
1004 }
1005
1006 public const int RepeatedNestedMessageFieldNumber = 48;
1007 private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
1008 = pb::FieldCodec.ForMessage(386, global::Conformance.TestAllTypes.Types.NestedMessage.Parser);
1009 private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage>();
1010 public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
1011 get { return repeatedNestedMessage_; }
1012 }
1013
1014 public const int RepeatedForeignMessageFieldNumber = 49;
1015 private static readonly pb::FieldCodec<global::Conformance.ForeignMessage> _repeated_repeatedForeignMessage_codec
1016 = pb::FieldCodec.ForMessage(394, global::Conformance.ForeignMessage.Parser);
1017 private readonly pbc::RepeatedField<global::Conformance.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Conformance.ForeignMessage>();
1018 public pbc::RepeatedField<global::Conformance.ForeignMessage> RepeatedForeignMessage {
1019 get { return repeatedForeignMessage_; }
1020 }
1021
1022 public const int RepeatedNestedEnumFieldNumber = 51;
1023 private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
1024 = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x);
1025 private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum>();
1026 public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
1027 get { return repeatedNestedEnum_; }
1028 }
1029
1030 public const int RepeatedForeignEnumFieldNumber = 52;
1031 private static readonly pb::FieldCodec<global::Conformance.ForeignEnum> _repeated_repeatedForeignEnum_codec
1032 = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Conformance.ForeignEnum) x);
1033 private readonly pbc::RepeatedField<global::Conformance.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Conformance.ForeignEnum>();
1034 public pbc::RepeatedField<global::Conformance.ForeignEnum> RepeatedForeignEnum {
1035 get { return repeatedForeignEnum_; }
1036 }
1037
1038 public const int RepeatedStringPieceFieldNumber = 54;
1039 private static readonly pb::FieldCodec<string> _repeated_repeatedStringPiece_codec
1040 = pb::FieldCodec.ForString(434);
1041 private readonly pbc::RepeatedField<string> repeatedStringPiece_ = new pbc::RepeatedField<string>();
1042 public pbc::RepeatedField<string> RepeatedStringPiece {
1043 get { return repeatedStringPiece_; }
1044 }
1045
1046 public const int RepeatedCordFieldNumber = 55;
1047 private static readonly pb::FieldCodec<string> _repeated_repeatedCord_codec
1048 = pb::FieldCodec.ForString(442);
1049 private readonly pbc::RepeatedField<string> repeatedCord_ = new pbc::RepeatedField<string>();
1050 public pbc::RepeatedField<string> RepeatedCord {
1051 get { return repeatedCord_; }
1052 }
1053
1054 public const int MapInt32Int32FieldNumber = 56;
1055 private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
1056 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 450);
1057 private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
1058 public pbc::MapField<int, int> MapInt32Int32 {
1059 get { return mapInt32Int32_; }
1060 }
1061
1062 public const int MapInt64Int64FieldNumber = 57;
1063 private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
1064 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 458);
1065 private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
1066 public pbc::MapField<long, long> MapInt64Int64 {
1067 get { return mapInt64Int64_; }
1068 }
1069
1070 public const int MapUint32Uint32FieldNumber = 58;
1071 private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
1072 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 466);
1073 private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
1074 public pbc::MapField<uint, uint> MapUint32Uint32 {
1075 get { return mapUint32Uint32_; }
1076 }
1077
1078 public const int MapUint64Uint64FieldNumber = 59;
1079 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
1080 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 474);
1081 private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
1082 public pbc::MapField<ulong, ulong> MapUint64Uint64 {
1083 get { return mapUint64Uint64_; }
1084 }
1085
1086 public const int MapSint32Sint32FieldNumber = 60;
1087 private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
1088 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 482);
1089 private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
1090 public pbc::MapField<int, int> MapSint32Sint32 {
1091 get { return mapSint32Sint32_; }
1092 }
1093
1094 public const int MapSint64Sint64FieldNumber = 61;
1095 private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
1096 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 490);
1097 private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
1098 public pbc::MapField<long, long> MapSint64Sint64 {
1099 get { return mapSint64Sint64_; }
1100 }
1101
1102 public const int MapFixed32Fixed32FieldNumber = 62;
1103 private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
1104 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 498);
1105 private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
1106 public pbc::MapField<uint, uint> MapFixed32Fixed32 {
1107 get { return mapFixed32Fixed32_; }
1108 }
1109
1110 public const int MapFixed64Fixed64FieldNumber = 63;
1111 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
1112 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 506);
1113 private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
1114 public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
1115 get { return mapFixed64Fixed64_; }
1116 }
1117
1118 public const int MapSfixed32Sfixed32FieldNumber = 64;
1119 private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
1120 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 514);
1121 private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
1122 public pbc::MapField<int, int> MapSfixed32Sfixed32 {
1123 get { return mapSfixed32Sfixed32_; }
1124 }
1125
1126 public const int MapSfixed64Sfixed64FieldNumber = 65;
1127 private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
1128 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 522);
1129 private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
1130 public pbc::MapField<long, long> MapSfixed64Sfixed64 {
1131 get { return mapSfixed64Sfixed64_; }
1132 }
1133
1134 public const int MapInt32FloatFieldNumber = 66;
1135 private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
1136 = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 530);
1137 private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
1138 public pbc::MapField<int, float> MapInt32Float {
1139 get { return mapInt32Float_; }
1140 }
1141
1142 public const int MapInt32DoubleFieldNumber = 67;
1143 private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
1144 = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 538);
1145 private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
1146 public pbc::MapField<int, double> MapInt32Double {
1147 get { return mapInt32Double_; }
1148 }
1149
1150 public const int MapBoolBoolFieldNumber = 68;
1151 private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
1152 = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 546);
1153 private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
1154 public pbc::MapField<bool, bool> MapBoolBool {
1155 get { return mapBoolBool_; }
1156 }
1157
1158 public const int MapStringStringFieldNumber = 69;
1159 private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
1160 = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 554);
1161 private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
1162 public pbc::MapField<string, string> MapStringString {
1163 get { return mapStringString_; }
1164 }
1165
1166 public const int MapStringBytesFieldNumber = 70;
1167 private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_mapStringBytes_codec
1168 = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 562);
1169 private readonly pbc::MapField<string, pb::ByteString> mapStringBytes_ = new pbc::MapField<string, pb::ByteString>();
1170 public pbc::MapField<string, pb::ByteString> MapStringBytes {
1171 get { return mapStringBytes_; }
1172 }
1173
1174 public const int MapStringNestedMessageFieldNumber = 71;
1175 private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec _map_mapStringNestedMessage_codec
1176 = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.TestAllTypes.Types.NestedMessage.Parser), 570);
1177 private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> mapStringNestedMessage_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>();
1178 public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> MapStringNestedMessage {
1179 get { return mapStringNestedMessage_; }
1180 }
1181
1182 public const int MapStringForeignMessageFieldNumber = 72;
1183 private static readonly pbc::MapField<string, global::Conformance.ForeignMessage>.Codec _map_mapStringForeignMessage_codec
1184 = new pbc::MapField<string, global::Conformance.ForeignMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.ForeignMessage.Parser), 578);
1185 private readonly pbc::MapField<string, global::Conformance.ForeignMessage> mapStringForeignMessage_ = new pbc::MapField<string, global::Conformance.ForeignMessage>();
1186 public pbc::MapField<string, global::Conformance.ForeignMessage> MapStringForeignMessage {
1187 get { return mapStringForeignMessage_; }
1188 }
1189
1190 public const int MapStringNestedEnumFieldNumber = 73;
1191 private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec _map_mapStringNestedEnum_codec
1192 = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x), 586);
1193 private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> mapStringNestedEnum_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>();
1194 public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> MapStringNestedEnum {
1195 get { return mapStringNestedEnum_; }
1196 }
1197
1198 public const int MapStringForeignEnumFieldNumber = 74;
1199 private static readonly pbc::MapField<string, global::Conformance.ForeignEnum>.Codec _map_mapStringForeignEnum_codec
1200 = new pbc::MapField<string, global::Conformance.ForeignEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.ForeignEnum) x), 594);
1201 private readonly pbc::MapField<string, global::Conformance.ForeignEnum> mapStringForeignEnum_ = new pbc::MapField<string, global::Conformance.ForeignEnum>();
1202 public pbc::MapField<string, global::Conformance.ForeignEnum> MapStringForeignEnum {
1203 get { return mapStringForeignEnum_; }
1204 }
1205
1206 public const int OneofUint32FieldNumber = 111;
1207 public uint OneofUint32 {
1208 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
1209 set {
1210 oneofField_ = value;
1211 oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
1212 }
1213 }
1214
1215 public const int OneofNestedMessageFieldNumber = 112;
1216 public global::Conformance.TestAllTypes.Types.NestedMessage OneofNestedMessage {
1217 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Conformance.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
1218 set {
1219 oneofField_ = value;
1220 oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
1221 }
1222 }
1223
1224 public const int OneofStringFieldNumber = 113;
1225 public string OneofString {
1226 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
1227 set {
1228 oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
1229 oneofFieldCase_ = OneofFieldOneofCase.OneofString;
1230 }
1231 }
1232
1233 public const int OneofBytesFieldNumber = 114;
1234 public pb::ByteString OneofBytes {
1235 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
1236 set {
1237 oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
1238 oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
1239 }
1240 }
1241
1242 private object oneofField_;
1243 public enum OneofFieldOneofCase {
1244 None = 0,
1245 OneofUint32 = 111,
1246 OneofNestedMessage = 112,
1247 OneofString = 113,
1248 OneofBytes = 114,
1249 }
1250 private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
1251 public OneofFieldOneofCase OneofFieldCase {
1252 get { return oneofFieldCase_; }
1253 }
1254
1255 public void ClearOneofField() {
1256 oneofFieldCase_ = OneofFieldOneofCase.None;
1257 oneofField_ = null;
1258 }
1259
1260 public override bool Equals(object other) {
1261 return Equals(other as TestAllTypes);
1262 }
1263
1264 public bool Equals(TestAllTypes other) {
1265 if (ReferenceEquals(other, null)) {
1266 return false;
1267 }
1268 if (ReferenceEquals(other, this)) {
1269 return true;
1270 }
1271 if (OptionalInt32 != other.OptionalInt32) return false;
1272 if (OptionalInt64 != other.OptionalInt64) return false;
1273 if (OptionalUint32 != other.OptionalUint32) return false;
1274 if (OptionalUint64 != other.OptionalUint64) return false;
1275 if (OptionalSint32 != other.OptionalSint32) return false;
1276 if (OptionalSint64 != other.OptionalSint64) return false;
1277 if (OptionalFixed32 != other.OptionalFixed32) return false;
1278 if (OptionalFixed64 != other.OptionalFixed64) return false;
1279 if (OptionalSfixed32 != other.OptionalSfixed32) return false;
1280 if (OptionalSfixed64 != other.OptionalSfixed64) return false;
1281 if (OptionalFloat != other.OptionalFloat) return false;
1282 if (OptionalDouble != other.OptionalDouble) return false;
1283 if (OptionalBool != other.OptionalBool) return false;
1284 if (OptionalString != other.OptionalString) return false;
1285 if (OptionalBytes != other.OptionalBytes) return false;
1286 if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
1287 if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false;
1288 if (OptionalNestedEnum != other.OptionalNestedEnum) return false;
1289 if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
1290 if (OptionalStringPiece != other.OptionalStringPiece) return false;
1291 if (OptionalCord != other.OptionalCord) return false;
1292 if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) return false;
1293 if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
1294 if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
1295 if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
1296 if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
1297 if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
1298 if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
1299 if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
1300 if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
1301 if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
1302 if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
1303 if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
1304 if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
1305 if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
1306 if(!repeatedString_.Equals(other.repeatedString_)) return false;
1307 if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
1308 if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
1309 if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
1310 if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
1311 if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
1312 if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false;
1313 if(!repeatedCord_.Equals(other.repeatedCord_)) return false;
1314 if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
1315 if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
1316 if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
1317 if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
1318 if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
1319 if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
1320 if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
1321 if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
1322 if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
1323 if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
1324 if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
1325 if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
1326 if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
1327 if (!MapStringString.Equals(other.MapStringString)) return false;
1328 if (!MapStringBytes.Equals(other.MapStringBytes)) return false;
1329 if (!MapStringNestedMessage.Equals(other.MapStringNestedMessage)) return false;
1330 if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false;
1331 if (!MapStringNestedEnum.Equals(other.MapStringNestedEnum)) return false;
1332 if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) return false;
1333 if (OneofUint32 != other.OneofUint32) return false;
1334 if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
1335 if (OneofString != other.OneofString) return false;
1336 if (OneofBytes != other.OneofBytes) return false;
1337 return true;
1338 }
1339
1340 public override int GetHashCode() {
1341 int hash = 1;
1342 if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
1343 if (OptionalInt64 != 0L) hash ^= OptionalInt64.GetHashCode();
1344 if (OptionalUint32 != 0) hash ^= OptionalUint32.GetHashCode();
1345 if (OptionalUint64 != 0UL) hash ^= OptionalUint64.GetHashCode();
1346 if (OptionalSint32 != 0) hash ^= OptionalSint32.GetHashCode();
1347 if (OptionalSint64 != 0L) hash ^= OptionalSint64.GetHashCode();
1348 if (OptionalFixed32 != 0) hash ^= OptionalFixed32.GetHashCode();
1349 if (OptionalFixed64 != 0UL) hash ^= OptionalFixed64.GetHashCode();
1350 if (OptionalSfixed32 != 0) hash ^= OptionalSfixed32.GetHashCode();
1351 if (OptionalSfixed64 != 0L) hash ^= OptionalSfixed64.GetHashCode();
1352 if (OptionalFloat != 0F) hash ^= OptionalFloat.GetHashCode();
1353 if (OptionalDouble != 0D) hash ^= OptionalDouble.GetHashCode();
1354 if (OptionalBool != false) hash ^= OptionalBool.GetHashCode();
1355 if (OptionalString.Length != 0) hash ^= OptionalString.GetHashCode();
1356 if (OptionalBytes.Length != 0) hash ^= OptionalBytes.GetHashCode();
1357 if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode();
1358 if (optionalForeignMessage_ != null) hash ^= OptionalForeignMessage.GetHashCode();
1359 if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) hash ^= OptionalNestedEnum.GetHashCode();
1360 if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) hash ^= OptionalForeignEnum.GetHashCode();
1361 if (OptionalStringPiece.Length != 0) hash ^= OptionalStringPiece.GetHashCode();
1362 if (OptionalCord.Length != 0) hash ^= OptionalCord.GetHashCode();
1363 if (recursiveMessage_ != null) hash ^= RecursiveMessage.GetHashCode();
1364 hash ^= repeatedInt32_.GetHashCode();
1365 hash ^= repeatedInt64_.GetHashCode();
1366 hash ^= repeatedUint32_.GetHashCode();
1367 hash ^= repeatedUint64_.GetHashCode();
1368 hash ^= repeatedSint32_.GetHashCode();
1369 hash ^= repeatedSint64_.GetHashCode();
1370 hash ^= repeatedFixed32_.GetHashCode();
1371 hash ^= repeatedFixed64_.GetHashCode();
1372 hash ^= repeatedSfixed32_.GetHashCode();
1373 hash ^= repeatedSfixed64_.GetHashCode();
1374 hash ^= repeatedFloat_.GetHashCode();
1375 hash ^= repeatedDouble_.GetHashCode();
1376 hash ^= repeatedBool_.GetHashCode();
1377 hash ^= repeatedString_.GetHashCode();
1378 hash ^= repeatedBytes_.GetHashCode();
1379 hash ^= repeatedNestedMessage_.GetHashCode();
1380 hash ^= repeatedForeignMessage_.GetHashCode();
1381 hash ^= repeatedNestedEnum_.GetHashCode();
1382 hash ^= repeatedForeignEnum_.GetHashCode();
1383 hash ^= repeatedStringPiece_.GetHashCode();
1384 hash ^= repeatedCord_.GetHashCode();
1385 hash ^= MapInt32Int32.GetHashCode();
1386 hash ^= MapInt64Int64.GetHashCode();
1387 hash ^= MapUint32Uint32.GetHashCode();
1388 hash ^= MapUint64Uint64.GetHashCode();
1389 hash ^= MapSint32Sint32.GetHashCode();
1390 hash ^= MapSint64Sint64.GetHashCode();
1391 hash ^= MapFixed32Fixed32.GetHashCode();
1392 hash ^= MapFixed64Fixed64.GetHashCode();
1393 hash ^= MapSfixed32Sfixed32.GetHashCode();
1394 hash ^= MapSfixed64Sfixed64.GetHashCode();
1395 hash ^= MapInt32Float.GetHashCode();
1396 hash ^= MapInt32Double.GetHashCode();
1397 hash ^= MapBoolBool.GetHashCode();
1398 hash ^= MapStringString.GetHashCode();
1399 hash ^= MapStringBytes.GetHashCode();
1400 hash ^= MapStringNestedMessage.GetHashCode();
1401 hash ^= MapStringForeignMessage.GetHashCode();
1402 hash ^= MapStringNestedEnum.GetHashCode();
1403 hash ^= MapStringForeignEnum.GetHashCode();
1404 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
1405 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
1406 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
1407 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
1408 return hash;
1409 }
1410
1411 public override string ToString() {
1412 return pb::JsonFormatter.Default.Format(this);
1413 }
1414
1415 public void WriteTo(pb::CodedOutputStream output) {
1416 if (OptionalInt32 != 0) {
1417 output.WriteRawTag(8);
1418 output.WriteInt32(OptionalInt32);
1419 }
1420 if (OptionalInt64 != 0L) {
1421 output.WriteRawTag(16);
1422 output.WriteInt64(OptionalInt64);
1423 }
1424 if (OptionalUint32 != 0) {
1425 output.WriteRawTag(24);
1426 output.WriteUInt32(OptionalUint32);
1427 }
1428 if (OptionalUint64 != 0UL) {
1429 output.WriteRawTag(32);
1430 output.WriteUInt64(OptionalUint64);
1431 }
1432 if (OptionalSint32 != 0) {
1433 output.WriteRawTag(40);
1434 output.WriteSInt32(OptionalSint32);
1435 }
1436 if (OptionalSint64 != 0L) {
1437 output.WriteRawTag(48);
1438 output.WriteSInt64(OptionalSint64);
1439 }
1440 if (OptionalFixed32 != 0) {
1441 output.WriteRawTag(61);
1442 output.WriteFixed32(OptionalFixed32);
1443 }
1444 if (OptionalFixed64 != 0UL) {
1445 output.WriteRawTag(65);
1446 output.WriteFixed64(OptionalFixed64);
1447 }
1448 if (OptionalSfixed32 != 0) {
1449 output.WriteRawTag(77);
1450 output.WriteSFixed32(OptionalSfixed32);
1451 }
1452 if (OptionalSfixed64 != 0L) {
1453 output.WriteRawTag(81);
1454 output.WriteSFixed64(OptionalSfixed64);
1455 }
1456 if (OptionalFloat != 0F) {
1457 output.WriteRawTag(93);
1458 output.WriteFloat(OptionalFloat);
1459 }
1460 if (OptionalDouble != 0D) {
1461 output.WriteRawTag(97);
1462 output.WriteDouble(OptionalDouble);
1463 }
1464 if (OptionalBool != false) {
1465 output.WriteRawTag(104);
1466 output.WriteBool(OptionalBool);
1467 }
1468 if (OptionalString.Length != 0) {
1469 output.WriteRawTag(114);
1470 output.WriteString(OptionalString);
1471 }
1472 if (OptionalBytes.Length != 0) {
1473 output.WriteRawTag(122);
1474 output.WriteBytes(OptionalBytes);
1475 }
1476 if (optionalNestedMessage_ != null) {
1477 output.WriteRawTag(146, 1);
1478 output.WriteMessage(OptionalNestedMessage);
1479 }
1480 if (optionalForeignMessage_ != null) {
1481 output.WriteRawTag(154, 1);
1482 output.WriteMessage(OptionalForeignMessage);
1483 }
1484 if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) {
1485 output.WriteRawTag(168, 1);
1486 output.WriteEnum((int) OptionalNestedEnum);
1487 }
1488 if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) {
1489 output.WriteRawTag(176, 1);
1490 output.WriteEnum((int) OptionalForeignEnum);
1491 }
1492 if (OptionalStringPiece.Length != 0) {
1493 output.WriteRawTag(194, 1);
1494 output.WriteString(OptionalStringPiece);
1495 }
1496 if (OptionalCord.Length != 0) {
1497 output.WriteRawTag(202, 1);
1498 output.WriteString(OptionalCord);
1499 }
1500 if (recursiveMessage_ != null) {
1501 output.WriteRawTag(218, 1);
1502 output.WriteMessage(RecursiveMessage);
1503 }
1504 repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
1505 repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
1506 repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
1507 repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
1508 repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
1509 repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
1510 repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
1511 repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
1512 repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
1513 repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
1514 repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
1515 repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
1516 repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
1517 repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
1518 repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
1519 repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
1520 repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
1521 repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
1522 repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
1523 repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec);
1524 repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec);
1525 mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
1526 mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
1527 mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
1528 mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
1529 mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
1530 mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
1531 mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
1532 mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
1533 mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
1534 mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
1535 mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
1536 mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
1537 mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
1538 mapStringString_.WriteTo(output, _map_mapStringString_codec);
1539 mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec);
1540 mapStringNestedMessage_.WriteTo(output, _map_mapStringNestedMessage_codec);
1541 mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec);
1542 mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec);
1543 mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec);
1544 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1545 output.WriteRawTag(248, 6);
1546 output.WriteUInt32(OneofUint32);
1547 }
1548 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1549 output.WriteRawTag(130, 7);
1550 output.WriteMessage(OneofNestedMessage);
1551 }
1552 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1553 output.WriteRawTag(138, 7);
1554 output.WriteString(OneofString);
1555 }
1556 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1557 output.WriteRawTag(146, 7);
1558 output.WriteBytes(OneofBytes);
1559 }
1560 }
1561
1562 public int CalculateSize() {
1563 int size = 0;
1564 if (OptionalInt32 != 0) {
1565 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
1566 }
1567 if (OptionalInt64 != 0L) {
1568 size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64);
1569 }
1570 if (OptionalUint32 != 0) {
1571 size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32);
1572 }
1573 if (OptionalUint64 != 0UL) {
1574 size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64);
1575 }
1576 if (OptionalSint32 != 0) {
1577 size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32);
1578 }
1579 if (OptionalSint64 != 0L) {
1580 size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64);
1581 }
1582 if (OptionalFixed32 != 0) {
1583 size += 1 + 4;
1584 }
1585 if (OptionalFixed64 != 0UL) {
1586 size += 1 + 8;
1587 }
1588 if (OptionalSfixed32 != 0) {
1589 size += 1 + 4;
1590 }
1591 if (OptionalSfixed64 != 0L) {
1592 size += 1 + 8;
1593 }
1594 if (OptionalFloat != 0F) {
1595 size += 1 + 4;
1596 }
1597 if (OptionalDouble != 0D) {
1598 size += 1 + 8;
1599 }
1600 if (OptionalBool != false) {
1601 size += 1 + 1;
1602 }
1603 if (OptionalString.Length != 0) {
1604 size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
1605 }
1606 if (OptionalBytes.Length != 0) {
1607 size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
1608 }
1609 if (optionalNestedMessage_ != null) {
1610 size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
1611 }
1612 if (optionalForeignMessage_ != null) {
1613 size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage);
1614 }
1615 if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) {
1616 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum);
1617 }
1618 if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) {
1619 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
1620 }
1621 if (OptionalStringPiece.Length != 0) {
1622 size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece);
1623 }
1624 if (OptionalCord.Length != 0) {
1625 size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord);
1626 }
1627 if (recursiveMessage_ != null) {
1628 size += 2 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage);
1629 }
1630 size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
1631 size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
1632 size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
1633 size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
1634 size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
1635 size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
1636 size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
1637 size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
1638 size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
1639 size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
1640 size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
1641 size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
1642 size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
1643 size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
1644 size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
1645 size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
1646 size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
1647 size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
1648 size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
1649 size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec);
1650 size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec);
1651 size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
1652 size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
1653 size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
1654 size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
1655 size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
1656 size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
1657 size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
1658 size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
1659 size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
1660 size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
1661 size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
1662 size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
1663 size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
1664 size += mapStringString_.CalculateSize(_map_mapStringString_codec);
1665 size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec);
1666 size += mapStringNestedMessage_.CalculateSize(_map_mapStringNestedMessage_codec);
1667 size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec);
1668 size += mapStringNestedEnum_.CalculateSize(_map_mapStringNestedEnum_codec);
1669 size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec);
1670 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1671 size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
1672 }
1673 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1674 size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
1675 }
1676 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1677 size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
1678 }
1679 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1680 size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
1681 }
1682 return size;
1683 }
1684
1685 public void MergeFrom(TestAllTypes other) {
1686 if (other == null) {
1687 return;
1688 }
1689 if (other.OptionalInt32 != 0) {
1690 OptionalInt32 = other.OptionalInt32;
1691 }
1692 if (other.OptionalInt64 != 0L) {
1693 OptionalInt64 = other.OptionalInt64;
1694 }
1695 if (other.OptionalUint32 != 0) {
1696 OptionalUint32 = other.OptionalUint32;
1697 }
1698 if (other.OptionalUint64 != 0UL) {
1699 OptionalUint64 = other.OptionalUint64;
1700 }
1701 if (other.OptionalSint32 != 0) {
1702 OptionalSint32 = other.OptionalSint32;
1703 }
1704 if (other.OptionalSint64 != 0L) {
1705 OptionalSint64 = other.OptionalSint64;
1706 }
1707 if (other.OptionalFixed32 != 0) {
1708 OptionalFixed32 = other.OptionalFixed32;
1709 }
1710 if (other.OptionalFixed64 != 0UL) {
1711 OptionalFixed64 = other.OptionalFixed64;
1712 }
1713 if (other.OptionalSfixed32 != 0) {
1714 OptionalSfixed32 = other.OptionalSfixed32;
1715 }
1716 if (other.OptionalSfixed64 != 0L) {
1717 OptionalSfixed64 = other.OptionalSfixed64;
1718 }
1719 if (other.OptionalFloat != 0F) {
1720 OptionalFloat = other.OptionalFloat;
1721 }
1722 if (other.OptionalDouble != 0D) {
1723 OptionalDouble = other.OptionalDouble;
1724 }
1725 if (other.OptionalBool != false) {
1726 OptionalBool = other.OptionalBool;
1727 }
1728 if (other.OptionalString.Length != 0) {
1729 OptionalString = other.OptionalString;
1730 }
1731 if (other.OptionalBytes.Length != 0) {
1732 OptionalBytes = other.OptionalBytes;
1733 }
1734 if (other.optionalNestedMessage_ != null) {
1735 if (optionalNestedMessage_ == null) {
1736 optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage();
1737 }
1738 OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
1739 }
1740 if (other.optionalForeignMessage_ != null) {
1741 if (optionalForeignMessage_ == null) {
1742 optionalForeignMessage_ = new global::Conformance.ForeignMessage();
1743 }
1744 OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage);
1745 }
1746 if (other.OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) {
1747 OptionalNestedEnum = other.OptionalNestedEnum;
1748 }
1749 if (other.OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) {
1750 OptionalForeignEnum = other.OptionalForeignEnum;
1751 }
1752 if (other.OptionalStringPiece.Length != 0) {
1753 OptionalStringPiece = other.OptionalStringPiece;
1754 }
1755 if (other.OptionalCord.Length != 0) {
1756 OptionalCord = other.OptionalCord;
1757 }
1758 if (other.recursiveMessage_ != null) {
1759 if (recursiveMessage_ == null) {
1760 recursiveMessage_ = new global::Conformance.TestAllTypes();
1761 }
1762 RecursiveMessage.MergeFrom(other.RecursiveMessage);
1763 }
1764 repeatedInt32_.Add(other.repeatedInt32_);
1765 repeatedInt64_.Add(other.repeatedInt64_);
1766 repeatedUint32_.Add(other.repeatedUint32_);
1767 repeatedUint64_.Add(other.repeatedUint64_);
1768 repeatedSint32_.Add(other.repeatedSint32_);
1769 repeatedSint64_.Add(other.repeatedSint64_);
1770 repeatedFixed32_.Add(other.repeatedFixed32_);
1771 repeatedFixed64_.Add(other.repeatedFixed64_);
1772 repeatedSfixed32_.Add(other.repeatedSfixed32_);
1773 repeatedSfixed64_.Add(other.repeatedSfixed64_);
1774 repeatedFloat_.Add(other.repeatedFloat_);
1775 repeatedDouble_.Add(other.repeatedDouble_);
1776 repeatedBool_.Add(other.repeatedBool_);
1777 repeatedString_.Add(other.repeatedString_);
1778 repeatedBytes_.Add(other.repeatedBytes_);
1779 repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
1780 repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
1781 repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
1782 repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
1783 repeatedStringPiece_.Add(other.repeatedStringPiece_);
1784 repeatedCord_.Add(other.repeatedCord_);
1785 mapInt32Int32_.Add(other.mapInt32Int32_);
1786 mapInt64Int64_.Add(other.mapInt64Int64_);
1787 mapUint32Uint32_.Add(other.mapUint32Uint32_);
1788 mapUint64Uint64_.Add(other.mapUint64Uint64_);
1789 mapSint32Sint32_.Add(other.mapSint32Sint32_);
1790 mapSint64Sint64_.Add(other.mapSint64Sint64_);
1791 mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
1792 mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
1793 mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
1794 mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
1795 mapInt32Float_.Add(other.mapInt32Float_);
1796 mapInt32Double_.Add(other.mapInt32Double_);
1797 mapBoolBool_.Add(other.mapBoolBool_);
1798 mapStringString_.Add(other.mapStringString_);
1799 mapStringBytes_.Add(other.mapStringBytes_);
1800 mapStringNestedMessage_.Add(other.mapStringNestedMessage_);
1801 mapStringForeignMessage_.Add(other.mapStringForeignMessage_);
1802 mapStringNestedEnum_.Add(other.mapStringNestedEnum_);
1803 mapStringForeignEnum_.Add(other.mapStringForeignEnum_);
1804 switch (other.OneofFieldCase) {
1805 case OneofFieldOneofCase.OneofUint32:
1806 OneofUint32 = other.OneofUint32;
1807 break;
1808 case OneofFieldOneofCase.OneofNestedMessage:
1809 OneofNestedMessage = other.OneofNestedMessage;
1810 break;
1811 case OneofFieldOneofCase.OneofString:
1812 OneofString = other.OneofString;
1813 break;
1814 case OneofFieldOneofCase.OneofBytes:
1815 OneofBytes = other.OneofBytes;
1816 break;
1817 }
1818
1819 }
1820
1821 public void MergeFrom(pb::CodedInputStream input) {
1822 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001823 while ((tag = input.ReadTag()) != 0) {
Jon Skeet044c36e2015-08-04 09:25:38 +01001824 switch(tag) {
Jon Skeet044c36e2015-08-04 09:25:38 +01001825 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001826 input.SkipLastField();
Jon Skeet044c36e2015-08-04 09:25:38 +01001827 break;
1828 case 8: {
1829 OptionalInt32 = input.ReadInt32();
1830 break;
1831 }
1832 case 16: {
1833 OptionalInt64 = input.ReadInt64();
1834 break;
1835 }
1836 case 24: {
1837 OptionalUint32 = input.ReadUInt32();
1838 break;
1839 }
1840 case 32: {
1841 OptionalUint64 = input.ReadUInt64();
1842 break;
1843 }
1844 case 40: {
1845 OptionalSint32 = input.ReadSInt32();
1846 break;
1847 }
1848 case 48: {
1849 OptionalSint64 = input.ReadSInt64();
1850 break;
1851 }
1852 case 61: {
1853 OptionalFixed32 = input.ReadFixed32();
1854 break;
1855 }
1856 case 65: {
1857 OptionalFixed64 = input.ReadFixed64();
1858 break;
1859 }
1860 case 77: {
1861 OptionalSfixed32 = input.ReadSFixed32();
1862 break;
1863 }
1864 case 81: {
1865 OptionalSfixed64 = input.ReadSFixed64();
1866 break;
1867 }
1868 case 93: {
1869 OptionalFloat = input.ReadFloat();
1870 break;
1871 }
1872 case 97: {
1873 OptionalDouble = input.ReadDouble();
1874 break;
1875 }
1876 case 104: {
1877 OptionalBool = input.ReadBool();
1878 break;
1879 }
1880 case 114: {
1881 OptionalString = input.ReadString();
1882 break;
1883 }
1884 case 122: {
1885 OptionalBytes = input.ReadBytes();
1886 break;
1887 }
1888 case 146: {
1889 if (optionalNestedMessage_ == null) {
1890 optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage();
1891 }
1892 input.ReadMessage(optionalNestedMessage_);
1893 break;
1894 }
1895 case 154: {
1896 if (optionalForeignMessage_ == null) {
1897 optionalForeignMessage_ = new global::Conformance.ForeignMessage();
1898 }
1899 input.ReadMessage(optionalForeignMessage_);
1900 break;
1901 }
1902 case 168: {
1903 optionalNestedEnum_ = (global::Conformance.TestAllTypes.Types.NestedEnum) input.ReadEnum();
1904 break;
1905 }
1906 case 176: {
1907 optionalForeignEnum_ = (global::Conformance.ForeignEnum) input.ReadEnum();
1908 break;
1909 }
1910 case 194: {
1911 OptionalStringPiece = input.ReadString();
1912 break;
1913 }
1914 case 202: {
1915 OptionalCord = input.ReadString();
1916 break;
1917 }
1918 case 218: {
1919 if (recursiveMessage_ == null) {
1920 recursiveMessage_ = new global::Conformance.TestAllTypes();
1921 }
1922 input.ReadMessage(recursiveMessage_);
1923 break;
1924 }
1925 case 250:
1926 case 248: {
1927 repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
1928 break;
1929 }
1930 case 258:
1931 case 256: {
1932 repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
1933 break;
1934 }
1935 case 266:
1936 case 264: {
1937 repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
1938 break;
1939 }
1940 case 274:
1941 case 272: {
1942 repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
1943 break;
1944 }
1945 case 282:
1946 case 280: {
1947 repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
1948 break;
1949 }
1950 case 290:
1951 case 288: {
1952 repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
1953 break;
1954 }
1955 case 298:
1956 case 301: {
1957 repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
1958 break;
1959 }
1960 case 306:
1961 case 305: {
1962 repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
1963 break;
1964 }
1965 case 314:
1966 case 317: {
1967 repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
1968 break;
1969 }
1970 case 322:
1971 case 321: {
1972 repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
1973 break;
1974 }
1975 case 330:
1976 case 333: {
1977 repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
1978 break;
1979 }
1980 case 338:
1981 case 337: {
1982 repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
1983 break;
1984 }
1985 case 346:
1986 case 344: {
1987 repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
1988 break;
1989 }
1990 case 354: {
1991 repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
1992 break;
1993 }
1994 case 362: {
1995 repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
1996 break;
1997 }
1998 case 386: {
1999 repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
2000 break;
2001 }
2002 case 394: {
2003 repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
2004 break;
2005 }
2006 case 410:
2007 case 408: {
2008 repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
2009 break;
2010 }
2011 case 418:
2012 case 416: {
2013 repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
2014 break;
2015 }
2016 case 434: {
2017 repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec);
2018 break;
2019 }
2020 case 442: {
2021 repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec);
2022 break;
2023 }
2024 case 450: {
2025 mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
2026 break;
2027 }
2028 case 458: {
2029 mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
2030 break;
2031 }
2032 case 466: {
2033 mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
2034 break;
2035 }
2036 case 474: {
2037 mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
2038 break;
2039 }
2040 case 482: {
2041 mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
2042 break;
2043 }
2044 case 490: {
2045 mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
2046 break;
2047 }
2048 case 498: {
2049 mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
2050 break;
2051 }
2052 case 506: {
2053 mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
2054 break;
2055 }
2056 case 514: {
2057 mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
2058 break;
2059 }
2060 case 522: {
2061 mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
2062 break;
2063 }
2064 case 530: {
2065 mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
2066 break;
2067 }
2068 case 538: {
2069 mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
2070 break;
2071 }
2072 case 546: {
2073 mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
2074 break;
2075 }
2076 case 554: {
2077 mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
2078 break;
2079 }
2080 case 562: {
2081 mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec);
2082 break;
2083 }
2084 case 570: {
2085 mapStringNestedMessage_.AddEntriesFrom(input, _map_mapStringNestedMessage_codec);
2086 break;
2087 }
2088 case 578: {
2089 mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec);
2090 break;
2091 }
2092 case 586: {
2093 mapStringNestedEnum_.AddEntriesFrom(input, _map_mapStringNestedEnum_codec);
2094 break;
2095 }
2096 case 594: {
2097 mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec);
2098 break;
2099 }
2100 case 888: {
2101 OneofUint32 = input.ReadUInt32();
2102 break;
2103 }
2104 case 898: {
2105 global::Conformance.TestAllTypes.Types.NestedMessage subBuilder = new global::Conformance.TestAllTypes.Types.NestedMessage();
2106 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
2107 subBuilder.MergeFrom(OneofNestedMessage);
2108 }
2109 input.ReadMessage(subBuilder);
2110 OneofNestedMessage = subBuilder;
2111 break;
2112 }
2113 case 906: {
2114 OneofString = input.ReadString();
2115 break;
2116 }
2117 case 914: {
2118 OneofBytes = input.ReadBytes();
2119 break;
2120 }
2121 }
2122 }
2123 }
2124
2125 #region Nested types
2126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2127 public static partial class Types {
2128 public enum NestedEnum {
2129 FOO = 0,
2130 BAR = 1,
2131 BAZ = 2,
2132 NEG = -1,
2133 }
2134
2135 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2136 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
2137 private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
2138 public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
2139
2140 public static pbr::MessageDescriptor Descriptor {
2141 get { return global::Conformance.TestAllTypes.Descriptor.NestedTypes[0]; }
2142 }
2143
2144 pbr::MessageDescriptor pb::IMessage.Descriptor {
2145 get { return Descriptor; }
2146 }
2147
2148 public NestedMessage() {
2149 OnConstruction();
2150 }
2151
2152 partial void OnConstruction();
2153
2154 public NestedMessage(NestedMessage other) : this() {
2155 a_ = other.a_;
2156 Corecursive = other.corecursive_ != null ? other.Corecursive.Clone() : null;
2157 }
2158
2159 public NestedMessage Clone() {
2160 return new NestedMessage(this);
2161 }
2162
2163 public const int AFieldNumber = 1;
2164 private int a_;
2165 public int A {
2166 get { return a_; }
2167 set {
2168 a_ = value;
2169 }
2170 }
2171
2172 public const int CorecursiveFieldNumber = 2;
2173 private global::Conformance.TestAllTypes corecursive_;
2174 public global::Conformance.TestAllTypes Corecursive {
2175 get { return corecursive_; }
2176 set {
2177 corecursive_ = value;
2178 }
2179 }
2180
2181 public override bool Equals(object other) {
2182 return Equals(other as NestedMessage);
2183 }
2184
2185 public bool Equals(NestedMessage other) {
2186 if (ReferenceEquals(other, null)) {
2187 return false;
2188 }
2189 if (ReferenceEquals(other, this)) {
2190 return true;
2191 }
2192 if (A != other.A) return false;
2193 if (!object.Equals(Corecursive, other.Corecursive)) return false;
2194 return true;
2195 }
2196
2197 public override int GetHashCode() {
2198 int hash = 1;
2199 if (A != 0) hash ^= A.GetHashCode();
2200 if (corecursive_ != null) hash ^= Corecursive.GetHashCode();
2201 return hash;
2202 }
2203
2204 public override string ToString() {
2205 return pb::JsonFormatter.Default.Format(this);
2206 }
2207
2208 public void WriteTo(pb::CodedOutputStream output) {
2209 if (A != 0) {
2210 output.WriteRawTag(8);
2211 output.WriteInt32(A);
2212 }
2213 if (corecursive_ != null) {
2214 output.WriteRawTag(18);
2215 output.WriteMessage(Corecursive);
2216 }
2217 }
2218
2219 public int CalculateSize() {
2220 int size = 0;
2221 if (A != 0) {
2222 size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
2223 }
2224 if (corecursive_ != null) {
2225 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Corecursive);
2226 }
2227 return size;
2228 }
2229
2230 public void MergeFrom(NestedMessage other) {
2231 if (other == null) {
2232 return;
2233 }
2234 if (other.A != 0) {
2235 A = other.A;
2236 }
2237 if (other.corecursive_ != null) {
2238 if (corecursive_ == null) {
2239 corecursive_ = new global::Conformance.TestAllTypes();
2240 }
2241 Corecursive.MergeFrom(other.Corecursive);
2242 }
2243 }
2244
2245 public void MergeFrom(pb::CodedInputStream input) {
2246 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01002247 while ((tag = input.ReadTag()) != 0) {
Jon Skeet044c36e2015-08-04 09:25:38 +01002248 switch(tag) {
Jon Skeet044c36e2015-08-04 09:25:38 +01002249 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01002250 input.SkipLastField();
Jon Skeet044c36e2015-08-04 09:25:38 +01002251 break;
2252 case 8: {
2253 A = input.ReadInt32();
2254 break;
2255 }
2256 case 18: {
2257 if (corecursive_ == null) {
2258 corecursive_ = new global::Conformance.TestAllTypes();
2259 }
2260 input.ReadMessage(corecursive_);
2261 break;
2262 }
2263 }
2264 }
2265 }
2266
2267 }
2268
2269 }
2270 #endregion
2271
2272 }
2273
2274 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2275 public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
2276 private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
2277 public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
2278
2279 public static pbr::MessageDescriptor Descriptor {
2280 get { return global::Conformance.Conformance.Descriptor.MessageTypes[3]; }
2281 }
2282
2283 pbr::MessageDescriptor pb::IMessage.Descriptor {
2284 get { return Descriptor; }
2285 }
2286
2287 public ForeignMessage() {
2288 OnConstruction();
2289 }
2290
2291 partial void OnConstruction();
2292
2293 public ForeignMessage(ForeignMessage other) : this() {
2294 c_ = other.c_;
2295 }
2296
2297 public ForeignMessage Clone() {
2298 return new ForeignMessage(this);
2299 }
2300
2301 public const int CFieldNumber = 1;
2302 private int c_;
2303 public int C {
2304 get { return c_; }
2305 set {
2306 c_ = value;
2307 }
2308 }
2309
2310 public override bool Equals(object other) {
2311 return Equals(other as ForeignMessage);
2312 }
2313
2314 public bool Equals(ForeignMessage other) {
2315 if (ReferenceEquals(other, null)) {
2316 return false;
2317 }
2318 if (ReferenceEquals(other, this)) {
2319 return true;
2320 }
2321 if (C != other.C) return false;
2322 return true;
2323 }
2324
2325 public override int GetHashCode() {
2326 int hash = 1;
2327 if (C != 0) hash ^= C.GetHashCode();
2328 return hash;
2329 }
2330
2331 public override string ToString() {
2332 return pb::JsonFormatter.Default.Format(this);
2333 }
2334
2335 public void WriteTo(pb::CodedOutputStream output) {
2336 if (C != 0) {
2337 output.WriteRawTag(8);
2338 output.WriteInt32(C);
2339 }
2340 }
2341
2342 public int CalculateSize() {
2343 int size = 0;
2344 if (C != 0) {
2345 size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
2346 }
2347 return size;
2348 }
2349
2350 public void MergeFrom(ForeignMessage other) {
2351 if (other == null) {
2352 return;
2353 }
2354 if (other.C != 0) {
2355 C = other.C;
2356 }
2357 }
2358
2359 public void MergeFrom(pb::CodedInputStream input) {
2360 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01002361 while ((tag = input.ReadTag()) != 0) {
Jon Skeet044c36e2015-08-04 09:25:38 +01002362 switch(tag) {
Jon Skeet044c36e2015-08-04 09:25:38 +01002363 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01002364 input.SkipLastField();
Jon Skeet044c36e2015-08-04 09:25:38 +01002365 break;
2366 case 8: {
2367 C = input.ReadInt32();
2368 break;
2369 }
2370 }
2371 }
2372 }
2373
2374 }
2375
2376 #endregion
2377
2378}
2379
2380#endregion Designer generated code