/*
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, version 2.0, as published by the
 * Free Software Foundation.
 *
 * This program is also distributed with certain software (including but not
 * limited to OpenSSL) that is licensed under separate terms, as designated in a
 * particular file or component or in included license documentation. The
 * authors of MySQL hereby grant you an additional permission to link the
 * program and your derivative works with the separately licensed software that
 * they have included with MySQL.
 *
 * Without limiting anything contained in the foregoing, this file, which is
 * part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
 * version 1.0, a copy of which can be found at
 * http://oss.oracle.com/licenses/universal-foss-exception.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */

package com.mysql.cj.x.protobuf;

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mysqlx_cursor.proto
@SuppressWarnings({ "cast", "deprecation" })

public final class MysqlxCursor {
  private MysqlxCursor() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface OpenOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Mysqlx.Cursor.Open)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    boolean hasCursorId();
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    int getCursorId();

    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    boolean hasStmt();
    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getStmt();
    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder getStmtOrBuilder();

    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    boolean hasFetchRows();
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    long getFetchRows();
  }
  /**
   * <pre>
   * Open a cursor
   * .. uml::
   *   client -&gt; server: Open
   *   alt Success
   *     ... none or partial Resultsets or full Resultsets ...
   *     client &lt;- server: StmtExecuteOk
   *  else Failure
   *     client &lt;- server: Error
   *  end
   * :param cursor_id: client side assigned cursor id, the ID is going to represent new cursor and assigned to it statement
   * :param stmt: statement which resultset is going to be iterated through the cursor
   * :param fetch_rows: number of rows which should be retrieved from sequential cursor
   * :Returns: :protobuf:msg:`Mysqlx.Ok::`
   * </pre>
   *
   * Protobuf type {@code Mysqlx.Cursor.Open}
   */
  public  static final class Open extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Mysqlx.Cursor.Open)
      OpenOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Open.newBuilder() to construct.
    private Open(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Open() {
      cursorId_ = 0;
      fetchRows_ = 0L;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Open(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              cursorId_ = input.readUInt32();
              break;
            }
            case 34: {
              com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) == 0x00000002)) {
                subBuilder = stmt_.toBuilder();
              }
              stmt_ = input.readMessage(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(stmt_);
                stmt_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 40: {
              bitField0_ |= 0x00000004;
              fetchRows_ = input.readUInt64();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.mysql.cj.x.protobuf.MysqlxCursor.Open.class, com.mysql.cj.x.protobuf.MysqlxCursor.Open.Builder.class);
    }

    public interface OneOfMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:Mysqlx.Cursor.Open.OneOfMessage)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
       */
      boolean hasType();
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
       */
      com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type getType();

      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      boolean hasPrepareExecute();
      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      com.mysql.cj.x.protobuf.MysqlxPrepare.Execute getPrepareExecute();
      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder getPrepareExecuteOrBuilder();
    }
    /**
     * Protobuf type {@code Mysqlx.Cursor.Open.OneOfMessage}
     */
    public  static final class OneOfMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:Mysqlx.Cursor.Open.OneOfMessage)
        OneOfMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use OneOfMessage.newBuilder() to construct.
      private OneOfMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private OneOfMessage() {
        type_ = 0;
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private OneOfMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                int rawValue = input.readEnum();
                  @SuppressWarnings("deprecation")
                com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type value = com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type.valueOf(rawValue);
                if (value == null) {
                  unknownFields.mergeVarintField(1, rawValue);
                } else {
                  bitField0_ |= 0x00000001;
                  type_ = rawValue;
                }
                break;
              }
              case 18: {
                com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder subBuilder = null;
                if (((bitField0_ & 0x00000002) == 0x00000002)) {
                  subBuilder = prepareExecute_.toBuilder();
                }
                prepareExecute_ = input.readMessage(com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.PARSER, extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom(prepareExecute_);
                  prepareExecute_ = subBuilder.buildPartial();
                }
                bitField0_ |= 0x00000002;
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_OneOfMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.class, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder.class);
      }

      /**
       * Protobuf enum {@code Mysqlx.Cursor.Open.OneOfMessage.Type}
       */
      public enum Type
          implements com.google.protobuf.ProtocolMessageEnum {
        /**
         * <code>PREPARE_EXECUTE = 0;</code>
         */
        PREPARE_EXECUTE(0),
        ;

        /**
         * <code>PREPARE_EXECUTE = 0;</code>
         */
        public static final int PREPARE_EXECUTE_VALUE = 0;


        public final int getNumber() {
          return value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @java.lang.Deprecated
        public static Type valueOf(int value) {
          return forNumber(value);
        }

        public static Type forNumber(int value) {
          switch (value) {
            case 0: return PREPARE_EXECUTE;
            default: return null;
          }
        }

        public static com.google.protobuf.Internal.EnumLiteMap<Type>
            internalGetValueMap() {
          return internalValueMap;
        }
        private static final com.google.protobuf.Internal.EnumLiteMap<
            Type> internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<Type>() {
                public Type findValueByNumber(int number) {
                  return Type.forNumber(number);
                }
              };

        public final com.google.protobuf.Descriptors.EnumValueDescriptor
            getValueDescriptor() {
          return getDescriptor().getValues().get(ordinal());
        }
        public final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptorForType() {
          return getDescriptor();
        }
        public static final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptor() {
          return com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDescriptor().getEnumTypes().get(0);
        }

        private static final Type[] VALUES = values();

        public static Type valueOf(
            com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
          if (desc.getType() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "EnumValueDescriptor is not for this type.");
          }
          return VALUES[desc.getIndex()];
        }

        private final int value;

        private Type(int value) {
          this.value = value;
        }

        // @@protoc_insertion_point(enum_scope:Mysqlx.Cursor.Open.OneOfMessage.Type)
      }

      private int bitField0_;
      public static final int TYPE_FIELD_NUMBER = 1;
      private int type_;
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
       */
      public boolean hasType() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type getType() {
        @SuppressWarnings("deprecation")
        com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type result = com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type.valueOf(type_);
        return result == null ? com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type.PREPARE_EXECUTE : result;
      }

      public static final int PREPARE_EXECUTE_FIELD_NUMBER = 2;
      private com.mysql.cj.x.protobuf.MysqlxPrepare.Execute prepareExecute_;
      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      public boolean hasPrepareExecute() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxPrepare.Execute getPrepareExecute() {
        return prepareExecute_ == null ? com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.getDefaultInstance() : prepareExecute_;
      }
      /**
       * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder getPrepareExecuteOrBuilder() {
        return prepareExecute_ == null ? com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.getDefaultInstance() : prepareExecute_;
      }

      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        if (!hasType()) {
          memoizedIsInitialized = 0;
          return false;
        }
        if (hasPrepareExecute()) {
          if (!getPrepareExecute().isInitialized()) {
            memoizedIsInitialized = 0;
            return false;
          }
        }
        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          output.writeEnum(1, type_);
        }
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          output.writeMessage(2, getPrepareExecute());
        }
        unknownFields.writeTo(output);
      }

      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(1, type_);
        }
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(2, getPrepareExecute());
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage)) {
          return super.equals(obj);
        }
        com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage other = (com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage) obj;

        boolean result = true;
        result = result && (hasType() == other.hasType());
        if (hasType()) {
          result = result && type_ == other.type_;
        }
        result = result && (hasPrepareExecute() == other.hasPrepareExecute());
        if (hasPrepareExecute()) {
          result = result && getPrepareExecute()
              .equals(other.getPrepareExecute());
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasType()) {
          hash = (37 * hash) + TYPE_FIELD_NUMBER;
          hash = (53 * hash) + type_;
        }
        if (hasPrepareExecute()) {
          hash = (37 * hash) + PREPARE_EXECUTE_FIELD_NUMBER;
          hash = (53 * hash) + getPrepareExecute().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code Mysqlx.Cursor.Open.OneOfMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:Mysqlx.Cursor.Open.OneOfMessage)
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_OneOfMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.class, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder.class);
        }

        // Construct using com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
            getPrepareExecuteFieldBuilder();
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          type_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          if (prepareExecuteBuilder_ == null) {
            prepareExecute_ = null;
          } else {
            prepareExecuteBuilder_.clear();
          }
          bitField0_ = (bitField0_ & ~0x00000002);
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor;
        }

        @java.lang.Override
        public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getDefaultInstanceForType() {
          return com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance();
        }

        @java.lang.Override
        public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage build() {
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage buildPartial() {
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage result = new com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
            to_bitField0_ |= 0x00000001;
          }
          result.type_ = type_;
          if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
            to_bitField0_ |= 0x00000002;
          }
          if (prepareExecuteBuilder_ == null) {
            result.prepareExecute_ = prepareExecute_;
          } else {
            result.prepareExecute_ = prepareExecuteBuilder_.build();
          }
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }

        @java.lang.Override
        public Builder clone() {
          return (Builder) super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return (Builder) super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return (Builder) super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage) {
            return mergeFrom((com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage other) {
          if (other == com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance()) return this;
          if (other.hasType()) {
            setType(other.getType());
          }
          if (other.hasPrepareExecute()) {
            mergePrepareExecute(other.getPrepareExecute());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

        @java.lang.Override
        public final boolean isInitialized() {
          if (!hasType()) {
            return false;
          }
          if (hasPrepareExecute()) {
            if (!getPrepareExecute().isInitialized()) {
              return false;
            }
          }
          return true;
        }

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;

        private int type_ = 0;
        /**
         * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
         */
        public boolean hasType() {
          return ((bitField0_ & 0x00000001) == 0x00000001);
        }
        /**
         * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
         */
        public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type getType() {
          @SuppressWarnings("deprecation")
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type result = com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type.valueOf(type_);
          return result == null ? com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type.PREPARE_EXECUTE : result;
        }
        /**
         * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
         */
        public Builder setType(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Type value) {
          if (value == null) {
            throw new NullPointerException();
          }
          bitField0_ |= 0x00000001;
          type_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>required .Mysqlx.Cursor.Open.OneOfMessage.Type type = 1;</code>
         */
        public Builder clearType() {
          bitField0_ = (bitField0_ & ~0x00000001);
          type_ = 0;
          onChanged();
          return this;
        }

        private com.mysql.cj.x.protobuf.MysqlxPrepare.Execute prepareExecute_ = null;
        private com.google.protobuf.SingleFieldBuilderV3<
            com.mysql.cj.x.protobuf.MysqlxPrepare.Execute, com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder, com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder> prepareExecuteBuilder_;
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public boolean hasPrepareExecute() {
          return ((bitField0_ & 0x00000002) == 0x00000002);
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public com.mysql.cj.x.protobuf.MysqlxPrepare.Execute getPrepareExecute() {
          if (prepareExecuteBuilder_ == null) {
            return prepareExecute_ == null ? com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.getDefaultInstance() : prepareExecute_;
          } else {
            return prepareExecuteBuilder_.getMessage();
          }
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public Builder setPrepareExecute(com.mysql.cj.x.protobuf.MysqlxPrepare.Execute value) {
          if (prepareExecuteBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            prepareExecute_ = value;
            onChanged();
          } else {
            prepareExecuteBuilder_.setMessage(value);
          }
          bitField0_ |= 0x00000002;
          return this;
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public Builder setPrepareExecute(
            com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder builderForValue) {
          if (prepareExecuteBuilder_ == null) {
            prepareExecute_ = builderForValue.build();
            onChanged();
          } else {
            prepareExecuteBuilder_.setMessage(builderForValue.build());
          }
          bitField0_ |= 0x00000002;
          return this;
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public Builder mergePrepareExecute(com.mysql.cj.x.protobuf.MysqlxPrepare.Execute value) {
          if (prepareExecuteBuilder_ == null) {
            if (((bitField0_ & 0x00000002) == 0x00000002) &&
                prepareExecute_ != null &&
                prepareExecute_ != com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.getDefaultInstance()) {
              prepareExecute_ =
                com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.newBuilder(prepareExecute_).mergeFrom(value).buildPartial();
            } else {
              prepareExecute_ = value;
            }
            onChanged();
          } else {
            prepareExecuteBuilder_.mergeFrom(value);
          }
          bitField0_ |= 0x00000002;
          return this;
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public Builder clearPrepareExecute() {
          if (prepareExecuteBuilder_ == null) {
            prepareExecute_ = null;
            onChanged();
          } else {
            prepareExecuteBuilder_.clear();
          }
          bitField0_ = (bitField0_ & ~0x00000002);
          return this;
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder getPrepareExecuteBuilder() {
          bitField0_ |= 0x00000002;
          onChanged();
          return getPrepareExecuteFieldBuilder().getBuilder();
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        public com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder getPrepareExecuteOrBuilder() {
          if (prepareExecuteBuilder_ != null) {
            return prepareExecuteBuilder_.getMessageOrBuilder();
          } else {
            return prepareExecute_ == null ?
                com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.getDefaultInstance() : prepareExecute_;
          }
        }
        /**
         * <code>optional .Mysqlx.Prepare.Execute prepare_execute = 2;</code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
            com.mysql.cj.x.protobuf.MysqlxPrepare.Execute, com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder, com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder> 
            getPrepareExecuteFieldBuilder() {
          if (prepareExecuteBuilder_ == null) {
            prepareExecuteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
                com.mysql.cj.x.protobuf.MysqlxPrepare.Execute, com.mysql.cj.x.protobuf.MysqlxPrepare.Execute.Builder, com.mysql.cj.x.protobuf.MysqlxPrepare.ExecuteOrBuilder>(
                    getPrepareExecute(),
                    getParentForChildren(),
                    isClean());
            prepareExecute_ = null;
          }
          return prepareExecuteBuilder_;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:Mysqlx.Cursor.Open.OneOfMessage)
      }

      // @@protoc_insertion_point(class_scope:Mysqlx.Cursor.Open.OneOfMessage)
      private static final com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage();
      }

      public static com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      @java.lang.Deprecated public static final com.google.protobuf.Parser<OneOfMessage>
          PARSER = new com.google.protobuf.AbstractParser<OneOfMessage>() {
        @java.lang.Override
        public OneOfMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new OneOfMessage(input, extensionRegistry);
        }
      };

      public static com.google.protobuf.Parser<OneOfMessage> parser() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.protobuf.Parser<OneOfMessage> getParserForType() {
        return PARSER;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int CURSOR_ID_FIELD_NUMBER = 1;
    private int cursorId_;
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public boolean hasCursorId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public int getCursorId() {
      return cursorId_;
    }

    public static final int STMT_FIELD_NUMBER = 4;
    private com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage stmt_;
    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    public boolean hasStmt() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getStmt() {
      return stmt_ == null ? com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance() : stmt_;
    }
    /**
     * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
     */
    public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder getStmtOrBuilder() {
      return stmt_ == null ? com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance() : stmt_;
    }

    public static final int FETCH_ROWS_FIELD_NUMBER = 5;
    private long fetchRows_;
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    public boolean hasFetchRows() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    public long getFetchRows() {
      return fetchRows_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasCursorId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasStmt()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getStmt().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeUInt32(1, cursorId_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(4, getStmt());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeUInt64(5, fetchRows_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, cursorId_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getStmt());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(5, fetchRows_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Open)) {
        return super.equals(obj);
      }
      com.mysql.cj.x.protobuf.MysqlxCursor.Open other = (com.mysql.cj.x.protobuf.MysqlxCursor.Open) obj;

      boolean result = true;
      result = result && (hasCursorId() == other.hasCursorId());
      if (hasCursorId()) {
        result = result && (getCursorId()
            == other.getCursorId());
      }
      result = result && (hasStmt() == other.hasStmt());
      if (hasStmt()) {
        result = result && getStmt()
            .equals(other.getStmt());
      }
      result = result && (hasFetchRows() == other.hasFetchRows());
      if (hasFetchRows()) {
        result = result && (getFetchRows()
            == other.getFetchRows());
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasCursorId()) {
        hash = (37 * hash) + CURSOR_ID_FIELD_NUMBER;
        hash = (53 * hash) + getCursorId();
      }
      if (hasStmt()) {
        hash = (37 * hash) + STMT_FIELD_NUMBER;
        hash = (53 * hash) + getStmt().hashCode();
      }
      if (hasFetchRows()) {
        hash = (37 * hash) + FETCH_ROWS_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getFetchRows());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.mysql.cj.x.protobuf.MysqlxCursor.Open prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Open a cursor
     * .. uml::
     *   client -&gt; server: Open
     *   alt Success
     *     ... none or partial Resultsets or full Resultsets ...
     *     client &lt;- server: StmtExecuteOk
     *  else Failure
     *     client &lt;- server: Error
     *  end
     * :param cursor_id: client side assigned cursor id, the ID is going to represent new cursor and assigned to it statement
     * :param stmt: statement which resultset is going to be iterated through the cursor
     * :param fetch_rows: number of rows which should be retrieved from sequential cursor
     * :Returns: :protobuf:msg:`Mysqlx.Ok::`
     * </pre>
     *
     * Protobuf type {@code Mysqlx.Cursor.Open}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Mysqlx.Cursor.Open)
        com.mysql.cj.x.protobuf.MysqlxCursor.OpenOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.mysql.cj.x.protobuf.MysqlxCursor.Open.class, com.mysql.cj.x.protobuf.MysqlxCursor.Open.Builder.class);
      }

      // Construct using com.mysql.cj.x.protobuf.MysqlxCursor.Open.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getStmtFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        cursorId_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        if (stmtBuilder_ == null) {
          stmt_ = null;
        } else {
          stmtBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        fetchRows_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Open_descriptor;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open getDefaultInstanceForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.Open.getDefaultInstance();
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open build() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Open result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open buildPartial() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Open result = new com.mysql.cj.x.protobuf.MysqlxCursor.Open(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.cursorId_ = cursorId_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (stmtBuilder_ == null) {
          result.stmt_ = stmt_;
        } else {
          result.stmt_ = stmtBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.fetchRows_ = fetchRows_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Open) {
          return mergeFrom((com.mysql.cj.x.protobuf.MysqlxCursor.Open)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.mysql.cj.x.protobuf.MysqlxCursor.Open other) {
        if (other == com.mysql.cj.x.protobuf.MysqlxCursor.Open.getDefaultInstance()) return this;
        if (other.hasCursorId()) {
          setCursorId(other.getCursorId());
        }
        if (other.hasStmt()) {
          mergeStmt(other.getStmt());
        }
        if (other.hasFetchRows()) {
          setFetchRows(other.getFetchRows());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        if (!hasCursorId()) {
          return false;
        }
        if (!hasStmt()) {
          return false;
        }
        if (!getStmt().isInitialized()) {
          return false;
        }
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.mysql.cj.x.protobuf.MysqlxCursor.Open parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.mysql.cj.x.protobuf.MysqlxCursor.Open) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int cursorId_ ;
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public boolean hasCursorId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public int getCursorId() {
        return cursorId_;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder setCursorId(int value) {
        bitField0_ |= 0x00000001;
        cursorId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder clearCursorId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        cursorId_ = 0;
        onChanged();
        return this;
      }

      private com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage stmt_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder> stmtBuilder_;
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public boolean hasStmt() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage getStmt() {
        if (stmtBuilder_ == null) {
          return stmt_ == null ? com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance() : stmt_;
        } else {
          return stmtBuilder_.getMessage();
        }
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public Builder setStmt(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage value) {
        if (stmtBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          stmt_ = value;
          onChanged();
        } else {
          stmtBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public Builder setStmt(
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder builderForValue) {
        if (stmtBuilder_ == null) {
          stmt_ = builderForValue.build();
          onChanged();
        } else {
          stmtBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public Builder mergeStmt(com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage value) {
        if (stmtBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              stmt_ != null &&
              stmt_ != com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance()) {
            stmt_ =
              com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.newBuilder(stmt_).mergeFrom(value).buildPartial();
          } else {
            stmt_ = value;
          }
          onChanged();
        } else {
          stmtBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public Builder clearStmt() {
        if (stmtBuilder_ == null) {
          stmt_ = null;
          onChanged();
        } else {
          stmtBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder getStmtBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getStmtFieldBuilder().getBuilder();
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      public com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder getStmtOrBuilder() {
        if (stmtBuilder_ != null) {
          return stmtBuilder_.getMessageOrBuilder();
        } else {
          return stmt_ == null ?
              com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.getDefaultInstance() : stmt_;
        }
      }
      /**
       * <code>required .Mysqlx.Cursor.Open.OneOfMessage stmt = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder> 
          getStmtFieldBuilder() {
        if (stmtBuilder_ == null) {
          stmtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessage.Builder, com.mysql.cj.x.protobuf.MysqlxCursor.Open.OneOfMessageOrBuilder>(
                  getStmt(),
                  getParentForChildren(),
                  isClean());
          stmt_ = null;
        }
        return stmtBuilder_;
      }

      private long fetchRows_ ;
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public boolean hasFetchRows() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public long getFetchRows() {
        return fetchRows_;
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public Builder setFetchRows(long value) {
        bitField0_ |= 0x00000004;
        fetchRows_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public Builder clearFetchRows() {
        bitField0_ = (bitField0_ & ~0x00000004);
        fetchRows_ = 0L;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:Mysqlx.Cursor.Open)
    }

    // @@protoc_insertion_point(class_scope:Mysqlx.Cursor.Open)
    private static final com.mysql.cj.x.protobuf.MysqlxCursor.Open DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.mysql.cj.x.protobuf.MysqlxCursor.Open();
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Open getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<Open>
        PARSER = new com.google.protobuf.AbstractParser<Open>() {
      @java.lang.Override
      public Open parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Open(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Open> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<Open> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.mysql.cj.x.protobuf.MysqlxCursor.Open getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface FetchOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Mysqlx.Cursor.Fetch)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    boolean hasCursorId();
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    int getCursorId();

    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    boolean hasFetchRows();
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    long getFetchRows();
  }
  /**
   * <pre>
   * Fetch next portion of data from a cursor
   * .. uml::
   *   client -&gt; server: Fetch
   *   alt Success
   *     ... none or partial Resultsets or full Resultsets ...
   *     client &lt;- server: StmtExecuteOk
   *   else
   *    client &lt;- server: Error
   *   end
   * :param cursor_id: client side assigned cursor id, must be already open
   * :param fetch_rows: number of rows which should be retrieved from sequential cursor
   * </pre>
   *
   * Protobuf type {@code Mysqlx.Cursor.Fetch}
   */
  public  static final class Fetch extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Mysqlx.Cursor.Fetch)
      FetchOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Fetch.newBuilder() to construct.
    private Fetch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Fetch() {
      cursorId_ = 0;
      fetchRows_ = 0L;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Fetch(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              cursorId_ = input.readUInt32();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000002;
              fetchRows_ = input.readUInt64();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Fetch_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Fetch_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.class, com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.Builder.class);
    }

    private int bitField0_;
    public static final int CURSOR_ID_FIELD_NUMBER = 1;
    private int cursorId_;
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public boolean hasCursorId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public int getCursorId() {
      return cursorId_;
    }

    public static final int FETCH_ROWS_FIELD_NUMBER = 5;
    private long fetchRows_;
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    public boolean hasFetchRows() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional uint64 fetch_rows = 5;</code>
     */
    public long getFetchRows() {
      return fetchRows_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasCursorId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeUInt32(1, cursorId_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeUInt64(5, fetchRows_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, cursorId_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(5, fetchRows_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Fetch)) {
        return super.equals(obj);
      }
      com.mysql.cj.x.protobuf.MysqlxCursor.Fetch other = (com.mysql.cj.x.protobuf.MysqlxCursor.Fetch) obj;

      boolean result = true;
      result = result && (hasCursorId() == other.hasCursorId());
      if (hasCursorId()) {
        result = result && (getCursorId()
            == other.getCursorId());
      }
      result = result && (hasFetchRows() == other.hasFetchRows());
      if (hasFetchRows()) {
        result = result && (getFetchRows()
            == other.getFetchRows());
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasCursorId()) {
        hash = (37 * hash) + CURSOR_ID_FIELD_NUMBER;
        hash = (53 * hash) + getCursorId();
      }
      if (hasFetchRows()) {
        hash = (37 * hash) + FETCH_ROWS_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getFetchRows());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.mysql.cj.x.protobuf.MysqlxCursor.Fetch prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Fetch next portion of data from a cursor
     * .. uml::
     *   client -&gt; server: Fetch
     *   alt Success
     *     ... none or partial Resultsets or full Resultsets ...
     *     client &lt;- server: StmtExecuteOk
     *   else
     *    client &lt;- server: Error
     *   end
     * :param cursor_id: client side assigned cursor id, must be already open
     * :param fetch_rows: number of rows which should be retrieved from sequential cursor
     * </pre>
     *
     * Protobuf type {@code Mysqlx.Cursor.Fetch}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Mysqlx.Cursor.Fetch)
        com.mysql.cj.x.protobuf.MysqlxCursor.FetchOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Fetch_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Fetch_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.class, com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.Builder.class);
      }

      // Construct using com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        cursorId_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        fetchRows_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Fetch_descriptor;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Fetch getDefaultInstanceForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.getDefaultInstance();
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Fetch build() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Fetch result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Fetch buildPartial() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Fetch result = new com.mysql.cj.x.protobuf.MysqlxCursor.Fetch(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.cursorId_ = cursorId_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.fetchRows_ = fetchRows_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Fetch) {
          return mergeFrom((com.mysql.cj.x.protobuf.MysqlxCursor.Fetch)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.mysql.cj.x.protobuf.MysqlxCursor.Fetch other) {
        if (other == com.mysql.cj.x.protobuf.MysqlxCursor.Fetch.getDefaultInstance()) return this;
        if (other.hasCursorId()) {
          setCursorId(other.getCursorId());
        }
        if (other.hasFetchRows()) {
          setFetchRows(other.getFetchRows());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        if (!hasCursorId()) {
          return false;
        }
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.mysql.cj.x.protobuf.MysqlxCursor.Fetch parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.mysql.cj.x.protobuf.MysqlxCursor.Fetch) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int cursorId_ ;
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public boolean hasCursorId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public int getCursorId() {
        return cursorId_;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder setCursorId(int value) {
        bitField0_ |= 0x00000001;
        cursorId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder clearCursorId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        cursorId_ = 0;
        onChanged();
        return this;
      }

      private long fetchRows_ ;
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public boolean hasFetchRows() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public long getFetchRows() {
        return fetchRows_;
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public Builder setFetchRows(long value) {
        bitField0_ |= 0x00000002;
        fetchRows_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional uint64 fetch_rows = 5;</code>
       */
      public Builder clearFetchRows() {
        bitField0_ = (bitField0_ & ~0x00000002);
        fetchRows_ = 0L;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:Mysqlx.Cursor.Fetch)
    }

    // @@protoc_insertion_point(class_scope:Mysqlx.Cursor.Fetch)
    private static final com.mysql.cj.x.protobuf.MysqlxCursor.Fetch DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.mysql.cj.x.protobuf.MysqlxCursor.Fetch();
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Fetch getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<Fetch>
        PARSER = new com.google.protobuf.AbstractParser<Fetch>() {
      @java.lang.Override
      public Fetch parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Fetch(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Fetch> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<Fetch> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.mysql.cj.x.protobuf.MysqlxCursor.Fetch getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface CloseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Mysqlx.Cursor.Close)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    boolean hasCursorId();
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    int getCursorId();
  }
  /**
   * <pre>
   * Close cursor
   * .. uml::
   *   client -&gt; server: Close
   *   alt Success
   *     client &lt;- server: Ok
   *   else Failure
   *     client &lt;- server: Error
   *   end
   * :param cursor_id: client side assigned cursor id, must be allocated/open
   * :Returns: :protobuf:msg:`Mysqlx.Ok|Mysqlx.Error`
   * </pre>
   *
   * Protobuf type {@code Mysqlx.Cursor.Close}
   */
  public  static final class Close extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Mysqlx.Cursor.Close)
      CloseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Close.newBuilder() to construct.
    private Close(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Close() {
      cursorId_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Close(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              cursorId_ = input.readUInt32();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Close_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Close_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.mysql.cj.x.protobuf.MysqlxCursor.Close.class, com.mysql.cj.x.protobuf.MysqlxCursor.Close.Builder.class);
    }

    private int bitField0_;
    public static final int CURSOR_ID_FIELD_NUMBER = 1;
    private int cursorId_;
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public boolean hasCursorId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required uint32 cursor_id = 1;</code>
     */
    public int getCursorId() {
      return cursorId_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasCursorId()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeUInt32(1, cursorId_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, cursorId_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Close)) {
        return super.equals(obj);
      }
      com.mysql.cj.x.protobuf.MysqlxCursor.Close other = (com.mysql.cj.x.protobuf.MysqlxCursor.Close) obj;

      boolean result = true;
      result = result && (hasCursorId() == other.hasCursorId());
      if (hasCursorId()) {
        result = result && (getCursorId()
            == other.getCursorId());
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasCursorId()) {
        hash = (37 * hash) + CURSOR_ID_FIELD_NUMBER;
        hash = (53 * hash) + getCursorId();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.mysql.cj.x.protobuf.MysqlxCursor.Close prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Close cursor
     * .. uml::
     *   client -&gt; server: Close
     *   alt Success
     *     client &lt;- server: Ok
     *   else Failure
     *     client &lt;- server: Error
     *   end
     * :param cursor_id: client side assigned cursor id, must be allocated/open
     * :Returns: :protobuf:msg:`Mysqlx.Ok|Mysqlx.Error`
     * </pre>
     *
     * Protobuf type {@code Mysqlx.Cursor.Close}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Mysqlx.Cursor.Close)
        com.mysql.cj.x.protobuf.MysqlxCursor.CloseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Close_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Close_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.mysql.cj.x.protobuf.MysqlxCursor.Close.class, com.mysql.cj.x.protobuf.MysqlxCursor.Close.Builder.class);
      }

      // Construct using com.mysql.cj.x.protobuf.MysqlxCursor.Close.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        cursorId_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.internal_static_Mysqlx_Cursor_Close_descriptor;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Close getDefaultInstanceForType() {
        return com.mysql.cj.x.protobuf.MysqlxCursor.Close.getDefaultInstance();
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Close build() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Close result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.mysql.cj.x.protobuf.MysqlxCursor.Close buildPartial() {
        com.mysql.cj.x.protobuf.MysqlxCursor.Close result = new com.mysql.cj.x.protobuf.MysqlxCursor.Close(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.cursorId_ = cursorId_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.mysql.cj.x.protobuf.MysqlxCursor.Close) {
          return mergeFrom((com.mysql.cj.x.protobuf.MysqlxCursor.Close)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.mysql.cj.x.protobuf.MysqlxCursor.Close other) {
        if (other == com.mysql.cj.x.protobuf.MysqlxCursor.Close.getDefaultInstance()) return this;
        if (other.hasCursorId()) {
          setCursorId(other.getCursorId());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        if (!hasCursorId()) {
          return false;
        }
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.mysql.cj.x.protobuf.MysqlxCursor.Close parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.mysql.cj.x.protobuf.MysqlxCursor.Close) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int cursorId_ ;
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public boolean hasCursorId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public int getCursorId() {
        return cursorId_;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder setCursorId(int value) {
        bitField0_ |= 0x00000001;
        cursorId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required uint32 cursor_id = 1;</code>
       */
      public Builder clearCursorId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        cursorId_ = 0;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:Mysqlx.Cursor.Close)
    }

    // @@protoc_insertion_point(class_scope:Mysqlx.Cursor.Close)
    private static final com.mysql.cj.x.protobuf.MysqlxCursor.Close DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.mysql.cj.x.protobuf.MysqlxCursor.Close();
    }

    public static com.mysql.cj.x.protobuf.MysqlxCursor.Close getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<Close>
        PARSER = new com.google.protobuf.AbstractParser<Close>() {
      @java.lang.Override
      public Close parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Close(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Close> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<Close> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.mysql.cj.x.protobuf.MysqlxCursor.Close getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Mysqlx_Cursor_Open_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Mysqlx_Cursor_Open_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Mysqlx_Cursor_Open_OneOfMessage_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Mysqlx_Cursor_Fetch_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Mysqlx_Cursor_Fetch_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Mysqlx_Cursor_Close_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Mysqlx_Cursor_Close_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\023mysqlx_cursor.proto\022\rMysqlx.Cursor\032\014my" +
      "sqlx.proto\032\024mysqlx_prepare.proto\"\370\001\n\004Ope" +
      "n\022\021\n\tcursor_id\030\001 \002(\r\022.\n\004stmt\030\004 \002(\0132 .Mys" +
      "qlx.Cursor.Open.OneOfMessage\022\022\n\nfetch_ro" +
      "ws\030\005 \001(\004\032\222\001\n\014OneOfMessage\0223\n\004type\030\001 \002(\0162" +
      "%.Mysqlx.Cursor.Open.OneOfMessage.Type\0220" +
      "\n\017prepare_execute\030\002 \001(\0132\027.Mysqlx.Prepare" +
      ".Execute\"\033\n\004Type\022\023\n\017PREPARE_EXECUTE\020\000:\004\210" +
      "\3520+\"4\n\005Fetch\022\021\n\tcursor_id\030\001 \002(\r\022\022\n\nfetch" +
      "_rows\030\005 \001(\004:\004\210\3520-\" \n\005Close\022\021\n\tcursor_id\030" +
      "\001 \002(\r:\004\210\3520,B\031\n\027com.mysql.cj.x.protobuf"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.mysql.cj.x.protobuf.Mysqlx.getDescriptor(),
          com.mysql.cj.x.protobuf.MysqlxPrepare.getDescriptor(),
        }, assigner);
    internal_static_Mysqlx_Cursor_Open_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_Mysqlx_Cursor_Open_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Mysqlx_Cursor_Open_descriptor,
        new java.lang.String[] { "CursorId", "Stmt", "FetchRows", });
    internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor =
      internal_static_Mysqlx_Cursor_Open_descriptor.getNestedTypes().get(0);
    internal_static_Mysqlx_Cursor_Open_OneOfMessage_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Mysqlx_Cursor_Open_OneOfMessage_descriptor,
        new java.lang.String[] { "Type", "PrepareExecute", });
    internal_static_Mysqlx_Cursor_Fetch_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_Mysqlx_Cursor_Fetch_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Mysqlx_Cursor_Fetch_descriptor,
        new java.lang.String[] { "CursorId", "FetchRows", });
    internal_static_Mysqlx_Cursor_Close_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_Mysqlx_Cursor_Close_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Mysqlx_Cursor_Close_descriptor,
        new java.lang.String[] { "CursorId", });
    com.google.protobuf.ExtensionRegistry registry =
        com.google.protobuf.ExtensionRegistry.newInstance();
    registry.add(com.mysql.cj.x.protobuf.Mysqlx.clientMessageId);
    com.google.protobuf.Descriptors.FileDescriptor
        .internalUpdateFileDescriptor(descriptor, registry);
    com.mysql.cj.x.protobuf.Mysqlx.getDescriptor();
    com.mysql.cj.x.protobuf.MysqlxPrepare.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
