// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mysqlx_connection.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

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

  /// <summary>Holder for reflection information generated from mysqlx_connection.proto</summary>
  internal static partial class MysqlxConnectionReflection {

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

    static MysqlxConnectionReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChdteXNxbHhfY29ubmVjdGlvbi5wcm90bxIRTXlzcWx4LkNvbm5lY3Rpb24a",
            "Fm15c3FseF9kYXRhdHlwZXMucHJvdG8aDG15c3FseC5wcm90byJACgpDYXBh",
            "YmlsaXR5EgwKBG5hbWUYASABKAkSJAoFdmFsdWUYAiABKAsyFS5NeXNxbHgu",
            "RGF0YXR5cGVzLkFueSJDCgxDYXBhYmlsaXRpZXMSMwoMY2FwYWJpbGl0aWVz",
            "GAEgAygLMh0uTXlzcWx4LkNvbm5lY3Rpb24uQ2FwYWJpbGl0eSIRCg9DYXBh",
            "YmlsaXRpZXNHZXQiSAoPQ2FwYWJpbGl0aWVzU2V0EjUKDGNhcGFiaWxpdGll",
            "cxgBIAEoCzIfLk15c3FseC5Db25uZWN0aW9uLkNhcGFiaWxpdGllcyIHCgVD",
            "bG9zZSKlAQoLQ29tcHJlc3Npb24SGQoRdW5jb21wcmVzc2VkX3NpemUYASAB",
            "KAQSNAoPc2VydmVyX21lc3NhZ2VzGAIgASgOMhsuTXlzcWx4LlNlcnZlck1l",
            "c3NhZ2VzLlR5cGUSNAoPY2xpZW50X21lc3NhZ2VzGAMgASgOMhsuTXlzcWx4",
            "LkNsaWVudE1lc3NhZ2VzLlR5cGUSDwoHcGF5bG9hZBgEIAEoDEIZChdjb20u",
            "bXlzcWwuY2oueC5wcm90b2J1ZmIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Mysqlx.Datatypes.MysqlxDatatypesReflection.Descriptor, global::Mysqlx.MysqlxReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.Capability), global::Mysqlx.Connection.Capability.Parser, new[]{ "Name", "Value" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.Capabilities), global::Mysqlx.Connection.Capabilities.Parser, new[]{ "Capabilities_" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.CapabilitiesGet), global::Mysqlx.Connection.CapabilitiesGet.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.CapabilitiesSet), global::Mysqlx.Connection.CapabilitiesSet.Parser, new[]{ "Capabilities" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.Close), global::Mysqlx.Connection.Close.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Connection.Compression), global::Mysqlx.Connection.Compression.Parser, new[]{ "UncompressedSize", "ServerMessages", "ClientMessages", "Payload" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  /// <summary>
  ///  a Capability
  ///
  ///  a tuple of a ``name`` and a :protobuf:msg:`Mysqlx.Datatypes::Any`
  /// </summary>
  internal sealed partial class Capability : pb::IMessage<Capability> {
    private static readonly pb::MessageParser<Capability> _parser = new pb::MessageParser<Capability>(() => new Capability());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Capability> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Capability(Capability other) : this() {
      name_ = other.name_;
      Value = other.value_ != null ? other.Value.Clone() : null;
    }

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

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 1;
    private string name_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "value" field.</summary>
    public const int ValueFieldNumber = 2;
    private global::Mysqlx.Datatypes.Any value_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Datatypes.Any Value {
      get { return value_; }
      set {
        value_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Capability other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Name != other.Name) return false;
      if (!object.Equals(Value, other.Value)) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (value_ != null) hash ^= Value.GetHashCode();
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (value_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Value);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (value_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value);
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Capability other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.value_ != null) {
        if (value_ == null) {
          value_ = new global::Mysqlx.Datatypes.Any();
        }
        Value.MergeFrom(other.Value);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 18: {
            if (value_ == null) {
              value_ = new global::Mysqlx.Datatypes.Any();
            }
            input.ReadMessage(value_);
            break;
          }
        }
      }
    }

  }

  /// <summary>
  ///  Capabilities
  /// </summary>
  internal sealed partial class Capabilities : pb::IMessage<Capabilities> {
    private static readonly pb::MessageParser<Capabilities> _parser = new pb::MessageParser<Capabilities>(() => new Capabilities());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Capabilities> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Connection.MysqlxConnectionReflection.Descriptor.MessageTypes[1]; }
    }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Capabilities(Capabilities other) : this() {
      capabilities_ = other.capabilities_.Clone();
    }

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

    /// <summary>Field number for the "capabilities" field.</summary>
    public const int Capabilities_FieldNumber = 1;
    private static readonly pb::FieldCodec<global::Mysqlx.Connection.Capability> _repeated_capabilities_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Connection.Capability.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Connection.Capability> capabilities_ = new pbc::RepeatedField<global::Mysqlx.Connection.Capability>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Connection.Capability> Capabilities_ {
      get { return capabilities_; }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= capabilities_.GetHashCode();
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      capabilities_.WriteTo(output, _repeated_capabilities_codec);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += capabilities_.CalculateSize(_repeated_capabilities_codec);
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Capabilities other) {
      if (other == null) {
        return;
      }
      capabilities_.Add(other.capabilities_);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            capabilities_.AddEntriesFrom(input, _repeated_capabilities_codec);
            break;
          }
        }
      }
    }

  }

  /// <summary>
  ///  get supported connection capabilities and their current state
  ///
  ///    :returns: :protobuf:msg:`Mysqlx.Connection::Capabilities` or :protobuf:msg:`Mysqlx::Error`
  /// </summary>
  internal sealed partial class CapabilitiesGet : pb::IMessage<CapabilitiesGet> {
    private static readonly pb::MessageParser<CapabilitiesGet> _parser = new pb::MessageParser<CapabilitiesGet>(() => new CapabilitiesGet());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<CapabilitiesGet> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Connection.MysqlxConnectionReflection.Descriptor.MessageTypes[2]; }
    }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public CapabilitiesGet(CapabilitiesGet other) : this() {
    }

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(CapabilitiesGet other) {
      if (other == null) {
        return;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
        }
      }
    }

  }

  /// <summary>
  ///  sets connection capabilities atomically
  ///
  ///  only provided values are changed, other values are left unchanged.
  ///  If any of the changes fails, all changes are discarded.
  ///
  ///  :precond: active sessions == 0
  ///  :returns: :protobuf:msg:`Mysqlx::Ok` or :protobuf:msg:`Mysqlx::Error`
  /// </summary>
  internal sealed partial class CapabilitiesSet : pb::IMessage<CapabilitiesSet> {
    private static readonly pb::MessageParser<CapabilitiesSet> _parser = new pb::MessageParser<CapabilitiesSet>(() => new CapabilitiesSet());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<CapabilitiesSet> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Connection.MysqlxConnectionReflection.Descriptor.MessageTypes[3]; }
    }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public CapabilitiesSet(CapabilitiesSet other) : this() {
      Capabilities = other.capabilities_ != null ? other.Capabilities.Clone() : null;
    }

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

    /// <summary>Field number for the "capabilities" field.</summary>
    public const int CapabilitiesFieldNumber = 1;
    private global::Mysqlx.Connection.Capabilities capabilities_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Connection.Capabilities Capabilities {
      get { return capabilities_; }
      set {
        capabilities_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (capabilities_ != null) hash ^= Capabilities.GetHashCode();
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (capabilities_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Capabilities);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (capabilities_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Capabilities);
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(CapabilitiesSet other) {
      if (other == null) {
        return;
      }
      if (other.capabilities_ != null) {
        if (capabilities_ == null) {
          capabilities_ = new global::Mysqlx.Connection.Capabilities();
        }
        Capabilities.MergeFrom(other.Capabilities);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (capabilities_ == null) {
              capabilities_ = new global::Mysqlx.Connection.Capabilities();
            }
            input.ReadMessage(capabilities_);
            break;
          }
        }
      }
    }

  }

  /// <summary>
  ///  announce to the server that the client wants to close the connection
  ///
  ///  it discards any session state of the server
  ///
  ///  :Returns: :protobuf:msg:`Mysqlx::Ok`
  /// </summary>
  internal sealed partial class Close : pb::IMessage<Close> {
    private static readonly pb::MessageParser<Close> _parser = new pb::MessageParser<Close>(() => new Close());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Close> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Connection.MysqlxConnectionReflection.Descriptor.MessageTypes[4]; }
    }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Close(Close other) : this() {
    }

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Close other) {
      if (other == null) {
        return;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
        }
      }
    }

  }

  internal sealed partial class Compression : pb::IMessage<Compression> {
    private static readonly pb::MessageParser<Compression> _parser = new pb::MessageParser<Compression>(() => new Compression());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Compression> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Connection.MysqlxConnectionReflection.Descriptor.MessageTypes[5]; }
    }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Compression(Compression other) : this() {
      uncompressedSize_ = other.uncompressedSize_;
      serverMessages_ = other.serverMessages_;
      clientMessages_ = other.clientMessages_;
      payload_ = other.payload_;
    }

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

    /// <summary>Field number for the "uncompressed_size" field.</summary>
    public const int UncompressedSizeFieldNumber = 1;
    private ulong uncompressedSize_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ulong UncompressedSize {
      get { return uncompressedSize_; }
      set {
        uncompressedSize_ = value;
      }
    }

    /// <summary>Field number for the "server_messages" field.</summary>
    public const int ServerMessagesFieldNumber = 2;
    private global::Mysqlx.ServerMessages.Types.Type serverMessages_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.ServerMessages.Types.Type ServerMessages {
      get { return serverMessages_; }
      set {
        serverMessages_ = value;
      }
    }

    /// <summary>Field number for the "client_messages" field.</summary>
    public const int ClientMessagesFieldNumber = 3;
    private global::Mysqlx.ClientMessages.Types.Type clientMessages_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.ClientMessages.Types.Type ClientMessages {
      get { return clientMessages_; }
      set {
        clientMessages_ = value;
      }
    }

    /// <summary>Field number for the "payload" field.</summary>
    public const int PayloadFieldNumber = 4;
    private pb::ByteString payload_ = pb::ByteString.Empty;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pb::ByteString Payload {
      get { return payload_; }
      set {
        payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Compression other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (UncompressedSize != other.UncompressedSize) return false;
      if (ServerMessages != other.ServerMessages) return false;
      if (ClientMessages != other.ClientMessages) return false;
      if (Payload != other.Payload) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (UncompressedSize != 0UL) hash ^= UncompressedSize.GetHashCode();
      if (ServerMessages != 0) hash ^= ServerMessages.GetHashCode();
      if (ClientMessages != 0) hash ^= ClientMessages.GetHashCode();
      if (Payload.Length != 0) hash ^= Payload.GetHashCode();
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (UncompressedSize != 0UL) {
        output.WriteRawTag(8);
        output.WriteUInt64(UncompressedSize);
      }
      if (ServerMessages != 0) {
        output.WriteRawTag(16);
        output.WriteEnum((int) ServerMessages);
      }
      if (ClientMessages != 0) {
        output.WriteRawTag(24);
        output.WriteEnum((int) ClientMessages);
      }
      if (Payload.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(Payload);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (UncompressedSize != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(UncompressedSize);
      }
      if (ServerMessages != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerMessages);
      }
      if (ClientMessages != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientMessages);
      }
      if (Payload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Compression other) {
      if (other == null) {
        return;
      }
      if (other.UncompressedSize != 0UL) {
        UncompressedSize = other.UncompressedSize;
      }
      if (other.ServerMessages != 0) {
        ServerMessages = other.ServerMessages;
      }
      if (other.ClientMessages != 0) {
        ClientMessages = other.ClientMessages;
      }
      if (other.Payload.Length != 0) {
        Payload = other.Payload;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            UncompressedSize = input.ReadUInt64();
            break;
          }
          case 16: {
            serverMessages_ = (global::Mysqlx.ServerMessages.Types.Type) input.ReadEnum();
            break;
          }
          case 24: {
            clientMessages_ = (global::Mysqlx.ClientMessages.Types.Type) input.ReadEnum();
            break;
          }
          case 34: {
            Payload = input.ReadBytes();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
