// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: conformance/test_protos/test_messages_edition_unstable.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code

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

  /// <summary>Holder for reflection information generated from conformance/test_protos/test_messages_edition_unstable.proto</summary>
  public static partial class TestMessagesEditionUnstableReflection {

    #region Descriptor
    /// <summary>File descriptor for conformance/test_protos/test_messages_edition_unstable.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static TestMessagesEditionUnstableReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cjxjb25mb3JtYW5jZS90ZXN0X3Byb3Rvcy90ZXN0X21lc3NhZ2VzX2VkaXRp",
            "b25fdW5zdGFibGUucHJvdG8SJ3Byb3RvYnVmX3Rlc3RfbWVzc2FnZXMuZWRp",
            "dGlvbl91bnN0YWJsZSIdCg5Db21wbGV4TWVzc2FnZRIJCgFkGAEgASgPWAIi",
            "0A4KG1Rlc3RBbGxUeXBlc0VkaXRpb25VbnN0YWJsZRIWCg5vcHRpb25hbF9p",
            "bnQzMhgBIAEoDxJvChhvcHRpb25hbF9mb3JlaWduX21lc3NhZ2UYAiABKAsy",
            "Ri5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLmVkaXRpb25fdW5zdGFibGUuRm9y",
            "ZWlnbk1lc3NhZ2VFZGl0aW9uVW5zdGFibGVCBaoBAigBEmIKFW9wdGlvbmFs",
            "X2ZvcmVpZ25fZW51bRgDIAEoDjJDLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMu",
            "ZWRpdGlvbl91bnN0YWJsZS5Gb3JlaWduRW51bUVkaXRpb25VbnN0YWJsZRJm",
            "ChFyZWN1cnNpdmVfbWVzc2FnZRgEIAEoCzJELnByb3RvYnVmX3Rlc3RfbWVz",
            "c2FnZXMuZWRpdGlvbl91bnN0YWJsZS5UZXN0QWxsVHlwZXNFZGl0aW9uVW5z",
            "dGFibGVCBaoBAigBEhYKDnJlcGVhdGVkX2ludDMyGAUgAygPEm8KGHJlcGVh",
            "dGVkX2ZvcmVpZ25fbWVzc2FnZRgGIAMoCzJGLnByb3RvYnVmX3Rlc3RfbWVz",
            "c2FnZXMuZWRpdGlvbl91bnN0YWJsZS5Gb3JlaWduTWVzc2FnZUVkaXRpb25V",
            "bnN0YWJsZUIFqgECKAESYgoVcmVwZWF0ZWRfZm9yZWlnbl9lbnVtGAcgAygO",
            "MkMucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5lZGl0aW9uX3Vuc3RhYmxlLkZv",
            "cmVpZ25FbnVtRWRpdGlvblVuc3RhYmxlEnAKD21hcF9pbnQzMl9pbnQzMhgI",
            "IAMoCzJXLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMuZWRpdGlvbl91bnN0YWJs",
            "ZS5UZXN0QWxsVHlwZXNFZGl0aW9uVW5zdGFibGUuTWFwSW50MzJJbnQzMkVu",
            "dHJ5EmwKDW1hcF9ib29sX2Jvb2wYCSADKAsyVS5wcm90b2J1Zl90ZXN0X21l",
            "c3NhZ2VzLmVkaXRpb25fdW5zdGFibGUuVGVzdEFsbFR5cGVzRWRpdGlvblVu",
            "c3RhYmxlLk1hcEJvb2xCb29sRW50cnkSdAoRbWFwX3N0cmluZ19zdHJpbmcY",
            "CiADKAsyWS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLmVkaXRpb25fdW5zdGFi",
            "bGUuVGVzdEFsbFR5cGVzRWRpdGlvblVuc3RhYmxlLk1hcFN0cmluZ1N0cmlu",
            "Z0VudHJ5EoUBChptYXBfc3RyaW5nX2ZvcmVpZ25fbWVzc2FnZRgLIAMoCzJh",
            "LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMuZWRpdGlvbl91bnN0YWJsZS5UZXN0",
            "QWxsVHlwZXNFZGl0aW9uVW5zdGFibGUuTWFwU3RyaW5nRm9yZWlnbk1lc3Nh",
            "Z2VFbnRyeRJ/ChdtYXBfc3RyaW5nX2ZvcmVpZ25fZW51bRgMIAMoCzJeLnBy",
            "b3RvYnVmX3Rlc3RfbWVzc2FnZXMuZWRpdGlvbl91bnN0YWJsZS5UZXN0QWxs",
            "VHlwZXNFZGl0aW9uVW5zdGFibGUuTWFwU3RyaW5nRm9yZWlnbkVudW1FbnRy",
            "eRIWCg5vcHRpb25hbF9ieXRlcxgNIAEoDBIWCg5yZXBlYXRlZF9ieXRlcxgO",
            "IAMoDBJyChBtYXBfc3RyaW5nX2J5dGVzGA8gAygLMlgucHJvdG9idWZfdGVz",
            "dF9tZXNzYWdlcy5lZGl0aW9uX3Vuc3RhYmxlLlRlc3RBbGxUeXBlc0VkaXRp",
            "b25VbnN0YWJsZS5NYXBTdHJpbmdCeXRlc0VudHJ5GjQKEk1hcEludDMySW50",
            "MzJFbnRyeRILCgNrZXkYASABKA8SDQoFdmFsdWUYAiABKA86AjgBGjIKEE1h",
            "cEJvb2xCb29sRW50cnkSCwoDa2V5GAEgASgIEg0KBXZhbHVlGAIgASgIOgI4",
            "ARo2ChRNYXBTdHJpbmdTdHJpbmdFbnRyeRILCgNrZXkYASABKAkSDQoFdmFs",
            "dWUYAiABKAk6AjgBGoYBChxNYXBTdHJpbmdGb3JlaWduTWVzc2FnZUVudHJ5",
            "EgsKA2tleRgBIAEoCRJVCgV2YWx1ZRgCIAEoCzJGLnByb3RvYnVmX3Rlc3Rf",
            "bWVzc2FnZXMuZWRpdGlvbl91bnN0YWJsZS5Gb3JlaWduTWVzc2FnZUVkaXRp",
            "b25VbnN0YWJsZToCOAEagAEKGU1hcFN0cmluZ0ZvcmVpZ25FbnVtRW50cnkS",
            "CwoDa2V5GAEgASgJElIKBXZhbHVlGAIgASgOMkMucHJvdG9idWZfdGVzdF9t",
            "ZXNzYWdlcy5lZGl0aW9uX3Vuc3RhYmxlLkZvcmVpZ25FbnVtRWRpdGlvblVu",
            "c3RhYmxlOgI4ARo1ChNNYXBTdHJpbmdCeXRlc0VudHJ5EgsKA2tleRgBIAEo",
            "CRINCgV2YWx1ZRgCIAEoDDoCOAEqBQh4EMkBWAIiLAodRm9yZWlnbk1lc3Nh",
            "Z2VFZGl0aW9uVW5zdGFibGUSCQoBYxgBIAEoD1gCKlEKGkZvcmVpZ25FbnVt",
            "RWRpdGlvblVuc3RhYmxlEg8KC0ZPUkVJR05fRk9PEAASDwoLRk9SRUlHTl9C",
            "QVIQARIPCgtGT1JFSUdOX0JBWhACMAI6XQoPZXh0ZW5zaW9uX2ludDMyEkQu",
            "cHJvdG9idWZfdGVzdF9tZXNzYWdlcy5lZGl0aW9uX3Vuc3RhYmxlLlRlc3RB",
            "bGxUeXBlc0VkaXRpb25VbnN0YWJsZRh4IAEoD0JLCjJjb20uZ29vZ2xlLnBy",
            "b3RvYnVmX3Rlc3RfbWVzc2FnZXMuZWRpdGlvbl91bnN0YWJsZaICD0VkaXRp",
            "b25VbnN0YWJsZZIDAigCYghlZGl0aW9uc3CPTg=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable), }, new pb::Extension[] { TestMessagesEditionUnstableExtensions.ExtensionInt32 }, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.EditionUnstable.ComplexMessage), global::ProtobufTestMessages.EditionUnstable.ComplexMessage.Parser, new[]{ "D" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable), global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable.Parser, new[]{ "OptionalInt32", "OptionalForeignMessage", "OptionalForeignEnum", "RecursiveMessage", "RepeatedInt32", "RepeatedForeignMessage", "RepeatedForeignEnum", "MapInt32Int32", "MapBoolBool", "MapStringString", "MapStringForeignMessage", "MapStringForeignEnum", "OptionalBytes", "RepeatedBytes", "MapStringBytes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable), global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable.Parser, new[]{ "C" }, null, null, null, null)
          }));
    }
    #endregion

  }
  /// <summary>Holder for extension identifiers generated from the top level of conformance/test_protos/test_messages_edition_unstable.proto</summary>
  public static partial class TestMessagesEditionUnstableExtensions {
    public static readonly pb::Extension<global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable, int> ExtensionInt32 =
      new pb::Extension<global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable, int>(120, pb::FieldCodec.ForSFixed32(965, 0));
  }

  #region Enums
  public enum ForeignEnumEditionUnstable {
    [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 0,
    [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 1,
    [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 2,
  }

  #endregion

  #region Messages
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class ComplexMessage : pb::IMessage<ComplexMessage>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<ComplexMessage> _parser = new pb::MessageParser<ComplexMessage>(() => new ComplexMessage());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<ComplexMessage> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ProtobufTestMessages.EditionUnstable.TestMessagesEditionUnstableReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ComplexMessage() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ComplexMessage(ComplexMessage other) : this() {
      _hasBits0 = other._hasBits0;
      d_ = other.d_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ComplexMessage Clone() {
      return new ComplexMessage(this);
    }

    /// <summary>Field number for the "d" field.</summary>
    public const int DFieldNumber = 1;
    private readonly static int DDefaultValue = 0;

    private int d_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int D {
      get { if ((_hasBits0 & 1) != 0) { return d_; } else { return DDefaultValue; } }
      set {
        _hasBits0 |= 1;
        d_ = value;
      }
    }
    /// <summary>Gets whether the "d" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasD {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "d" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearD() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as ComplexMessage);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ComplexMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (D != other.D) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (HasD) hash ^= D.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (HasD) {
        output.WriteRawTag(13);
        output.WriteSFixed32(D);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (HasD) {
        output.WriteRawTag(13);
        output.WriteSFixed32(D);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (HasD) {
        size += 1 + 4;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ComplexMessage other) {
      if (other == null) {
        return;
      }
      if (other.HasD) {
        D = other.D;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 13: {
            D = input.ReadSFixed32();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 13: {
            D = input.ReadSFixed32();
            break;
          }
        }
      }
    }
    #endif

  }

  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class TestAllTypesEditionUnstable : pb::IExtendableMessage<TestAllTypesEditionUnstable>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<TestAllTypesEditionUnstable> _parser = new pb::MessageParser<TestAllTypesEditionUnstable>(() => new TestAllTypesEditionUnstable());
    private pb::UnknownFieldSet _unknownFields;
    private pb::ExtensionSet<TestAllTypesEditionUnstable> _extensions;
    private pb::ExtensionSet<TestAllTypesEditionUnstable>  _Extensions { get { return _extensions; } }
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<TestAllTypesEditionUnstable> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ProtobufTestMessages.EditionUnstable.TestMessagesEditionUnstableReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TestAllTypesEditionUnstable() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TestAllTypesEditionUnstable(TestAllTypesEditionUnstable other) : this() {
      _hasBits0 = other._hasBits0;
      optionalInt32_ = other.optionalInt32_;
      optionalForeignMessage_ = other.optionalForeignMessage_ != null ? other.optionalForeignMessage_.Clone() : null;
      optionalForeignEnum_ = other.optionalForeignEnum_;
      recursiveMessage_ = other.recursiveMessage_ != null ? other.recursiveMessage_.Clone() : null;
      repeatedInt32_ = other.repeatedInt32_.Clone();
      repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
      repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
      mapInt32Int32_ = other.mapInt32Int32_.Clone();
      mapBoolBool_ = other.mapBoolBool_.Clone();
      mapStringString_ = other.mapStringString_.Clone();
      mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone();
      mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone();
      optionalBytes_ = other.optionalBytes_;
      repeatedBytes_ = other.repeatedBytes_.Clone();
      mapStringBytes_ = other.mapStringBytes_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
      _extensions = pb::ExtensionSet.Clone(other._extensions);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TestAllTypesEditionUnstable Clone() {
      return new TestAllTypesEditionUnstable(this);
    }

    /// <summary>Field number for the "optional_int32" field.</summary>
    public const int OptionalInt32FieldNumber = 1;
    private readonly static int OptionalInt32DefaultValue = 0;

    private int optionalInt32_;
    /// <summary>
    /// Singular
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int OptionalInt32 {
      get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } }
      set {
        _hasBits0 |= 1;
        optionalInt32_ = value;
      }
    }
    /// <summary>Gets whether the "optional_int32" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasOptionalInt32 {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "optional_int32" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearOptionalInt32() {
      _hasBits0 &= ~1;
    }

    /// <summary>Field number for the "optional_foreign_message" field.</summary>
    public const int OptionalForeignMessageFieldNumber = 2;
    private global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable optionalForeignMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable OptionalForeignMessage {
      get { return optionalForeignMessage_; }
      set {
        optionalForeignMessage_ = value;
      }
    }

    /// <summary>Field number for the "optional_foreign_enum" field.</summary>
    public const int OptionalForeignEnumFieldNumber = 3;
    private readonly static global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable OptionalForeignEnumDefaultValue = global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable.ForeignFoo;

    private global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable optionalForeignEnum_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable OptionalForeignEnum {
      get { if ((_hasBits0 & 2) != 0) { return optionalForeignEnum_; } else { return OptionalForeignEnumDefaultValue; } }
      set {
        _hasBits0 |= 2;
        optionalForeignEnum_ = value;
      }
    }
    /// <summary>Gets whether the "optional_foreign_enum" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasOptionalForeignEnum {
      get { return (_hasBits0 & 2) != 0; }
    }
    /// <summary>Clears the value of the "optional_foreign_enum" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearOptionalForeignEnum() {
      _hasBits0 &= ~2;
    }

    /// <summary>Field number for the "recursive_message" field.</summary>
    public const int RecursiveMessageFieldNumber = 4;
    private global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable recursiveMessage_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable RecursiveMessage {
      get { return recursiveMessage_; }
      set {
        recursiveMessage_ = value;
      }
    }

    /// <summary>Field number for the "repeated_int32" field.</summary>
    public const int RepeatedInt32FieldNumber = 5;
    private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
        = pb::FieldCodec.ForSFixed32(42);
    private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
    /// <summary>
    /// Repeated
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<int> RepeatedInt32 {
      get { return repeatedInt32_; }
    }

    /// <summary>Field number for the "repeated_foreign_message" field.</summary>
    public const int RepeatedForeignMessageFieldNumber = 6;
    private static readonly pb::FieldCodec<global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable> _repeated_repeatedForeignMessage_codec
        = pb::FieldCodec.ForMessage(50, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable.Parser);
    private readonly pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable> repeatedForeignMessage_ = new pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable> RepeatedForeignMessage {
      get { return repeatedForeignMessage_; }
    }

    /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
    public const int RepeatedForeignEnumFieldNumber = 7;
    private static readonly pb::FieldCodec<global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable> _repeated_repeatedForeignEnum_codec
        = pb::FieldCodec.ForEnum(58, x => (int) x, x => (global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable) x);
    private readonly pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable> repeatedForeignEnum_ = new pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable> RepeatedForeignEnum {
      get { return repeatedForeignEnum_; }
    }

    /// <summary>Field number for the "map_int32_int32" field.</summary>
    public const int MapInt32Int32FieldNumber = 8;
    private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
        = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13, 0), pb::FieldCodec.ForSFixed32(21, 0), 66);
    private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
    /// <summary>
    /// Map
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<int, int> MapInt32Int32 {
      get { return mapInt32Int32_; }
    }

    /// <summary>Field number for the "map_bool_bool" field.</summary>
    public const int MapBoolBoolFieldNumber = 9;
    private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
        = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8, false), pb::FieldCodec.ForBool(16, false), 74);
    private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<bool, bool> MapBoolBool {
      get { return mapBoolBool_; }
    }

    /// <summary>Field number for the "map_string_string" field.</summary>
    public const int MapStringStringFieldNumber = 10;
    private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 82);
    private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> MapStringString {
      get { return mapStringString_; }
    }

    /// <summary>Field number for the "map_string_foreign_message" field.</summary>
    public const int MapStringForeignMessageFieldNumber = 11;
    private static readonly pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable>.Codec _map_mapStringForeignMessage_codec
        = new pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable.Parser), 90);
    private readonly pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable> mapStringForeignMessage_ = new pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable> MapStringForeignMessage {
      get { return mapStringForeignMessage_; }
    }

    /// <summary>Field number for the "map_string_foreign_enum" field.</summary>
    public const int MapStringForeignEnumFieldNumber = 12;
    private static readonly pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable>.Codec _map_mapStringForeignEnum_codec
        = new pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable) x, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable.ForeignFoo), 98);
    private readonly pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable> mapStringForeignEnum_ = new pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable> MapStringForeignEnum {
      get { return mapStringForeignEnum_; }
    }

    /// <summary>Field number for the "optional_bytes" field.</summary>
    public const int OptionalBytesFieldNumber = 13;
    private readonly static pb::ByteString OptionalBytesDefaultValue = pb::ByteString.Empty;

    private pb::ByteString optionalBytes_;
    /// <summary>
    /// bytes
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString OptionalBytes {
      get { return optionalBytes_ ?? OptionalBytesDefaultValue; }
      set {
        optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// <summary>Gets whether the "optional_bytes" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasOptionalBytes {
      get { return optionalBytes_ != null; }
    }
    /// <summary>Clears the value of the "optional_bytes" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearOptionalBytes() {
      optionalBytes_ = null;
    }

    /// <summary>Field number for the "repeated_bytes" field.</summary>
    public const int RepeatedBytesFieldNumber = 14;
    private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
        = pb::FieldCodec.ForBytes(114);
    private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
      get { return repeatedBytes_; }
    }

    /// <summary>Field number for the "map_string_bytes" field.</summary>
    public const int MapStringBytesFieldNumber = 15;
    private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_mapStringBytes_codec
        = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForBytes(18, pb::ByteString.Empty), 122);
    private readonly pbc::MapField<string, pb::ByteString> mapStringBytes_ = new pbc::MapField<string, pb::ByteString>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, pb::ByteString> MapStringBytes {
      get { return mapStringBytes_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as TestAllTypesEditionUnstable);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(TestAllTypesEditionUnstable other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (OptionalInt32 != other.OptionalInt32) return false;
      if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false;
      if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
      if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) return false;
      if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
      if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
      if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
      if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
      if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
      if (!MapStringString.Equals(other.MapStringString)) return false;
      if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false;
      if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) return false;
      if (OptionalBytes != other.OptionalBytes) return false;
      if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
      if (!MapStringBytes.Equals(other.MapStringBytes)) return false;
      if (!Equals(_extensions, other._extensions)) {
        return false;
      }
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode();
      if (optionalForeignMessage_ != null) hash ^= OptionalForeignMessage.GetHashCode();
      if (HasOptionalForeignEnum) hash ^= OptionalForeignEnum.GetHashCode();
      if (recursiveMessage_ != null) hash ^= RecursiveMessage.GetHashCode();
      hash ^= repeatedInt32_.GetHashCode();
      hash ^= repeatedForeignMessage_.GetHashCode();
      hash ^= repeatedForeignEnum_.GetHashCode();
      hash ^= MapInt32Int32.GetHashCode();
      hash ^= MapBoolBool.GetHashCode();
      hash ^= MapStringString.GetHashCode();
      hash ^= MapStringForeignMessage.GetHashCode();
      hash ^= MapStringForeignEnum.GetHashCode();
      if (HasOptionalBytes) hash ^= OptionalBytes.GetHashCode();
      hash ^= repeatedBytes_.GetHashCode();
      hash ^= MapStringBytes.GetHashCode();
      if (_extensions != null) {
        hash ^= _extensions.GetHashCode();
      }
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (HasOptionalInt32) {
        output.WriteRawTag(13);
        output.WriteSFixed32(OptionalInt32);
      }
      if (optionalForeignMessage_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(OptionalForeignMessage);
      }
      if (HasOptionalForeignEnum) {
        output.WriteRawTag(24);
        output.WriteEnum((int) OptionalForeignEnum);
      }
      if (recursiveMessage_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(RecursiveMessage);
      }
      repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
      repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
      repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
      mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
      mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
      mapStringString_.WriteTo(output, _map_mapStringString_codec);
      mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec);
      mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec);
      if (HasOptionalBytes) {
        output.WriteRawTag(106);
        output.WriteBytes(OptionalBytes);
      }
      repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
      mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec);
      if (_extensions != null) {
        _extensions.WriteTo(output);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (HasOptionalInt32) {
        output.WriteRawTag(13);
        output.WriteSFixed32(OptionalInt32);
      }
      if (optionalForeignMessage_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(OptionalForeignMessage);
      }
      if (HasOptionalForeignEnum) {
        output.WriteRawTag(24);
        output.WriteEnum((int) OptionalForeignEnum);
      }
      if (recursiveMessage_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(RecursiveMessage);
      }
      repeatedInt32_.WriteTo(ref output, _repeated_repeatedInt32_codec);
      repeatedForeignMessage_.WriteTo(ref output, _repeated_repeatedForeignMessage_codec);
      repeatedForeignEnum_.WriteTo(ref output, _repeated_repeatedForeignEnum_codec);
      mapInt32Int32_.WriteTo(ref output, _map_mapInt32Int32_codec);
      mapBoolBool_.WriteTo(ref output, _map_mapBoolBool_codec);
      mapStringString_.WriteTo(ref output, _map_mapStringString_codec);
      mapStringForeignMessage_.WriteTo(ref output, _map_mapStringForeignMessage_codec);
      mapStringForeignEnum_.WriteTo(ref output, _map_mapStringForeignEnum_codec);
      if (HasOptionalBytes) {
        output.WriteRawTag(106);
        output.WriteBytes(OptionalBytes);
      }
      repeatedBytes_.WriteTo(ref output, _repeated_repeatedBytes_codec);
      mapStringBytes_.WriteTo(ref output, _map_mapStringBytes_codec);
      if (_extensions != null) {
        _extensions.WriteTo(ref output);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (HasOptionalInt32) {
        size += 1 + 4;
      }
      if (optionalForeignMessage_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage);
      }
      if (HasOptionalForeignEnum) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
      }
      if (recursiveMessage_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage);
      }
      size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
      size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
      size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
      size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
      size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
      size += mapStringString_.CalculateSize(_map_mapStringString_codec);
      size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec);
      size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec);
      if (HasOptionalBytes) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
      }
      size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
      size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec);
      if (_extensions != null) {
        size += _extensions.CalculateSize();
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(TestAllTypesEditionUnstable other) {
      if (other == null) {
        return;
      }
      if (other.HasOptionalInt32) {
        OptionalInt32 = other.OptionalInt32;
      }
      if (other.optionalForeignMessage_ != null) {
        if (optionalForeignMessage_ == null) {
          OptionalForeignMessage = new global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable();
        }
        OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage);
      }
      if (other.HasOptionalForeignEnum) {
        OptionalForeignEnum = other.OptionalForeignEnum;
      }
      if (other.recursiveMessage_ != null) {
        if (recursiveMessage_ == null) {
          RecursiveMessage = new global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable();
        }
        RecursiveMessage.MergeFrom(other.RecursiveMessage);
      }
      repeatedInt32_.Add(other.repeatedInt32_);
      repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
      repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
      mapInt32Int32_.MergeFrom(other.mapInt32Int32_);
      mapBoolBool_.MergeFrom(other.mapBoolBool_);
      mapStringString_.MergeFrom(other.mapStringString_);
      mapStringForeignMessage_.MergeFrom(other.mapStringForeignMessage_);
      mapStringForeignEnum_.MergeFrom(other.mapStringForeignEnum_);
      if (other.HasOptionalBytes) {
        OptionalBytes = other.OptionalBytes;
      }
      repeatedBytes_.Add(other.repeatedBytes_);
      mapStringBytes_.MergeFrom(other.mapStringBytes_);
      pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
              _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            }
            break;
          case 13: {
            OptionalInt32 = input.ReadSFixed32();
            break;
          }
          case 18: {
            if (optionalForeignMessage_ == null) {
              OptionalForeignMessage = new global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable();
            }
            input.ReadMessage(OptionalForeignMessage);
            break;
          }
          case 24: {
            OptionalForeignEnum = (global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable) input.ReadEnum();
            break;
          }
          case 34: {
            if (recursiveMessage_ == null) {
              RecursiveMessage = new global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable();
            }
            input.ReadMessage(RecursiveMessage);
            break;
          }
          case 42:
          case 45: {
            repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
            break;
          }
          case 50: {
            repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
            break;
          }
          case 58:
          case 56: {
            repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
            break;
          }
          case 66: {
            mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
            break;
          }
          case 74: {
            mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
            break;
          }
          case 82: {
            mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
            break;
          }
          case 90: {
            mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec);
            break;
          }
          case 98: {
            mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec);
            break;
          }
          case 106: {
            OptionalBytes = input.ReadBytes();
            break;
          }
          case 114: {
            repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
            break;
          }
          case 122: {
            mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) {
              _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            }
            break;
          case 13: {
            OptionalInt32 = input.ReadSFixed32();
            break;
          }
          case 18: {
            if (optionalForeignMessage_ == null) {
              OptionalForeignMessage = new global::ProtobufTestMessages.EditionUnstable.ForeignMessageEditionUnstable();
            }
            input.ReadMessage(OptionalForeignMessage);
            break;
          }
          case 24: {
            OptionalForeignEnum = (global::ProtobufTestMessages.EditionUnstable.ForeignEnumEditionUnstable) input.ReadEnum();
            break;
          }
          case 34: {
            if (recursiveMessage_ == null) {
              RecursiveMessage = new global::ProtobufTestMessages.EditionUnstable.TestAllTypesEditionUnstable();
            }
            input.ReadMessage(RecursiveMessage);
            break;
          }
          case 42:
          case 45: {
            repeatedInt32_.AddEntriesFrom(ref input, _repeated_repeatedInt32_codec);
            break;
          }
          case 50: {
            repeatedForeignMessage_.AddEntriesFrom(ref input, _repeated_repeatedForeignMessage_codec);
            break;
          }
          case 58:
          case 56: {
            repeatedForeignEnum_.AddEntriesFrom(ref input, _repeated_repeatedForeignEnum_codec);
            break;
          }
          case 66: {
            mapInt32Int32_.AddEntriesFrom(ref input, _map_mapInt32Int32_codec);
            break;
          }
          case 74: {
            mapBoolBool_.AddEntriesFrom(ref input, _map_mapBoolBool_codec);
            break;
          }
          case 82: {
            mapStringString_.AddEntriesFrom(ref input, _map_mapStringString_codec);
            break;
          }
          case 90: {
            mapStringForeignMessage_.AddEntriesFrom(ref input, _map_mapStringForeignMessage_codec);
            break;
          }
          case 98: {
            mapStringForeignEnum_.AddEntriesFrom(ref input, _map_mapStringForeignEnum_codec);
            break;
          }
          case 106: {
            OptionalBytes = input.ReadBytes();
            break;
          }
          case 114: {
            repeatedBytes_.AddEntriesFrom(ref input, _repeated_repeatedBytes_codec);
            break;
          }
          case 122: {
            mapStringBytes_.AddEntriesFrom(ref input, _map_mapStringBytes_codec);
            break;
          }
        }
      }
    }
    #endif

    public TValue GetExtension<TValue>(pb::Extension<TestAllTypesEditionUnstable, TValue> extension) {
      return pb::ExtensionSet.Get(ref _extensions, extension);
    }
    public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestAllTypesEditionUnstable, TValue> extension) {
      return pb::ExtensionSet.Get(ref _extensions, extension);
    }
    public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<TestAllTypesEditionUnstable, TValue> extension) {
      return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension);
    }
    public void SetExtension<TValue>(pb::Extension<TestAllTypesEditionUnstable, TValue> extension, TValue value) {
      pb::ExtensionSet.Set(ref _extensions, extension, value);
    }
    public bool HasExtension<TValue>(pb::Extension<TestAllTypesEditionUnstable, TValue> extension) {
      return pb::ExtensionSet.Has(ref _extensions, extension);
    }
    public void ClearExtension<TValue>(pb::Extension<TestAllTypesEditionUnstable, TValue> extension) {
      pb::ExtensionSet.Clear(ref _extensions, extension);
    }
    public void ClearExtension<TValue>(pb::RepeatedExtension<TestAllTypesEditionUnstable, TValue> extension) {
      pb::ExtensionSet.Clear(ref _extensions, extension);
    }

  }

  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class ForeignMessageEditionUnstable : pb::IMessage<ForeignMessageEditionUnstable>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<ForeignMessageEditionUnstable> _parser = new pb::MessageParser<ForeignMessageEditionUnstable>(() => new ForeignMessageEditionUnstable());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<ForeignMessageEditionUnstable> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ProtobufTestMessages.EditionUnstable.TestMessagesEditionUnstableReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ForeignMessageEditionUnstable() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ForeignMessageEditionUnstable(ForeignMessageEditionUnstable other) : this() {
      _hasBits0 = other._hasBits0;
      c_ = other.c_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ForeignMessageEditionUnstable Clone() {
      return new ForeignMessageEditionUnstable(this);
    }

    /// <summary>Field number for the "c" field.</summary>
    public const int CFieldNumber = 1;
    private readonly static int CDefaultValue = 0;

    private int c_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int C {
      get { if ((_hasBits0 & 1) != 0) { return c_; } else { return CDefaultValue; } }
      set {
        _hasBits0 |= 1;
        c_ = value;
      }
    }
    /// <summary>Gets whether the "c" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasC {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// <summary>Clears the value of the "c" field</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearC() {
      _hasBits0 &= ~1;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as ForeignMessageEditionUnstable);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ForeignMessageEditionUnstable other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (C != other.C) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (HasC) hash ^= C.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (HasC) {
        output.WriteRawTag(13);
        output.WriteSFixed32(C);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (HasC) {
        output.WriteRawTag(13);
        output.WriteSFixed32(C);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (HasC) {
        size += 1 + 4;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ForeignMessageEditionUnstable other) {
      if (other == null) {
        return;
      }
      if (other.HasC) {
        C = other.C;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 13: {
            C = input.ReadSFixed32();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 13: {
            C = input.ReadSFixed32();
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
