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