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

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

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

    static MysqlxExprReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChFteXNxbHhfZXhwci5wcm90bxILTXlzcWx4LkV4cHIaFm15c3FseF9kYXRh",
            "dHlwZXMucHJvdG8izgMKBEV4cHISJAoEdHlwZRgBIAEoDjIWLk15c3FseC5F",
            "eHByLkV4cHIuVHlwZRIxCgppZGVudGlmaWVyGAIgASgLMh0uTXlzcWx4LkV4",
            "cHIuQ29sdW1uSWRlbnRpZmllchIQCgh2YXJpYWJsZRgDIAEoCRIpCgdsaXRl",
            "cmFsGAQgASgLMhguTXlzcWx4LkRhdGF0eXBlcy5TY2FsYXISMAoNZnVuY3Rp",
            "b25fY2FsbBgFIAEoCzIZLk15c3FseC5FeHByLkZ1bmN0aW9uQ2FsbBInCghv",
            "cGVyYXRvchgGIAEoCzIVLk15c3FseC5FeHByLk9wZXJhdG9yEhAKCHBvc2l0",
            "aW9uGAcgASgNEiMKBm9iamVjdBgIIAEoCzITLk15c3FseC5FeHByLk9iamVj",
            "dBIhCgVhcnJheRgJIAEoCzISLk15c3FseC5FeHByLkFycmF5InsKBFR5cGUS",
            "CAoETk9ORRAAEgkKBUlERU5UEAESCwoHTElURVJBTBACEgwKCFZBUklBQkxF",
            "EAMSDQoJRlVOQ19DQUxMEAQSDAoIT1BFUkFUT1IQBRIPCgtQTEFDRUhPTERF",
            "UhAGEgoKBk9CSkVDVBAHEgkKBUFSUkFZEAgiLwoKSWRlbnRpZmllchIMCgRu",
            "YW1lGAEgASgJEhMKC3NjaGVtYV9uYW1lGAIgASgJItUBChBEb2N1bWVudFBh",
            "dGhJdGVtEjAKBHR5cGUYASABKA4yIi5NeXNxbHguRXhwci5Eb2N1bWVudFBh",
            "dGhJdGVtLlR5cGUSDQoFdmFsdWUYAiABKAkSDQoFaW5kZXgYAyABKA0icQoE",
            "VHlwZRIICgROT05FEAASCgoGTUVNQkVSEAESEwoPTUVNQkVSX0FTVEVSSVNL",
            "EAISDwoLQVJSQVlfSU5ERVgQAxIYChRBUlJBWV9JTkRFWF9BU1RFUklTSxAE",
            "EhMKD0RPVUJMRV9BU1RFUklTSxAFIn8KEENvbHVtbklkZW50aWZpZXISNAoN",
            "ZG9jdW1lbnRfcGF0aBgBIAMoCzIdLk15c3FseC5FeHByLkRvY3VtZW50UGF0",
            "aEl0ZW0SDAoEbmFtZRgCIAEoCRISCgp0YWJsZV9uYW1lGAMgASgJEhMKC3Nj",
            "aGVtYV9uYW1lGAQgASgJIlcKDEZ1bmN0aW9uQ2FsbBIlCgRuYW1lGAEgASgL",
            "MhcuTXlzcWx4LkV4cHIuSWRlbnRpZmllchIgCgVwYXJhbRgCIAMoCzIRLk15",
            "c3FseC5FeHByLkV4cHIiOgoIT3BlcmF0b3ISDAoEbmFtZRgBIAEoCRIgCgVw",
            "YXJhbRgCIAMoCzIRLk15c3FseC5FeHByLkV4cHIidAoGT2JqZWN0EiwKA2Zs",
            "ZBgBIAMoCzIfLk15c3FseC5FeHByLk9iamVjdC5PYmplY3RGaWVsZBo8CgtP",
            "YmplY3RGaWVsZBILCgNrZXkYASABKAkSIAoFdmFsdWUYAiABKAsyES5NeXNx",
            "bHguRXhwci5FeHByIikKBUFycmF5EiAKBXZhbHVlGAEgAygLMhEuTXlzcWx4",
            "LkV4cHIuRXhwckIZChdjb20ubXlzcWwuY2oueC5wcm90b2J1ZmIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Mysqlx.Datatypes.MysqlxDatatypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Expr), global::Mysqlx.Expr.Expr.Parser, new[]{ "Type", "Identifier", "Variable", "Literal", "FunctionCall", "Operator", "Position", "Object", "Array" }, null, new[]{ typeof(global::Mysqlx.Expr.Expr.Types.Type) }, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Identifier), global::Mysqlx.Expr.Identifier.Parser, new[]{ "Name", "SchemaName" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.DocumentPathItem), global::Mysqlx.Expr.DocumentPathItem.Parser, new[]{ "Type", "Value", "Index" }, null, new[]{ typeof(global::Mysqlx.Expr.DocumentPathItem.Types.Type) }, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.ColumnIdentifier), global::Mysqlx.Expr.ColumnIdentifier.Parser, new[]{ "DocumentPath", "Name", "TableName", "SchemaName" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.FunctionCall), global::Mysqlx.Expr.FunctionCall.Parser, new[]{ "Name", "Param" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Operator), global::Mysqlx.Expr.Operator.Parser, new[]{ "Name", "Param" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Object), global::Mysqlx.Expr.Object.Parser, new[]{ "Fld" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Object.Types.ObjectField), global::Mysqlx.Expr.Object.Types.ObjectField.Parser, new[]{ "Key", "Value" }, null, null, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Expr.Array), global::Mysqlx.Expr.Array.Parser, new[]{ "Value" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  /// <summary>
  /// Expressions
  ///
  /// the "root" of the expression tree
  ///
  /// .. productionlist::
  ///   expr: `operator` |
  ///       : `identifier` |
  ///       : `function_call` |
  ///       : variable |
  ///       : `literal` |
  ///       : placeholder
  ///
  /// If expression type is PLACEHOLDER then it refers to the value of a parameter
  /// specified when executing a statement (see `args` field of `StmtExecute` command).
  /// Field `position` (which must be present for such an expression) gives 0-based
  /// position of the parameter in the parameter list.
  /// </summary>
  internal sealed partial class Expr : pb::IMessage<Expr> {
    private static readonly pb::MessageParser<Expr> _parser = new pb::MessageParser<Expr>(() => new Expr());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Expr> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Expr(Expr other) : this() {
      type_ = other.type_;
      identifier_ = other.identifier_ != null ? other.identifier_.Clone() : null;
      variable_ = other.variable_;
      literal_ = other.literal_ != null ? other.literal_.Clone() : null;
      functionCall_ = other.functionCall_ != null ? other.functionCall_.Clone() : null;
      operator_ = other.operator_ != null ? other.operator_.Clone() : null;
      position_ = other.position_;
      object_ = other.object_ != null ? other.object_.Clone() : null;
      array_ = other.array_ != null ? other.array_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 1;
    private global::Mysqlx.Expr.Expr.Types.Type type_ = 0;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.Expr.Types.Type Type {
      get { return type_; }
      set {
        type_ = value;
      }
    }

    /// <summary>Field number for the "identifier" field.</summary>
    public const int IdentifierFieldNumber = 2;
    private global::Mysqlx.Expr.ColumnIdentifier identifier_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.ColumnIdentifier Identifier {
      get { return identifier_; }
      set {
        identifier_ = value;
      }
    }

    /// <summary>Field number for the "variable" field.</summary>
    public const int VariableFieldNumber = 3;
    private string variable_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Variable {
      get { return variable_; }
      set {
        variable_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "literal" field.</summary>
    public const int LiteralFieldNumber = 4;
    private global::Mysqlx.Datatypes.Scalar literal_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Datatypes.Scalar Literal {
      get { return literal_; }
      set {
        literal_ = value;
      }
    }

    /// <summary>Field number for the "function_call" field.</summary>
    public const int FunctionCallFieldNumber = 5;
    private global::Mysqlx.Expr.FunctionCall functionCall_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.FunctionCall FunctionCall {
      get { return functionCall_; }
      set {
        functionCall_ = value;
      }
    }

    /// <summary>Field number for the "operator" field.</summary>
    public const int OperatorFieldNumber = 6;
    private global::Mysqlx.Expr.Operator operator_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.Operator Operator {
      get { return operator_; }
      set {
        operator_ = value;
      }
    }

    /// <summary>Field number for the "position" field.</summary>
    public const int PositionFieldNumber = 7;
    private uint position_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint Position {
      get { return position_; }
      set {
        position_ = value;
      }
    }

    /// <summary>Field number for the "object" field.</summary>
    public const int ObjectFieldNumber = 8;
    private global::Mysqlx.Expr.Object object_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.Object Object {
      get { return object_; }
      set {
        object_ = value;
      }
    }

    /// <summary>Field number for the "array" field.</summary>
    public const int ArrayFieldNumber = 9;
    private global::Mysqlx.Expr.Array array_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.Array Array {
      get { return array_; }
      set {
        array_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Expr other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Type != other.Type) return false;
      if (!object.Equals(Identifier, other.Identifier)) return false;
      if (Variable != other.Variable) return false;
      if (!object.Equals(Literal, other.Literal)) return false;
      if (!object.Equals(FunctionCall, other.FunctionCall)) return false;
      if (!object.Equals(Operator, other.Operator)) return false;
      if (Position != other.Position) return false;
      if (!object.Equals(Object, other.Object)) return false;
      if (!object.Equals(Array, other.Array)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (Type != 0) hash ^= Type.GetHashCode();
      if (identifier_ != null) hash ^= Identifier.GetHashCode();
      if (Variable.Length != 0) hash ^= Variable.GetHashCode();
      if (literal_ != null) hash ^= Literal.GetHashCode();
      if (functionCall_ != null) hash ^= FunctionCall.GetHashCode();
      if (operator_ != null) hash ^= Operator.GetHashCode();
      if (Position != 0) hash ^= Position.GetHashCode();
      if (object_ != null) hash ^= Object.GetHashCode();
      if (array_ != null) hash ^= Array.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 (Type != 0) {
        output.WriteRawTag(8);
        output.WriteEnum((int) Type);
      }
      if (identifier_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Identifier);
      }
      if (Variable.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Variable);
      }
      if (literal_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Literal);
      }
      if (functionCall_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(FunctionCall);
      }
      if (operator_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Operator);
      }
      if (Position != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(Position);
      }
      if (object_ != null) {
        output.WriteRawTag(66);
        output.WriteMessage(Object);
      }
      if (array_ != null) {
        output.WriteRawTag(74);
        output.WriteMessage(Array);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (Type != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
      }
      if (identifier_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Identifier);
      }
      if (Variable.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Variable);
      }
      if (literal_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Literal);
      }
      if (functionCall_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FunctionCall);
      }
      if (operator_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Operator);
      }
      if (Position != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Position);
      }
      if (object_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Object);
      }
      if (array_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Array);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Expr other) {
      if (other == null) {
        return;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      if (other.identifier_ != null) {
        if (identifier_ == null) {
          identifier_ = new global::Mysqlx.Expr.ColumnIdentifier();
        }
        Identifier.MergeFrom(other.Identifier);
      }
      if (other.Variable.Length != 0) {
        Variable = other.Variable;
      }
      if (other.literal_ != null) {
        if (literal_ == null) {
          literal_ = new global::Mysqlx.Datatypes.Scalar();
        }
        Literal.MergeFrom(other.Literal);
      }
      if (other.functionCall_ != null) {
        if (functionCall_ == null) {
          functionCall_ = new global::Mysqlx.Expr.FunctionCall();
        }
        FunctionCall.MergeFrom(other.FunctionCall);
      }
      if (other.operator_ != null) {
        if (operator_ == null) {
          operator_ = new global::Mysqlx.Expr.Operator();
        }
        Operator.MergeFrom(other.Operator);
      }
      if (other.Position != 0) {
        Position = other.Position;
      }
      if (other.object_ != null) {
        if (object_ == null) {
          object_ = new global::Mysqlx.Expr.Object();
        }
        Object.MergeFrom(other.Object);
      }
      if (other.array_ != null) {
        if (array_ == null) {
          array_ = new global::Mysqlx.Expr.Array();
        }
        Array.MergeFrom(other.Array);
      }
      _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: {
            type_ = (global::Mysqlx.Expr.Expr.Types.Type) input.ReadEnum();
            break;
          }
          case 18: {
            if (identifier_ == null) {
              identifier_ = new global::Mysqlx.Expr.ColumnIdentifier();
            }
            input.ReadMessage(identifier_);
            break;
          }
          case 26: {
            Variable = input.ReadString();
            break;
          }
          case 34: {
            if (literal_ == null) {
              literal_ = new global::Mysqlx.Datatypes.Scalar();
            }
            input.ReadMessage(literal_);
            break;
          }
          case 42: {
            if (functionCall_ == null) {
              functionCall_ = new global::Mysqlx.Expr.FunctionCall();
            }
            input.ReadMessage(functionCall_);
            break;
          }
          case 50: {
            if (operator_ == null) {
              operator_ = new global::Mysqlx.Expr.Operator();
            }
            input.ReadMessage(operator_);
            break;
          }
          case 56: {
            Position = input.ReadUInt32();
            break;
          }
          case 66: {
            if (object_ == null) {
              object_ = new global::Mysqlx.Expr.Object();
            }
            input.ReadMessage(object_);
            break;
          }
          case 74: {
            if (array_ == null) {
              array_ = new global::Mysqlx.Expr.Array();
            }
            input.ReadMessage(array_);
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the Expr message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    internal static partial class Types {
      internal enum Type {
        [pbr::OriginalName("NONE")] None = 0,
        [pbr::OriginalName("IDENT")] Ident = 1,
        [pbr::OriginalName("LITERAL")] Literal = 2,
        [pbr::OriginalName("VARIABLE")] Variable = 3,
        [pbr::OriginalName("FUNC_CALL")] FuncCall = 4,
        [pbr::OriginalName("OPERATOR")] Operator = 5,
        [pbr::OriginalName("PLACEHOLDER")] Placeholder = 6,
        [pbr::OriginalName("OBJECT")] Object = 7,
        [pbr::OriginalName("ARRAY")] Array = 8,
      }

    }
    #endregion

  }

  /// <summary>
  /// identifier: name, schame.name
  ///
  /// .. productionlist::
  ///   identifier: string "." string |
  ///             : string
  /// </summary>
  internal sealed partial class Identifier : pb::IMessage<Identifier> {
    private static readonly pb::MessageParser<Identifier> _parser = new pb::MessageParser<Identifier>(() => new Identifier());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Identifier> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

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

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

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

    /// <summary>Field number for the "schema_name" field.</summary>
    public const int SchemaNameFieldNumber = 2;
    private string schemaName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string SchemaName {
      get { return schemaName_; }
      set {
        schemaName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Identifier other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.SchemaName.Length != 0) {
        SchemaName = other.SchemaName;
      }
      _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 10: {
            Name = input.ReadString();
            break;
          }
          case 18: {
            SchemaName = input.ReadString();
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// DocumentPathItem
  ///
  /// .. productionlist::
  ///    document_path: path_item | path_item document_path
  ///    path_item    : member | array_index | "**"
  ///    member       : "." string | "." "*"
  ///    array_index  : "[" number "]" | "[" "*" "]"
  /// </summary>
  internal sealed partial class DocumentPathItem : pb::IMessage<DocumentPathItem> {
    private static readonly pb::MessageParser<DocumentPathItem> _parser = new pb::MessageParser<DocumentPathItem>(() => new DocumentPathItem());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<DocumentPathItem> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DocumentPathItem(DocumentPathItem other) : this() {
      type_ = other.type_;
      value_ = other.value_;
      index_ = other.index_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 1;
    private global::Mysqlx.Expr.DocumentPathItem.Types.Type type_ = 0;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.DocumentPathItem.Types.Type Type {
      get { return type_; }
      set {
        type_ = value;
      }
    }

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

    /// <summary>Field number for the "index" field.</summary>
    public const int IndexFieldNumber = 3;
    private uint index_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public uint Index {
      get { return index_; }
      set {
        index_ = value;
      }
    }

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

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(DocumentPathItem other) {
      if (other == null) {
        return;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      if (other.Value.Length != 0) {
        Value = other.Value;
      }
      if (other.Index != 0) {
        Index = other.Index;
      }
      _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: {
            type_ = (global::Mysqlx.Expr.DocumentPathItem.Types.Type) input.ReadEnum();
            break;
          }
          case 18: {
            Value = input.ReadString();
            break;
          }
          case 24: {
            Index = input.ReadUInt32();
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the DocumentPathItem message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    internal static partial class Types {
      internal enum Type {
        [pbr::OriginalName("NONE")] None = 0,
        /// <summary>
        /// .member
        /// </summary>
        [pbr::OriginalName("MEMBER")] Member = 1,
        /// <summary>
        /// .*
        /// </summary>
        [pbr::OriginalName("MEMBER_ASTERISK")] MemberAsterisk = 2,
        /// <summary>
        /// [index]
        /// </summary>
        [pbr::OriginalName("ARRAY_INDEX")] ArrayIndex = 3,
        /// <summary>
        /// [*]
        /// </summary>
        [pbr::OriginalName("ARRAY_INDEX_ASTERISK")] ArrayIndexAsterisk = 4,
        /// <summary>
        /// **
        /// </summary>
        [pbr::OriginalName("DOUBLE_ASTERISK")] DoubleAsterisk = 5,
      }

    }
    #endregion

  }

  /// <summary>
  /// col_identifier (table): col@doc_path, tbl.col@doc_path col, tbl.col, schema.tbl.col
  /// col_identifier (document): doc_path
  ///
  /// .. productionlist::
  ///   col_identifier: string "." string "." string |
  ///             : string "." string |
  ///             : string |
  ///             : string "." string "." string "@" document_path |
  ///             : string "." string "@" document_path |
  ///             : string "@" document_path |
  ///             : document_path
  ///    document_path: member | arrayLocation | doubleAsterisk
  ///    member = "." string | "." "*"
  ///    arrayLocation = "[" index "]" | "[" "*" "]"
  ///    doubleAsterisk = "**"
  /// </summary>
  internal sealed partial class ColumnIdentifier : pb::IMessage<ColumnIdentifier> {
    private static readonly pb::MessageParser<ColumnIdentifier> _parser = new pb::MessageParser<ColumnIdentifier>(() => new ColumnIdentifier());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ColumnIdentifier> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ColumnIdentifier(ColumnIdentifier other) : this() {
      documentPath_ = other.documentPath_.Clone();
      name_ = other.name_;
      tableName_ = other.tableName_;
      schemaName_ = other.schemaName_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "document_path" field.</summary>
    public const int DocumentPathFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Mysqlx.Expr.DocumentPathItem> _repeated_documentPath_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Expr.DocumentPathItem.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Expr.DocumentPathItem> documentPath_ = new pbc::RepeatedField<global::Mysqlx.Expr.DocumentPathItem>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Expr.DocumentPathItem> DocumentPath {
      get { return documentPath_; }
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 2;
    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 "table_name" field.</summary>
    public const int TableNameFieldNumber = 3;
    private string tableName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string TableName {
      get { return tableName_; }
      set {
        tableName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "schema_name" field.</summary>
    public const int SchemaNameFieldNumber = 4;
    private string schemaName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string SchemaName {
      get { return schemaName_; }
      set {
        schemaName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= documentPath_.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (TableName.Length != 0) hash ^= TableName.GetHashCode();
      if (SchemaName.Length != 0) hash ^= SchemaName.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) {
      documentPath_.WriteTo(output, _repeated_documentPath_codec);
      if (Name.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Name);
      }
      if (TableName.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(TableName);
      }
      if (SchemaName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(SchemaName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += documentPath_.CalculateSize(_repeated_documentPath_codec);
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (TableName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TableName);
      }
      if (SchemaName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SchemaName);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ColumnIdentifier other) {
      if (other == null) {
        return;
      }
      documentPath_.Add(other.documentPath_);
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.TableName.Length != 0) {
        TableName = other.TableName;
      }
      if (other.SchemaName.Length != 0) {
        SchemaName = other.SchemaName;
      }
      _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 10: {
            documentPath_.AddEntriesFrom(input, _repeated_documentPath_codec);
            break;
          }
          case 18: {
            Name = input.ReadString();
            break;
          }
          case 26: {
            TableName = input.ReadString();
            break;
          }
          case 34: {
            SchemaName = input.ReadString();
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// function call: ``func(a, b, "1", 3)``
  ///
  /// .. productionlist::
  ///   function_call: `identifier` "(" [ `expr` ["," `expr` ]* ] ")"
  /// </summary>
  internal sealed partial class FunctionCall : pb::IMessage<FunctionCall> {
    private static readonly pb::MessageParser<FunctionCall> _parser = new pb::MessageParser<FunctionCall>(() => new FunctionCall());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<FunctionCall> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 1;
    private global::Mysqlx.Expr.Identifier name_;
    /// <summary>
    ///required
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Expr.Identifier Name {
      get { return name_; }
      set {
        name_ = value;
      }
    }

    /// <summary>Field number for the "param" field.</summary>
    public const int ParamFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Mysqlx.Expr.Expr> _repeated_param_codec
        = pb::FieldCodec.ForMessage(18, global::Mysqlx.Expr.Expr.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Expr.Expr> param_ = new pbc::RepeatedField<global::Mysqlx.Expr.Expr>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Expr.Expr> Param {
      get { return param_; }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (name_ != null) hash ^= Name.GetHashCode();
      hash ^= param_.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 (name_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Name);
      }
      param_.WriteTo(output, _repeated_param_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(FunctionCall other) {
      if (other == null) {
        return;
      }
      if (other.name_ != null) {
        if (name_ == null) {
          name_ = new global::Mysqlx.Expr.Identifier();
        }
        Name.MergeFrom(other.Name);
      }
      param_.Add(other.param_);
      _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 10: {
            if (name_ == null) {
              name_ = new global::Mysqlx.Expr.Identifier();
            }
            input.ReadMessage(name_);
            break;
          }
          case 18: {
            param_.AddEntriesFrom(input, _repeated_param_codec);
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// operator: ``&lt;&lt;(a, b)``
  ///
  /// .. note::
  ///
  ///   Non-authoritative list of operators implemented (case sensitive):
  ///
  ///   Nullary
  ///     * ``*``
  ///     * ``default``
  ///
  ///   Unary
  ///     * ``!``
  ///     * ``sign_plus``
  ///     * ``sign_minus``
  ///     * ``~``
  ///
  ///   Binary
  ///     * ``&amp;&amp;``
  ///     * ``||``
  ///     * ``xor``
  ///     * ``==``
  ///     * ``!=``
  ///     * ``>``
  ///     * ``>=``
  ///     * ``&lt;``
  ///     * ``&lt;=``
  ///     * ``&amp;``
  ///     * ``|``
  ///     * ``^``
  ///     * ``&lt;&lt;``
  ///     * ``>>``
  ///     * ``+``
  ///     * ``-``
  ///     * ``*``
  ///     * ``/``
  ///     * ``div``
  ///     * ``%``
  ///     * ``is``
  ///     * ``is_not``
  ///     * ``regexp``
  ///     * ``not_regexp``
  ///     * ``like``
  ///     * ``not_like``
  ///     * ``cast``
  ///     * ``cont_in``
  ///     * ``not_cont_in``
  ///
  ///   Using special representation, with more than 2 params
  ///     * ``in`` (param[0] IN (param[1], param[2], ...))
  ///     * ``not_in`` (param[0] NOT IN (param[1], param[2], ...))
  ///
  ///   Ternary
  ///     * ``between``
  ///     * ``between_not``
  ///     * ``date_add``
  ///     * ``date_sub``
  ///
  ///   Units for date_add/date_sub
  ///     * ``MICROSECOND``
  ///     * ``SECOND``
  ///     * ``MINUTE``
  ///     * ``HOUR``
  ///     * ``DAY``
  ///     * ``WEEK``
  ///     * ``MONTH``
  ///     * ``QUARTER``
  ///     * ``YEAR``
  ///     * ``SECOND_MICROSECOND``
  ///     * ``MINUTE_MICROSECOND``
  ///     * ``MINUTE_SECOND``
  ///     * ``HOUR_MICROSECOND``
  ///     * ``HOUR_SECOND``
  ///     * ``HOUR_MINUTE``
  ///     * ``DAY_MICROSECOND``
  ///     * ``DAY_SECOND``
  ///     * ``DAY_MINUTE``
  ///     * ``DAY_HOUR``
  ///
  ///   Types for cast
  ///     * ``BINARY[(N)]``
  ///     * ``CHAR[(N)]``
  ///     * ``DATE``
  ///     * ``DATETIME``
  ///     * ``DECIMAL[(M[,D])]``
  ///     * ``JSON``
  ///     * ``SIGNED [INTEGER]``
  ///     * ``TIME``
  ///     * ``UNSIGNED [INTEGER]``
  ///
  /// .. productionlist::
  ///   operator: `name` "(" [ `expr` ["," `expr` ]* ] ")"
  /// </summary>
  internal sealed partial class Operator : pb::IMessage<Operator> {
    private static readonly pb::MessageParser<Operator> _parser = new pb::MessageParser<Operator>(() => new Operator());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Operator> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

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

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

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

    /// <summary>Field number for the "param" field.</summary>
    public const int ParamFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Mysqlx.Expr.Expr> _repeated_param_codec
        = pb::FieldCodec.ForMessage(18, global::Mysqlx.Expr.Expr.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Expr.Expr> param_ = new pbc::RepeatedField<global::Mysqlx.Expr.Expr>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Expr.Expr> Param {
      get { return param_; }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      hash ^= param_.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 (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      param_.WriteTo(output, _repeated_param_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Operator other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      param_.Add(other.param_);
      _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 10: {
            Name = input.ReadString();
            break;
          }
          case 18: {
            param_.AddEntriesFrom(input, _repeated_param_codec);
            break;
          }
        }
      }
    }

  }

  /// <summary>
  /// an object (with expression values)
  /// </summary>
  internal sealed partial class Object : pb::IMessage<Object> {
    private static readonly pb::MessageParser<Object> _parser = new pb::MessageParser<Object>(() => new Object());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Object> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Expr.MysqlxExprReflection.Descriptor.MessageTypes[6]; }
    }

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "fld" field.</summary>
    public const int FldFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Mysqlx.Expr.Object.Types.ObjectField> _repeated_fld_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Expr.Object.Types.ObjectField.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Expr.Object.Types.ObjectField> fld_ = new pbc::RepeatedField<global::Mysqlx.Expr.Object.Types.ObjectField>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Expr.Object.Types.ObjectField> Fld {
      get { return fld_; }
    }

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += fld_.CalculateSize(_repeated_fld_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Object other) {
      if (other == null) {
        return;
      }
      fld_.Add(other.fld_);
      _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 10: {
            fld_.AddEntriesFrom(input, _repeated_fld_codec);
            break;
          }
        }
      }
    }

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

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

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

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

        partial void OnConstruction();

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

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

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

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

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

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

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public override int GetHashCode() {
          int hash = 1;
          if (Key.Length != 0) hash ^= Key.GetHashCode();
          if (value_ != null) hash ^= Value.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 (Key.Length != 0) {
            output.WriteRawTag(10);
            output.WriteString(Key);
          }
          if (value_ != null) {
            output.WriteRawTag(18);
            output.WriteMessage(Value);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        }

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

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void MergeFrom(ObjectField other) {
          if (other == null) {
            return;
          }
          if (other.Key.Length != 0) {
            Key = other.Key;
          }
          if (other.value_ != null) {
            if (value_ == null) {
              value_ = new global::Mysqlx.Expr.Expr();
            }
            Value.MergeFrom(other.Value);
          }
          _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 10: {
                Key = input.ReadString();
                break;
              }
              case 18: {
                if (value_ == null) {
                  value_ = new global::Mysqlx.Expr.Expr();
                }
                input.ReadMessage(value_);
                break;
              }
            }
          }
        }

      }

    }
    #endregion

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Mysqlx.Expr.MysqlxExprReflection.Descriptor.MessageTypes[7]; }
    }

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "value" field.</summary>
    public const int ValueFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Mysqlx.Expr.Expr> _repeated_value_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Expr.Expr.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Expr.Expr> value_ = new pbc::RepeatedField<global::Mysqlx.Expr.Expr>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Expr.Expr> Value {
      get { return value_; }
    }

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += value_.CalculateSize(_repeated_value_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Array other) {
      if (other == null) {
        return;
      }
      value_.Add(other.value_);
      _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 10: {
            value_.AddEntriesFrom(input, _repeated_value_codec);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
