// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: mysqlx_prepare.proto
// </auto-generated>
#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.Prepare {

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

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

    static MysqlxPrepareReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChRteXNxbHhfcHJlcGFyZS5wcm90bxIOTXlzcWx4LlByZXBhcmUaDG15c3Fs",
            "eC5wcm90bxoQbXlzcWx4X3NxbC5wcm90bxoRbXlzcWx4X2NydWQucHJvdG8a",
            "Fm15c3FseF9kYXRhdHlwZXMucHJvdG8iqQMKB1ByZXBhcmUSDwoHc3RtdF9p",
            "ZBgBIAEoDRIyCgRzdG10GAIgASgLMiQuTXlzcWx4LlByZXBhcmUuUHJlcGFy",
            "ZS5PbmVPZk1lc3NhZ2Ua2AIKDE9uZU9mTWVzc2FnZRI5CgR0eXBlGAEgASgO",
            "MikuTXlzcWx4LlByZXBhcmUuUHJlcGFyZS5PbmVPZk1lc3NhZ2UuVHlwZUgA",
            "Eh8KBGZpbmQYAiABKAsyES5NeXNxbHguQ3J1ZC5GaW5kEiMKBmluc2VydBgD",
            "IAEoCzITLk15c3FseC5DcnVkLkluc2VydBIjCgZ1cGRhdGUYBCABKAsyEy5N",
            "eXNxbHguQ3J1ZC5VcGRhdGUSIwoGZGVsZXRlGAUgASgLMhMuTXlzcWx4LkNy",
            "dWQuRGVsZXRlEi0KDHN0bXRfZXhlY3V0ZRgGIAEoCzIXLk15c3FseC5TcWwu",
            "U3RtdEV4ZWN1dGUiPgoEVHlwZRIICgRGSU5EEAASCgoGSU5TRVJUEAESCgoG",
            "VVBEQVRFEAISCgoGREVMRVRFEAQSCAoEU1RNVBAFQg4KDFR5cGVfcHJlc2Vu",
            "dCJZCgdFeGVjdXRlEg8KB3N0bXRfaWQYASABKA0SIwoEYXJncxgCIAMoCzIV",
            "Lk15c3FseC5EYXRhdHlwZXMuQW55EhgKEGNvbXBhY3RfbWV0YWRhdGEYAyAB",
            "KAgiHQoKRGVhbGxvY2F0ZRIPCgdzdG10X2lkGAEgASgNQhkKF2NvbS5teXNx",
            "bC5jai54LnByb3RvYnVmYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Mysqlx.MysqlxReflection.Descriptor, global::Mysqlx.Sql.MysqlxSqlReflection.Descriptor, global::Mysqlx.Crud.MysqlxCrudReflection.Descriptor, global::Mysqlx.Datatypes.MysqlxDatatypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Prepare.Prepare), global::Mysqlx.Prepare.Prepare.Parser, new[]{ "StmtId", "Stmt" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Prepare.Prepare.Types.OneOfMessage), global::Mysqlx.Prepare.Prepare.Types.OneOfMessage.Parser, new[]{ "Type", "Find", "Insert", "Update", "Delete", "StmtExecute" }, new[]{ "TypePresent" }, new[]{ typeof(global::Mysqlx.Prepare.Prepare.Types.OneOfMessage.Types.Type) }, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Prepare.Execute), global::Mysqlx.Prepare.Execute.Parser, new[]{ "StmtId", "Args", "CompactMetadata" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Prepare.Deallocate), global::Mysqlx.Prepare.Deallocate.Parser, new[]{ "StmtId" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  /// <summary>
  /// Prepare a new statement
  ///
  /// .. uml::
  ///
  ///   client -> server: Prepare
  ///   alt Success
  ///     client &lt;- server: Ok
  ///   else Failure
  ///     client &lt;- server: Error
  ///   end
  ///
  /// :param stmt_id: client side assigned statement id, which is going to identify the result of preparation
  /// :param stmt: defines one of following messages to be prepared - Crud.Find, Crud.Insert, Crud.Delete, Crud.Upsert, Sql.StmtExecute
  /// :Returns: :protobuf:msg:`Mysqlx.Ok|Mysqlx.Error`
  /// </summary>
  internal sealed partial class Prepare : pb::IMessage<Prepare> {
    private static readonly pb::MessageParser<Prepare> _parser = new pb::MessageParser<Prepare>(() => new Prepare());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Prepare> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Prepare(Prepare other) : this() {
      stmtId_ = other.stmtId_;
      stmt_ = other.stmt_ != null ? other.stmt_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "stmt_id" field.</summary>
    public const int StmtIdFieldNumber = 1;
    private uint stmtId_;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint StmtId {
      get { return stmtId_; }
      set {
        stmtId_ = value;
      }
    }

    /// <summary>Field number for the "stmt" field.</summary>
    public const int StmtFieldNumber = 2;
    private global::Mysqlx.Prepare.Prepare.Types.OneOfMessage stmt_;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Prepare.Prepare.Types.OneOfMessage Stmt {
      get { return stmt_; }
      set {
        stmt_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StmtId != 0) hash ^= StmtId.GetHashCode();
      if (stmt_ != null) hash ^= Stmt.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.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 (StmtId != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(StmtId);
      }
      if (stmt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Stmt);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Prepare other) {
      if (other == null) {
        return;
      }
      if (other.StmtId != 0) {
        StmtId = other.StmtId;
      }
      if (other.stmt_ != null) {
        if (stmt_ == null) {
          stmt_ = new global::Mysqlx.Prepare.Prepare.Types.OneOfMessage();
        }
        Stmt.MergeFrom(other.Stmt);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StmtId = input.ReadUInt32();
            break;
          }
          case 18: {
            if (stmt_ == null) {
              stmt_ = new global::Mysqlx.Prepare.Prepare.Types.OneOfMessage();
            }
            input.ReadMessage(stmt_);
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the Prepare message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    internal static partial class Types {
      public sealed partial class OneOfMessage : pb::IMessage<OneOfMessage> {
        private static readonly pb::MessageParser<OneOfMessage> _parser = new pb::MessageParser<OneOfMessage>(() => new OneOfMessage());
        private pb::UnknownFieldSet _unknownFields;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public static pb::MessageParser<OneOfMessage> Parser { get { return _parser; } }

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

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

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

        partial void OnConstruction();

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public OneOfMessage(OneOfMessage other) : this() {
          find_ = other.find_ != null ? other.find_.Clone() : null;
          insert_ = other.insert_ != null ? other.insert_.Clone() : null;
          update_ = other.update_ != null ? other.update_.Clone() : null;
          delete_ = other.delete_ != null ? other.delete_.Clone() : null;
          stmtExecute_ = other.stmtExecute_ != null ? other.stmtExecute_.Clone() : null;
          switch (other.TypePresentCase) {
            case TypePresentOneofCase.Type:
              Type = other.Type;
              break;
          }

          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
        }

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

        /// <summary>Field number for the "type" field.</summary>
        public const int TypeFieldNumber = 1;
        /// <summary>
        ///required
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Prepare.Prepare.Types.OneOfMessage.Types.Type Type {
          get { return typePresentCase_ == TypePresentOneofCase.Type ? (global::Mysqlx.Prepare.Prepare.Types.OneOfMessage.Types.Type) typePresent_ : 0; }
          set {
            typePresent_ = value;
            typePresentCase_ = TypePresentOneofCase.Type;
          }
        }

        /// <summary>Field number for the "find" field.</summary>
        public const int FindFieldNumber = 2;
        private global::Mysqlx.Crud.Find find_;
        /// <summary>
        ///optional
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Crud.Find Find {
          get { return find_; }
          set {
            find_ = value;
          }
        }

        /// <summary>Field number for the "insert" field.</summary>
        public const int InsertFieldNumber = 3;
        private global::Mysqlx.Crud.Insert insert_;
        /// <summary>
        ///optional
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Crud.Insert Insert {
          get { return insert_; }
          set {
            insert_ = value;
          }
        }

        /// <summary>Field number for the "update" field.</summary>
        public const int UpdateFieldNumber = 4;
        private global::Mysqlx.Crud.Update update_;
        /// <summary>
        ///optional
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Crud.Update Update {
          get { return update_; }
          set {
            update_ = value;
          }
        }

        /// <summary>Field number for the "delete" field.</summary>
        public const int DeleteFieldNumber = 5;
        private global::Mysqlx.Crud.Delete delete_;
        /// <summary>
        ///optional
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Crud.Delete Delete {
          get { return delete_; }
          set {
            delete_ = value;
          }
        }

        /// <summary>Field number for the "stmt_execute" field.</summary>
        public const int StmtExecuteFieldNumber = 6;
        private global::Mysqlx.Sql.StmtExecute stmtExecute_;
        /// <summary>
        ///optional
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Sql.StmtExecute StmtExecute {
          get { return stmtExecute_; }
          set {
            stmtExecute_ = value;
          }
        }

        private object typePresent_;
        /// <summary>Enum of possible cases for the "Type_present" oneof.</summary>
        public enum TypePresentOneofCase {
          None = 0,
          Type = 1,
        }
        private TypePresentOneofCase typePresentCase_ = TypePresentOneofCase.None;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public TypePresentOneofCase TypePresentCase {
          get { return typePresentCase_; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void ClearTypePresent() {
          typePresentCase_ = TypePresentOneofCase.None;
          typePresent_ = null;
        }

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

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public bool Equals(OneOfMessage other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          if (Type != other.Type) return false;
          if (!object.Equals(Find, other.Find)) return false;
          if (!object.Equals(Insert, other.Insert)) return false;
          if (!object.Equals(Update, other.Update)) return false;
          if (!object.Equals(Delete, other.Delete)) return false;
          if (!object.Equals(StmtExecute, other.StmtExecute)) return false;
          if (TypePresentCase != other.TypePresentCase) return false;
          return Equals(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public override int GetHashCode() {
          int hash = 1;
          if (typePresentCase_ == TypePresentOneofCase.Type) hash ^= Type.GetHashCode();
          if (find_ != null) hash ^= Find.GetHashCode();
          if (insert_ != null) hash ^= Insert.GetHashCode();
          if (update_ != null) hash ^= Update.GetHashCode();
          if (delete_ != null) hash ^= Delete.GetHashCode();
          if (stmtExecute_ != null) hash ^= StmtExecute.GetHashCode();
          hash ^= (int) typePresentCase_;
          if (_unknownFields != null) {
            hash ^= _unknownFields.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 (typePresentCase_ == TypePresentOneofCase.Type) {
            output.WriteRawTag(8);
            output.WriteEnum((int) Type);
          }
          if (find_ != null) {
            output.WriteRawTag(18);
            output.WriteMessage(Find);
          }
          if (insert_ != null) {
            output.WriteRawTag(26);
            output.WriteMessage(Insert);
          }
          if (update_ != null) {
            output.WriteRawTag(34);
            output.WriteMessage(Update);
          }
          if (delete_ != null) {
            output.WriteRawTag(42);
            output.WriteMessage(Delete);
          }
          if (stmtExecute_ != null) {
            output.WriteRawTag(50);
            output.WriteMessage(StmtExecute);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public int CalculateSize() {
          int size = 0;
          if (typePresentCase_ == TypePresentOneofCase.Type) {
            size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
          }
          if (find_ != null) {
            size += 1 + pb::CodedOutputStream.ComputeMessageSize(Find);
          }
          if (insert_ != null) {
            size += 1 + pb::CodedOutputStream.ComputeMessageSize(Insert);
          }
          if (update_ != null) {
            size += 1 + pb::CodedOutputStream.ComputeMessageSize(Update);
          }
          if (delete_ != null) {
            size += 1 + pb::CodedOutputStream.ComputeMessageSize(Delete);
          }
          if (stmtExecute_ != null) {
            size += 1 + pb::CodedOutputStream.ComputeMessageSize(StmtExecute);
          }
          if (_unknownFields != null) {
            size += _unknownFields.CalculateSize();
          }
          return size;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void MergeFrom(OneOfMessage other) {
          if (other == null) {
            return;
          }
          if (other.find_ != null) {
            if (find_ == null) {
              find_ = new global::Mysqlx.Crud.Find();
            }
            Find.MergeFrom(other.Find);
          }
          if (other.insert_ != null) {
            if (insert_ == null) {
              insert_ = new global::Mysqlx.Crud.Insert();
            }
            Insert.MergeFrom(other.Insert);
          }
          if (other.update_ != null) {
            if (update_ == null) {
              update_ = new global::Mysqlx.Crud.Update();
            }
            Update.MergeFrom(other.Update);
          }
          if (other.delete_ != null) {
            if (delete_ == null) {
              delete_ = new global::Mysqlx.Crud.Delete();
            }
            Delete.MergeFrom(other.Delete);
          }
          if (other.stmtExecute_ != null) {
            if (stmtExecute_ == null) {
              stmtExecute_ = new global::Mysqlx.Sql.StmtExecute();
            }
            StmtExecute.MergeFrom(other.StmtExecute);
          }
          switch (other.TypePresentCase) {
            case TypePresentOneofCase.Type:
              Type = other.Type;
              break;
          }

          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void MergeFrom(pb::CodedInputStream input) {
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;
              case 8: {
                typePresent_ = input.ReadEnum();
                typePresentCase_ = TypePresentOneofCase.Type;
                break;
              }
              case 18: {
                if (find_ == null) {
                  find_ = new global::Mysqlx.Crud.Find();
                }
                input.ReadMessage(find_);
                break;
              }
              case 26: {
                if (insert_ == null) {
                  insert_ = new global::Mysqlx.Crud.Insert();
                }
                input.ReadMessage(insert_);
                break;
              }
              case 34: {
                if (update_ == null) {
                  update_ = new global::Mysqlx.Crud.Update();
                }
                input.ReadMessage(update_);
                break;
              }
              case 42: {
                if (delete_ == null) {
                  delete_ = new global::Mysqlx.Crud.Delete();
                }
                input.ReadMessage(delete_);
                break;
              }
              case 50: {
                if (stmtExecute_ == null) {
                  stmtExecute_ = new global::Mysqlx.Sql.StmtExecute();
                }
                input.ReadMessage(stmtExecute_);
                break;
              }
            }
          }
        }

        #region Nested types
        /// <summary>Container for nested types declared in the OneOfMessage message type.</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public static partial class Types {
          /// <summary>
          /// Determine which of optional fields was set by the client
          /// (Workaround for missing "oneof" keyword in pb2.5)
          /// </summary>
          public enum Type {
            [pbr::OriginalName("FIND")] Find = 0,
            [pbr::OriginalName("INSERT")] Insert = 1,
            [pbr::OriginalName("UPDATE")] Update = 2,
            [pbr::OriginalName("DELETE")] Delete = 4,
            [pbr::OriginalName("STMT")] Stmt = 5,
          }

        }
        #endregion

      }

    }
    #endregion

  }

  /// <summary>
  /// Execute already prepared statement
  ///
  /// .. uml::
  ///
  ///   client -> server: Execute
  ///   alt Success
  ///     ... Resultsets...
  ///     client &lt;- server: StmtExecuteOk
  ///  else Failure
  ///     client &lt;- server: Error
  ///  end
  ///
  /// :param stmt_id: client side assigned statement id, must be already prepared
  /// :param args_list: Arguments to bind to the prepared statement
  /// :param compact_metadata: send only type information for :protobuf:msg:`Mysqlx.Resultset::ColumnMetadata`, skipping names and others
  /// :Returns: :protobuf:msg:`Mysqlx.Ok::`
  /// </summary>
  internal sealed partial class Execute : pb::IMessage<Execute> {
    private static readonly pb::MessageParser<Execute> _parser = new pb::MessageParser<Execute>(() => new Execute());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Execute> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Execute(Execute other) : this() {
      stmtId_ = other.stmtId_;
      args_ = other.args_.Clone();
      compactMetadata_ = other.compactMetadata_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "stmt_id" field.</summary>
    public const int StmtIdFieldNumber = 1;
    private uint stmtId_;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint StmtId {
      get { return stmtId_; }
      set {
        stmtId_ = value;
      }
    }

    /// <summary>Field number for the "args" field.</summary>
    public const int ArgsFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Mysqlx.Datatypes.Any> _repeated_args_codec
        = pb::FieldCodec.ForMessage(18, global::Mysqlx.Datatypes.Any.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Datatypes.Any> args_ = new pbc::RepeatedField<global::Mysqlx.Datatypes.Any>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Datatypes.Any> Args {
      get { return args_; }
    }

    /// <summary>Field number for the "compact_metadata" field.</summary>
    public const int CompactMetadataFieldNumber = 3;
    private bool compactMetadata_;
    /// <summary>
    /// [ default = false ]; optional
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool CompactMetadata {
      get { return compactMetadata_; }
      set {
        compactMetadata_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Execute other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StmtId != other.StmtId) return false;
      if(!args_.Equals(other.args_)) return false;
      if (CompactMetadata != other.CompactMetadata) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StmtId != 0) hash ^= StmtId.GetHashCode();
      hash ^= args_.GetHashCode();
      if (CompactMetadata != false) hash ^= CompactMetadata.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.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 (StmtId != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(StmtId);
      }
      args_.WriteTo(output, _repeated_args_codec);
      if (CompactMetadata != false) {
        output.WriteRawTag(24);
        output.WriteBool(CompactMetadata);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StmtId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StmtId);
      }
      size += args_.CalculateSize(_repeated_args_codec);
      if (CompactMetadata != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Execute other) {
      if (other == null) {
        return;
      }
      if (other.StmtId != 0) {
        StmtId = other.StmtId;
      }
      args_.Add(other.args_);
      if (other.CompactMetadata != false) {
        CompactMetadata = other.CompactMetadata;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StmtId = input.ReadUInt32();
            break;
          }
          case 18: {
            args_.AddEntriesFrom(input, _repeated_args_codec);
            break;
          }
          case 24: {
            CompactMetadata = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// Deallocate already prepared statement
  ///
  /// Deallocating the statement.
  ///
  /// .. uml::
  ///
  ///   client -> server: Deallocate
  ///   alt Success
  ///     client &lt;- server: Ok
  ///   else Failure
  ///     client &lt;- server: Error
  ///   end
  ///
  /// :param stmt_id: client side assigned statement id, must be already prepared
  /// :Returns: :protobuf:msg:`Mysqlx.Ok|Mysqlx.Error`
  /// </summary>
  internal sealed partial class Deallocate : pb::IMessage<Deallocate> {
    private static readonly pb::MessageParser<Deallocate> _parser = new pb::MessageParser<Deallocate>(() => new Deallocate());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Deallocate> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Deallocate(Deallocate other) : this() {
      stmtId_ = other.stmtId_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "stmt_id" field.</summary>
    public const int StmtIdFieldNumber = 1;
    private uint stmtId_;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint StmtId {
      get { return stmtId_; }
      set {
        stmtId_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StmtId != 0) hash ^= StmtId.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.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 (StmtId != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(StmtId);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Deallocate other) {
      if (other == null) {
        return;
      }
      if (other.StmtId != 0) {
        StmtId = other.StmtId;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StmtId = input.ReadUInt32();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
