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

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

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

    static MysqlxDatatypesReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChZteXNxbHhfZGF0YXR5cGVzLnByb3RvEhBNeXNxbHguRGF0YXR5cGVzIoQE",
            "CgZTY2FsYXISKwoEdHlwZRgBIAEoDjIdLk15c3FseC5EYXRhdHlwZXMuU2Nh",
            "bGFyLlR5cGUSFgoMdl9zaWduZWRfaW50GAIgASgSSAASGAoOdl91bnNpZ25l",
            "ZF9pbnQYAyABKARIABIzCgh2X29jdGV0cxgFIAEoCzIfLk15c3FseC5EYXRh",
            "dHlwZXMuU2NhbGFyLk9jdGV0c0gAEhIKCHZfZG91YmxlGAYgASgBSAASEQoH",
            "dl9mbG9hdBgHIAEoAkgAEhAKBnZfYm9vbBgIIAEoCEgAEjMKCHZfc3RyaW5n",
            "GAkgASgLMh8uTXlzcWx4LkRhdGF0eXBlcy5TY2FsYXIuU3RyaW5nSAAaQAoG",
            "U3RyaW5nEg8KBXZhbHVlGAEgASgMSAASEwoJY29sbGF0aW9uGAIgASgESABC",
            "EAoOU3RyaW5nX3ByZXNlbnQaLQoGT2N0ZXRzEg0KBXZhbHVlGAEgASgMEhQK",
            "DGNvbnRlbnRfdHlwZRgCIAEoDSJ3CgRUeXBlEggKBE5PTkUQABIKCgZWX1NJ",
            "TlQQARIKCgZWX1VJTlQQAhIKCgZWX05VTEwQAxIMCghWX09DVEVUUxAEEgwK",
            "CFZfRE9VQkxFEAUSCwoHVl9GTE9BVBAGEgoKBlZfQk9PTBAHEgwKCFZfU1RS",
            "SU5HEAhCDgoMRGVmYXVsdE9uZU9mIn0KBk9iamVjdBIxCgNmbGQYASADKAsy",
            "JC5NeXNxbHguRGF0YXR5cGVzLk9iamVjdC5PYmplY3RGaWVsZBpACgtPYmpl",
            "Y3RGaWVsZBILCgNrZXkYASABKAkSJAoFdmFsdWUYAiABKAsyFS5NeXNxbHgu",
            "RGF0YXR5cGVzLkFueSItCgVBcnJheRIkCgV2YWx1ZRgBIAMoCzIVLk15c3Fs",
            "eC5EYXRhdHlwZXMuQW55It0BCgNBbnkSKAoEdHlwZRgBIAEoDjIaLk15c3Fs",
            "eC5EYXRhdHlwZXMuQW55LlR5cGUSKAoGc2NhbGFyGAIgASgLMhguTXlzcWx4",
            "LkRhdGF0eXBlcy5TY2FsYXISJQoDb2JqGAMgASgLMhguTXlzcWx4LkRhdGF0",
            "eXBlcy5PYmplY3QSJgoFYXJyYXkYBCABKAsyFy5NeXNxbHguRGF0YXR5cGVz",
            "LkFycmF5IjMKBFR5cGUSCAoETk9ORRAAEgoKBlNDQUxBUhABEgoKBk9CSkVD",
            "VBACEgkKBUFSUkFZEANCHgocY29tLm15c3FsLmNqLm15c3FseC5wcm90b2J1",
            "ZmIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Scalar), global::Mysqlx.Datatypes.Scalar.Parser, new[]{ "Type", "VSignedInt", "VUnsignedInt", "VOctets", "VDouble", "VFloat", "VBool", "VString" }, new[]{ "DefaultOneOf" }, new[]{ typeof(global::Mysqlx.Datatypes.Scalar.Types.Type) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Scalar.Types.String), global::Mysqlx.Datatypes.Scalar.Types.String.Parser, new[]{ "Value", "Collation" }, new[]{ "StringPresent" }, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Scalar.Types.Octets), global::Mysqlx.Datatypes.Scalar.Types.Octets.Parser, new[]{ "Value", "ContentType" }, null, null, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Object), global::Mysqlx.Datatypes.Object.Parser, new[]{ "Fld" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Object.Types.ObjectField), global::Mysqlx.Datatypes.Object.Types.ObjectField.Parser, new[]{ "Key", "Value" }, null, null, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Array), global::Mysqlx.Datatypes.Array.Parser, new[]{ "Value" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Mysqlx.Datatypes.Any), global::Mysqlx.Datatypes.Any.Parser, new[]{ "Type", "Scalar", "Obj", "Array" }, null, new[]{ typeof(global::Mysqlx.Datatypes.Any.Types.Type) }, null)
          }));
    }
    #endregion

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

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Scalar(Scalar other) : this() {
      type_ = other.type_;
      switch (other.DefaultOneOfCase) {
        case DefaultOneOfOneofCase.VSignedInt:
          VSignedInt = other.VSignedInt;
          break;
        case DefaultOneOfOneofCase.VUnsignedInt:
          VUnsignedInt = other.VUnsignedInt;
          break;
        case DefaultOneOfOneofCase.VOctets:
          VOctets = other.VOctets.Clone();
          break;
        case DefaultOneOfOneofCase.VDouble:
          VDouble = other.VDouble;
          break;
        case DefaultOneOfOneofCase.VFloat:
          VFloat = other.VFloat;
          break;
        case DefaultOneOfOneofCase.VBool:
          VBool = other.VBool;
          break;
        case DefaultOneOfOneofCase.VString:
          VString = other.VString.Clone();
          break;
      }

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

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

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

    /// <summary>Field number for the "v_signed_int" field.</summary>
    public const int VSignedIntFieldNumber = 2;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long VSignedInt {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VSignedInt ? (long) defaultOneOf_ : 0L; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = DefaultOneOfOneofCase.VSignedInt;
      }
    }

    /// <summary>Field number for the "v_unsigned_int" field.</summary>
    public const int VUnsignedIntFieldNumber = 3;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ulong VUnsignedInt {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VUnsignedInt ? (ulong) defaultOneOf_ : 0UL; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = DefaultOneOfOneofCase.VUnsignedInt;
      }
    }

    /// <summary>Field number for the "v_octets" field.</summary>
    public const int VOctetsFieldNumber = 5;
    /// <summary>
    /// 4 is unused, was Null which doesn't have a storage anymore
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Datatypes.Scalar.Types.Octets VOctets {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VOctets ? (global::Mysqlx.Datatypes.Scalar.Types.Octets) defaultOneOf_ : null; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = value == null ? DefaultOneOfOneofCase.None : DefaultOneOfOneofCase.VOctets;
      }
    }

    /// <summary>Field number for the "v_double" field.</summary>
    public const int VDoubleFieldNumber = 6;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public double VDouble {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VDouble ? (double) defaultOneOf_ : 0D; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = DefaultOneOfOneofCase.VDouble;
      }
    }

    /// <summary>Field number for the "v_float" field.</summary>
    public const int VFloatFieldNumber = 7;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public float VFloat {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VFloat ? (float) defaultOneOf_ : 0F; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = DefaultOneOfOneofCase.VFloat;
      }
    }

    /// <summary>Field number for the "v_bool" field.</summary>
    public const int VBoolFieldNumber = 8;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool VBool {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VBool ? (bool) defaultOneOf_ : false; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = DefaultOneOfOneofCase.VBool;
      }
    }

    /// <summary>Field number for the "v_string" field.</summary>
    public const int VStringFieldNumber = 9;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Datatypes.Scalar.Types.String VString {
      get { return defaultOneOfCase_ == DefaultOneOfOneofCase.VString ? (global::Mysqlx.Datatypes.Scalar.Types.String) defaultOneOf_ : null; }
      set {
        defaultOneOf_ = value;
        defaultOneOfCase_ = value == null ? DefaultOneOfOneofCase.None : DefaultOneOfOneofCase.VString;
      }
    }

    private object defaultOneOf_;
    /// <summary>Enum of possible cases for the "DefaultOneOf" oneof.</summary>
    public enum DefaultOneOfOneofCase {
      None = 0,
      VSignedInt = 2,
      VUnsignedInt = 3,
      VOctets = 5,
      VDouble = 6,
      VFloat = 7,
      VBool = 8,
      VString = 9,
    }
    private DefaultOneOfOneofCase defaultOneOfCase_ = DefaultOneOfOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public DefaultOneOfOneofCase DefaultOneOfCase {
      get { return defaultOneOfCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void ClearDefaultOneOf() {
      defaultOneOfCase_ = DefaultOneOfOneofCase.None;
      defaultOneOf_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Scalar other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Type != other.Type) return false;
      if (VSignedInt != other.VSignedInt) return false;
      if (VUnsignedInt != other.VUnsignedInt) return false;
      if (!object.Equals(VOctets, other.VOctets)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(VDouble, other.VDouble)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(VFloat, other.VFloat)) return false;
      if (VBool != other.VBool) return false;
      if (!object.Equals(VString, other.VString)) return false;
      if (DefaultOneOfCase != other.DefaultOneOfCase) 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 (defaultOneOfCase_ == DefaultOneOfOneofCase.VSignedInt) hash ^= VSignedInt.GetHashCode();
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VUnsignedInt) hash ^= VUnsignedInt.GetHashCode();
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VOctets) hash ^= VOctets.GetHashCode();
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(VDouble);
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(VFloat);
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VBool) hash ^= VBool.GetHashCode();
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VString) hash ^= VString.GetHashCode();
      hash ^= (int) defaultOneOfCase_;
      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 (defaultOneOfCase_ == DefaultOneOfOneofCase.VSignedInt) {
        output.WriteRawTag(16);
        output.WriteSInt64(VSignedInt);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VUnsignedInt) {
        output.WriteRawTag(24);
        output.WriteUInt64(VUnsignedInt);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VOctets) {
        output.WriteRawTag(42);
        output.WriteMessage(VOctets);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VDouble) {
        output.WriteRawTag(49);
        output.WriteDouble(VDouble);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VFloat) {
        output.WriteRawTag(61);
        output.WriteFloat(VFloat);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VBool) {
        output.WriteRawTag(64);
        output.WriteBool(VBool);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VString) {
        output.WriteRawTag(74);
        output.WriteMessage(VString);
      }
      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 (defaultOneOfCase_ == DefaultOneOfOneofCase.VSignedInt) {
        size += 1 + pb::CodedOutputStream.ComputeSInt64Size(VSignedInt);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VUnsignedInt) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(VUnsignedInt);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VOctets) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(VOctets);
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VDouble) {
        size += 1 + 8;
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VFloat) {
        size += 1 + 4;
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VBool) {
        size += 1 + 1;
      }
      if (defaultOneOfCase_ == DefaultOneOfOneofCase.VString) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(VString);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Scalar other) {
      if (other == null) {
        return;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      switch (other.DefaultOneOfCase) {
        case DefaultOneOfOneofCase.VSignedInt:
          VSignedInt = other.VSignedInt;
          break;
        case DefaultOneOfOneofCase.VUnsignedInt:
          VUnsignedInt = other.VUnsignedInt;
          break;
        case DefaultOneOfOneofCase.VOctets:
          if (VOctets == null) {
            VOctets = new global::Mysqlx.Datatypes.Scalar.Types.Octets();
          }
          VOctets.MergeFrom(other.VOctets);
          break;
        case DefaultOneOfOneofCase.VDouble:
          VDouble = other.VDouble;
          break;
        case DefaultOneOfOneofCase.VFloat:
          VFloat = other.VFloat;
          break;
        case DefaultOneOfOneofCase.VBool:
          VBool = other.VBool;
          break;
        case DefaultOneOfOneofCase.VString:
          if (VString == null) {
            VString = new global::Mysqlx.Datatypes.Scalar.Types.String();
          }
          VString.MergeFrom(other.VString);
          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: {
            type_ = (global::Mysqlx.Datatypes.Scalar.Types.Type) input.ReadEnum();
            break;
          }
          case 16: {
            VSignedInt = input.ReadSInt64();
            break;
          }
          case 24: {
            VUnsignedInt = input.ReadUInt64();
            break;
          }
          case 42: {
            global::Mysqlx.Datatypes.Scalar.Types.Octets subBuilder = new global::Mysqlx.Datatypes.Scalar.Types.Octets();
            if (defaultOneOfCase_ == DefaultOneOfOneofCase.VOctets) {
              subBuilder.MergeFrom(VOctets);
            }
            input.ReadMessage(subBuilder);
            VOctets = subBuilder;
            break;
          }
          case 49: {
            VDouble = input.ReadDouble();
            break;
          }
          case 61: {
            VFloat = input.ReadFloat();
            break;
          }
          case 64: {
            VBool = input.ReadBool();
            break;
          }
          case 74: {
            global::Mysqlx.Datatypes.Scalar.Types.String subBuilder = new global::Mysqlx.Datatypes.Scalar.Types.String();
            if (defaultOneOfCase_ == DefaultOneOfOneofCase.VString) {
              subBuilder.MergeFrom(VString);
            }
            input.ReadMessage(subBuilder);
            VString = subBuilder;
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the Scalar message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static partial class Types {
      public enum Type {
        [pbr::OriginalName("NONE")] None = 0,
        [pbr::OriginalName("V_SINT")] VSint = 1,
        [pbr::OriginalName("V_UINT")] VUint = 2,
        [pbr::OriginalName("V_NULL")] VNull = 3,
        [pbr::OriginalName("V_OCTETS")] VOctets = 4,
        [pbr::OriginalName("V_DOUBLE")] VDouble = 5,
        [pbr::OriginalName("V_FLOAT")] VFloat = 6,
        [pbr::OriginalName("V_BOOL")] VBool = 7,
        [pbr::OriginalName("V_STRING")] VString = 8,
      }

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

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

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

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

        partial void OnConstruction();

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public String(String other) : this() {
          switch (other.StringPresentCase) {
            case StringPresentOneofCase.Value:
              Value = other.Value;
              break;
            case StringPresentOneofCase.Collation:
              Collation = other.Collation;
              break;
          }

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

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

        /// <summary>Field number for the "value" field.</summary>
        public const int ValueFieldNumber = 1;
        /// <summary>
        ///required
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public pb::ByteString Value {
          get { return stringPresentCase_ == StringPresentOneofCase.Value ? (pb::ByteString) stringPresent_ : pb::ByteString.Empty; }
          set {
            stringPresent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            stringPresentCase_ = StringPresentOneofCase.Value;
          }
        }

        /// <summary>Field number for the "collation" field.</summary>
        public const int CollationFieldNumber = 2;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public ulong Collation {
          get { return stringPresentCase_ == StringPresentOneofCase.Collation ? (ulong) stringPresent_ : 0UL; }
          set {
            stringPresent_ = value;
            stringPresentCase_ = StringPresentOneofCase.Collation;
          }
        }

        private object stringPresent_;
        /// <summary>Enum of possible cases for the "String_present" oneof.</summary>
        public enum StringPresentOneofCase {
          None = 0,
          Value = 1,
          Collation = 2,
        }
        private StringPresentOneofCase stringPresentCase_ = StringPresentOneofCase.None;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public StringPresentOneofCase StringPresentCase {
          get { return stringPresentCase_; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void ClearStringPresent() {
          stringPresentCase_ = StringPresentOneofCase.None;
          stringPresent_ = null;
        }

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

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

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public override int GetHashCode() {
          int hash = 1;
          if (stringPresentCase_ == StringPresentOneofCase.Value) hash ^= Value.GetHashCode();
          if (stringPresentCase_ == StringPresentOneofCase.Collation) hash ^= Collation.GetHashCode();
          hash ^= (int) stringPresentCase_;
          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 (stringPresentCase_ == StringPresentOneofCase.Value) {
            output.WriteRawTag(10);
            output.WriteBytes(Value);
          }
          if (stringPresentCase_ == StringPresentOneofCase.Collation) {
            output.WriteRawTag(16);
            output.WriteUInt64(Collation);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public int CalculateSize() {
          int size = 0;
          if (stringPresentCase_ == StringPresentOneofCase.Value) {
            size += 1 + pb::CodedOutputStream.ComputeBytesSize(Value);
          }
          if (stringPresentCase_ == StringPresentOneofCase.Collation) {
            size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Collation);
          }
          if (_unknownFields != null) {
            size += _unknownFields.CalculateSize();
          }
          return size;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void MergeFrom(String other) {
          if (other == null) {
            return;
          }
          switch (other.StringPresentCase) {
            case StringPresentOneofCase.Value:
              Value = other.Value;
              break;
            case StringPresentOneofCase.Collation:
              Collation = other.Collation;
              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 10: {
                Value = input.ReadBytes();
                break;
              }
              case 16: {
                Collation = input.ReadUInt64();
                break;
              }
            }
          }
        }

      }

      /// <summary>
      /// an opaque octet sequence, with an optional content_type
      /// See ``Mysqlx.Resultset.ColumnMetadata`` for list of known values.
      /// </summary>
      public sealed partial class Octets : pb::IMessage<Octets> {
        private static readonly pb::MessageParser<Octets> _parser = new pb::MessageParser<Octets>(() => new Octets());
        private pb::UnknownFieldSet _unknownFields;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public static pb::MessageParser<Octets> Parser { get { return _parser; } }

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

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

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

        partial void OnConstruction();

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

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

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

        /// <summary>Field number for the "content_type" field.</summary>
        public const int ContentTypeFieldNumber = 2;
        private uint contentType_;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public uint ContentType {
          get { return contentType_; }
          set {
            contentType_ = value;
          }
        }

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

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

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

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

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public void MergeFrom(Octets other) {
          if (other == null) {
            return;
          }
          if (other.Value.Length != 0) {
            Value = other.Value;
          }
          if (other.ContentType != 0) {
            ContentType = other.ContentType;
          }
          _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 = input.ReadBytes();
                break;
              }
              case 16: {
                ContentType = input.ReadUInt32();
                break;
              }
            }
          }
        }

      }

    }
    #endregion

  }

  /// <summary>
  /// a object
  /// </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.Datatypes.MysqlxDatatypesReflection.Descriptor.MessageTypes[1]; }
    }

    [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.Datatypes.Object.Types.ObjectField> _repeated_fld_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Datatypes.Object.Types.ObjectField.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Datatypes.Object.Types.ObjectField> fld_ = new pbc::RepeatedField<global::Mysqlx.Datatypes.Object.Types.ObjectField>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Datatypes.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]
    public static partial class Types {
      public 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.Datatypes.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.Datatypes.Any value_;
        /// <summary>
        ///required
        /// </summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public global::Mysqlx.Datatypes.Any Value {
          get { return value_; }
          set {
            value_ = value;
          }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        public override bool Equals(object other) {
          return Equals(other as 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.Datatypes.Any();
            }
            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.Datatypes.Any();
                }
                input.ReadMessage(value_);
                break;
              }
            }
          }
        }

      }

    }
    #endregion

  }

  /// <summary>
  /// a Array
  /// </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.Datatypes.MysqlxDatatypesReflection.Descriptor.MessageTypes[2]; }
    }

    [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.Datatypes.Any> _repeated_value_codec
        = pb::FieldCodec.ForMessage(10, global::Mysqlx.Datatypes.Any.Parser);
    private readonly pbc::RepeatedField<global::Mysqlx.Datatypes.Any> value_ = new pbc::RepeatedField<global::Mysqlx.Datatypes.Any>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Mysqlx.Datatypes.Any> 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;
          }
        }
      }
    }

  }

  /// <summary>
  /// a helper to allow all field types
  /// </summary>
  internal sealed partial class Any : pb::IMessage<Any> {
    private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Any> Parser { get { return _parser; } }

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Any(Any other) : this() {
      type_ = other.type_;
      scalar_ = other.scalar_ != null ? other.scalar_.Clone() : null;
      obj_ = other.obj_ != null ? other.obj_.Clone() : null;
      array_ = other.array_ != null ? other.array_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

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

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

    /// <summary>Field number for the "obj" field.</summary>
    public const int ObjFieldNumber = 3;
    private global::Mysqlx.Datatypes.Object obj_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Mysqlx.Datatypes.Object Obj {
      get { return obj_; }
      set {
        obj_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Any other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Type != other.Type) return false;
      if (!object.Equals(Scalar, other.Scalar)) return false;
      if (!object.Equals(Obj, other.Obj)) 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 (scalar_ != null) hash ^= Scalar.GetHashCode();
      if (obj_ != null) hash ^= Obj.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 (scalar_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Scalar);
      }
      if (obj_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Obj);
      }
      if (array_ != null) {
        output.WriteRawTag(34);
        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 (scalar_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Scalar);
      }
      if (obj_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Obj);
      }
      if (array_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Array);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Any other) {
      if (other == null) {
        return;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      if (other.scalar_ != null) {
        if (scalar_ == null) {
          scalar_ = new global::Mysqlx.Datatypes.Scalar();
        }
        Scalar.MergeFrom(other.Scalar);
      }
      if (other.obj_ != null) {
        if (obj_ == null) {
          obj_ = new global::Mysqlx.Datatypes.Object();
        }
        Obj.MergeFrom(other.Obj);
      }
      if (other.array_ != null) {
        if (array_ == null) {
          array_ = new global::Mysqlx.Datatypes.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.Datatypes.Any.Types.Type) input.ReadEnum();
            break;
          }
          case 18: {
            if (scalar_ == null) {
              scalar_ = new global::Mysqlx.Datatypes.Scalar();
            }
            input.ReadMessage(scalar_);
            break;
          }
          case 26: {
            if (obj_ == null) {
              obj_ = new global::Mysqlx.Datatypes.Object();
            }
            input.ReadMessage(obj_);
            break;
          }
          case 34: {
            if (array_ == null) {
              array_ = new global::Mysqlx.Datatypes.Array();
            }
            input.ReadMessage(array_);
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the Any message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static partial class Types {
      public enum Type {
        [pbr::OriginalName("NONE")] None = 0,
        [pbr::OriginalName("SCALAR")] Scalar = 1,
        [pbr::OriginalName("OBJECT")] Object = 2,
        [pbr::OriginalName("ARRAY")] Array = 3,
      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code
