// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: greptime/v1/wal.proto

package greptime.v1;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * <pre>
   * Type of operation to rows.
   * </pre>
   *
   * Protobuf enum {@code greptime.v1.OpType}
   */
  public enum OpType
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <pre>
     * Delete rows.
     * </pre>
     *
     * <code>DELETE = 0;</code>
     */
    DELETE(0),
    /**
     * <pre>
     * Put rows.
     * </pre>
     *
     * <code>PUT = 1;</code>
     */
    PUT(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <pre>
     * Delete rows.
     * </pre>
     *
     * <code>DELETE = 0;</code>
     */
    public static final int DELETE_VALUE = 0;
    /**
     * <pre>
     * Put rows.
     * </pre>
     *
     * <code>PUT = 1;</code>
     */
    public static final int PUT_VALUE = 1;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OpType valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static OpType forNumber(int value) {
      switch (value) {
        case 0: return DELETE;
        case 1: return PUT;
        default: return null;
      }
    }

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

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      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 greptime.v1.Wal.getDescriptor().getEnumTypes().get(0);
    }

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

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

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:greptime.v1.OpType)
  }

  /**
   * <pre>
   * Encoding of primary key.
   * </pre>
   *
   * Protobuf enum {@code greptime.v1.PrimaryKeyEncoding}
   */
  public enum PrimaryKeyEncoding
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>DENSE = 0;</code>
     */
    DENSE(0),
    /**
     * <code>SPARSE = 1;</code>
     */
    SPARSE(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <code>DENSE = 0;</code>
     */
    public static final int DENSE_VALUE = 0;
    /**
     * <code>SPARSE = 1;</code>
     */
    public static final int SPARSE_VALUE = 1;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static PrimaryKeyEncoding valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static PrimaryKeyEncoding forNumber(int value) {
      switch (value) {
        case 0: return DENSE;
        case 1: return SPARSE;
        default: return null;
      }
    }

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

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      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 greptime.v1.Wal.getDescriptor().getEnumTypes().get(1);
    }

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

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

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:greptime.v1.PrimaryKeyEncoding)
  }

  public interface WriteHintOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.WriteHint)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
     * @return The enum numeric value on the wire for primaryKeyEncoding.
     */
    int getPrimaryKeyEncodingValue();
    /**
     * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
     * @return The primaryKeyEncoding.
     */
    greptime.v1.Wal.PrimaryKeyEncoding getPrimaryKeyEncoding();
  }
  /**
   * <pre>
   * Write hint of the mutation.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.WriteHint}
   */
  public static final class WriteHint extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.WriteHint)
      WriteHintOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WriteHint.newBuilder() to construct.
    private WriteHint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WriteHint() {
      primaryKeyEncoding_ = 0;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WriteHint();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WriteHint(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      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();

              primaryKeyEncoding_ = rawValue;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().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 greptime.v1.Wal.internal_static_greptime_v1_WriteHint_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.Wal.internal_static_greptime_v1_WriteHint_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.Wal.WriteHint.class, greptime.v1.Wal.WriteHint.Builder.class);
    }

    public static final int PRIMARY_KEY_ENCODING_FIELD_NUMBER = 1;
    private int primaryKeyEncoding_;
    /**
     * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
     * @return The enum numeric value on the wire for primaryKeyEncoding.
     */
    @java.lang.Override public int getPrimaryKeyEncodingValue() {
      return primaryKeyEncoding_;
    }
    /**
     * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
     * @return The primaryKeyEncoding.
     */
    @java.lang.Override public greptime.v1.Wal.PrimaryKeyEncoding getPrimaryKeyEncoding() {
      @SuppressWarnings("deprecation")
      greptime.v1.Wal.PrimaryKeyEncoding result = greptime.v1.Wal.PrimaryKeyEncoding.valueOf(primaryKeyEncoding_);
      return result == null ? greptime.v1.Wal.PrimaryKeyEncoding.UNRECOGNIZED : result;
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (primaryKeyEncoding_ != greptime.v1.Wal.PrimaryKeyEncoding.DENSE.getNumber()) {
        output.writeEnum(1, primaryKeyEncoding_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (primaryKeyEncoding_ != greptime.v1.Wal.PrimaryKeyEncoding.DENSE.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, primaryKeyEncoding_);
      }
      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 greptime.v1.Wal.WriteHint)) {
        return super.equals(obj);
      }
      greptime.v1.Wal.WriteHint other = (greptime.v1.Wal.WriteHint) obj;

      if (primaryKeyEncoding_ != other.primaryKeyEncoding_) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

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

    public static greptime.v1.Wal.WriteHint parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WriteHint parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WriteHint 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 greptime.v1.Wal.WriteHint parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WriteHint 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 greptime.v1.Wal.WriteHint parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WriteHint 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(greptime.v1.Wal.WriteHint 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>
     * Write hint of the mutation.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.WriteHint}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.WriteHint)
        greptime.v1.Wal.WriteHintOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.Wal.internal_static_greptime_v1_WriteHint_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.Wal.internal_static_greptime_v1_WriteHint_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.Wal.WriteHint.class, greptime.v1.Wal.WriteHint.Builder.class);
      }

      // Construct using greptime.v1.Wal.WriteHint.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();
        primaryKeyEncoding_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.Wal.internal_static_greptime_v1_WriteHint_descriptor;
      }

      @java.lang.Override
      public greptime.v1.Wal.WriteHint getDefaultInstanceForType() {
        return greptime.v1.Wal.WriteHint.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.Wal.WriteHint build() {
        greptime.v1.Wal.WriteHint result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.Wal.WriteHint buildPartial() {
        greptime.v1.Wal.WriteHint result = new greptime.v1.Wal.WriteHint(this);
        result.primaryKeyEncoding_ = primaryKeyEncoding_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(greptime.v1.Wal.WriteHint other) {
        if (other == greptime.v1.Wal.WriteHint.getDefaultInstance()) return this;
        if (other.primaryKeyEncoding_ != 0) {
          setPrimaryKeyEncodingValue(other.getPrimaryKeyEncodingValue());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        greptime.v1.Wal.WriteHint parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.Wal.WriteHint) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int primaryKeyEncoding_ = 0;
      /**
       * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
       * @return The enum numeric value on the wire for primaryKeyEncoding.
       */
      @java.lang.Override public int getPrimaryKeyEncodingValue() {
        return primaryKeyEncoding_;
      }
      /**
       * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
       * @param value The enum numeric value on the wire for primaryKeyEncoding to set.
       * @return This builder for chaining.
       */
      public Builder setPrimaryKeyEncodingValue(int value) {
        
        primaryKeyEncoding_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
       * @return The primaryKeyEncoding.
       */
      @java.lang.Override
      public greptime.v1.Wal.PrimaryKeyEncoding getPrimaryKeyEncoding() {
        @SuppressWarnings("deprecation")
        greptime.v1.Wal.PrimaryKeyEncoding result = greptime.v1.Wal.PrimaryKeyEncoding.valueOf(primaryKeyEncoding_);
        return result == null ? greptime.v1.Wal.PrimaryKeyEncoding.UNRECOGNIZED : result;
      }
      /**
       * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
       * @param value The primaryKeyEncoding to set.
       * @return This builder for chaining.
       */
      public Builder setPrimaryKeyEncoding(greptime.v1.Wal.PrimaryKeyEncoding value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        primaryKeyEncoding_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.greptime.v1.PrimaryKeyEncoding primary_key_encoding = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearPrimaryKeyEncoding() {
        
        primaryKeyEncoding_ = 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:greptime.v1.WriteHint)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.WriteHint)
    private static final greptime.v1.Wal.WriteHint DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.Wal.WriteHint();
    }

    public static greptime.v1.Wal.WriteHint getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.Wal.WriteHint getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface MutationOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.Mutation)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Type of this mutation.
     * </pre>
     *
     * <code>.greptime.v1.OpType op_type = 1;</code>
     * @return The enum numeric value on the wire for opType.
     */
    int getOpTypeValue();
    /**
     * <pre>
     * Type of this mutation.
     * </pre>
     *
     * <code>.greptime.v1.OpType op_type = 1;</code>
     * @return The opType.
     */
    greptime.v1.Wal.OpType getOpType();

    /**
     * <pre>
     * Start WAL sequence of this mutation.
     * </pre>
     *
     * <code>uint64 sequence = 2;</code>
     * @return The sequence.
     */
    long getSequence();

    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     * @return Whether the rows field is set.
     */
    boolean hasRows();
    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     * @return The rows.
     */
    io.greptime.v1.RowData.Rows getRows();
    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     */
    io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder();

    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     * @return Whether the writeHint field is set.
     */
    boolean hasWriteHint();
    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     * @return The writeHint.
     */
    greptime.v1.Wal.WriteHint getWriteHint();
    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     */
    greptime.v1.Wal.WriteHintOrBuilder getWriteHintOrBuilder();
  }
  /**
   * <pre>
   * Mutation contains updates to a set of rows.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.Mutation}
   */
  public static final class Mutation extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.Mutation)
      MutationOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Mutation.newBuilder() to construct.
    private Mutation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Mutation() {
      opType_ = 0;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new Mutation();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Mutation(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      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();

              opType_ = rawValue;
              break;
            }
            case 16: {

              sequence_ = input.readUInt64();
              break;
            }
            case 26: {
              io.greptime.v1.RowData.Rows.Builder subBuilder = null;
              if (rows_ != null) {
                subBuilder = rows_.toBuilder();
              }
              rows_ = input.readMessage(io.greptime.v1.RowData.Rows.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(rows_);
                rows_ = subBuilder.buildPartial();
              }

              break;
            }
            case 34: {
              greptime.v1.Wal.WriteHint.Builder subBuilder = null;
              if (writeHint_ != null) {
                subBuilder = writeHint_.toBuilder();
              }
              writeHint_ = input.readMessage(greptime.v1.Wal.WriteHint.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(writeHint_);
                writeHint_ = subBuilder.buildPartial();
              }

              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().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 greptime.v1.Wal.internal_static_greptime_v1_Mutation_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.Wal.internal_static_greptime_v1_Mutation_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.Wal.Mutation.class, greptime.v1.Wal.Mutation.Builder.class);
    }

    public static final int OP_TYPE_FIELD_NUMBER = 1;
    private int opType_;
    /**
     * <pre>
     * Type of this mutation.
     * </pre>
     *
     * <code>.greptime.v1.OpType op_type = 1;</code>
     * @return The enum numeric value on the wire for opType.
     */
    @java.lang.Override public int getOpTypeValue() {
      return opType_;
    }
    /**
     * <pre>
     * Type of this mutation.
     * </pre>
     *
     * <code>.greptime.v1.OpType op_type = 1;</code>
     * @return The opType.
     */
    @java.lang.Override public greptime.v1.Wal.OpType getOpType() {
      @SuppressWarnings("deprecation")
      greptime.v1.Wal.OpType result = greptime.v1.Wal.OpType.valueOf(opType_);
      return result == null ? greptime.v1.Wal.OpType.UNRECOGNIZED : result;
    }

    public static final int SEQUENCE_FIELD_NUMBER = 2;
    private long sequence_;
    /**
     * <pre>
     * Start WAL sequence of this mutation.
     * </pre>
     *
     * <code>uint64 sequence = 2;</code>
     * @return The sequence.
     */
    @java.lang.Override
    public long getSequence() {
      return sequence_;
    }

    public static final int ROWS_FIELD_NUMBER = 3;
    private io.greptime.v1.RowData.Rows rows_;
    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     * @return Whether the rows field is set.
     */
    @java.lang.Override
    public boolean hasRows() {
      return rows_ != null;
    }
    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     * @return The rows.
     */
    @java.lang.Override
    public io.greptime.v1.RowData.Rows getRows() {
      return rows_ == null ? io.greptime.v1.RowData.Rows.getDefaultInstance() : rows_;
    }
    /**
     * <pre>
     * Row updates to write to the WAL.
     * </pre>
     *
     * <code>.greptime.v1.Rows rows = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder() {
      return getRows();
    }

    public static final int WRITE_HINT_FIELD_NUMBER = 4;
    private greptime.v1.Wal.WriteHint writeHint_;
    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     * @return Whether the writeHint field is set.
     */
    @java.lang.Override
    public boolean hasWriteHint() {
      return writeHint_ != null;
    }
    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     * @return The writeHint.
     */
    @java.lang.Override
    public greptime.v1.Wal.WriteHint getWriteHint() {
      return writeHint_ == null ? greptime.v1.Wal.WriteHint.getDefaultInstance() : writeHint_;
    }
    /**
     * <pre>
     * Write hint of the mutation.
     * </pre>
     *
     * <code>.greptime.v1.WriteHint write_hint = 4;</code>
     */
    @java.lang.Override
    public greptime.v1.Wal.WriteHintOrBuilder getWriteHintOrBuilder() {
      return getWriteHint();
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (opType_ != greptime.v1.Wal.OpType.DELETE.getNumber()) {
        output.writeEnum(1, opType_);
      }
      if (sequence_ != 0L) {
        output.writeUInt64(2, sequence_);
      }
      if (rows_ != null) {
        output.writeMessage(3, getRows());
      }
      if (writeHint_ != null) {
        output.writeMessage(4, getWriteHint());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (opType_ != greptime.v1.Wal.OpType.DELETE.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, opType_);
      }
      if (sequence_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, sequence_);
      }
      if (rows_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getRows());
      }
      if (writeHint_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getWriteHint());
      }
      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 greptime.v1.Wal.Mutation)) {
        return super.equals(obj);
      }
      greptime.v1.Wal.Mutation other = (greptime.v1.Wal.Mutation) obj;

      if (opType_ != other.opType_) return false;
      if (getSequence()
          != other.getSequence()) return false;
      if (hasRows() != other.hasRows()) return false;
      if (hasRows()) {
        if (!getRows()
            .equals(other.getRows())) return false;
      }
      if (hasWriteHint() != other.hasWriteHint()) return false;
      if (hasWriteHint()) {
        if (!getWriteHint()
            .equals(other.getWriteHint())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + OP_TYPE_FIELD_NUMBER;
      hash = (53 * hash) + opType_;
      hash = (37 * hash) + SEQUENCE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getSequence());
      if (hasRows()) {
        hash = (37 * hash) + ROWS_FIELD_NUMBER;
        hash = (53 * hash) + getRows().hashCode();
      }
      if (hasWriteHint()) {
        hash = (37 * hash) + WRITE_HINT_FIELD_NUMBER;
        hash = (53 * hash) + getWriteHint().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.Wal.Mutation parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.Mutation parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.Mutation parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.Mutation parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.Mutation parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.Mutation parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.Mutation parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.Mutation 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 greptime.v1.Wal.Mutation parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.Mutation 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 greptime.v1.Wal.Mutation parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.Mutation 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(greptime.v1.Wal.Mutation 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>
     * Mutation contains updates to a set of rows.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.Mutation}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.Mutation)
        greptime.v1.Wal.MutationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.Wal.internal_static_greptime_v1_Mutation_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.Wal.internal_static_greptime_v1_Mutation_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.Wal.Mutation.class, greptime.v1.Wal.Mutation.Builder.class);
      }

      // Construct using greptime.v1.Wal.Mutation.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();
        opType_ = 0;

        sequence_ = 0L;

        if (rowsBuilder_ == null) {
          rows_ = null;
        } else {
          rows_ = null;
          rowsBuilder_ = null;
        }
        if (writeHintBuilder_ == null) {
          writeHint_ = null;
        } else {
          writeHint_ = null;
          writeHintBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.Wal.internal_static_greptime_v1_Mutation_descriptor;
      }

      @java.lang.Override
      public greptime.v1.Wal.Mutation getDefaultInstanceForType() {
        return greptime.v1.Wal.Mutation.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.Wal.Mutation build() {
        greptime.v1.Wal.Mutation result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.Wal.Mutation buildPartial() {
        greptime.v1.Wal.Mutation result = new greptime.v1.Wal.Mutation(this);
        result.opType_ = opType_;
        result.sequence_ = sequence_;
        if (rowsBuilder_ == null) {
          result.rows_ = rows_;
        } else {
          result.rows_ = rowsBuilder_.build();
        }
        if (writeHintBuilder_ == null) {
          result.writeHint_ = writeHint_;
        } else {
          result.writeHint_ = writeHintBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(greptime.v1.Wal.Mutation other) {
        if (other == greptime.v1.Wal.Mutation.getDefaultInstance()) return this;
        if (other.opType_ != 0) {
          setOpTypeValue(other.getOpTypeValue());
        }
        if (other.getSequence() != 0L) {
          setSequence(other.getSequence());
        }
        if (other.hasRows()) {
          mergeRows(other.getRows());
        }
        if (other.hasWriteHint()) {
          mergeWriteHint(other.getWriteHint());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        greptime.v1.Wal.Mutation parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.Wal.Mutation) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int opType_ = 0;
      /**
       * <pre>
       * Type of this mutation.
       * </pre>
       *
       * <code>.greptime.v1.OpType op_type = 1;</code>
       * @return The enum numeric value on the wire for opType.
       */
      @java.lang.Override public int getOpTypeValue() {
        return opType_;
      }
      /**
       * <pre>
       * Type of this mutation.
       * </pre>
       *
       * <code>.greptime.v1.OpType op_type = 1;</code>
       * @param value The enum numeric value on the wire for opType to set.
       * @return This builder for chaining.
       */
      public Builder setOpTypeValue(int value) {
        
        opType_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Type of this mutation.
       * </pre>
       *
       * <code>.greptime.v1.OpType op_type = 1;</code>
       * @return The opType.
       */
      @java.lang.Override
      public greptime.v1.Wal.OpType getOpType() {
        @SuppressWarnings("deprecation")
        greptime.v1.Wal.OpType result = greptime.v1.Wal.OpType.valueOf(opType_);
        return result == null ? greptime.v1.Wal.OpType.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * Type of this mutation.
       * </pre>
       *
       * <code>.greptime.v1.OpType op_type = 1;</code>
       * @param value The opType to set.
       * @return This builder for chaining.
       */
      public Builder setOpType(greptime.v1.Wal.OpType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        opType_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Type of this mutation.
       * </pre>
       *
       * <code>.greptime.v1.OpType op_type = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearOpType() {
        
        opType_ = 0;
        onChanged();
        return this;
      }

      private long sequence_ ;
      /**
       * <pre>
       * Start WAL sequence of this mutation.
       * </pre>
       *
       * <code>uint64 sequence = 2;</code>
       * @return The sequence.
       */
      @java.lang.Override
      public long getSequence() {
        return sequence_;
      }
      /**
       * <pre>
       * Start WAL sequence of this mutation.
       * </pre>
       *
       * <code>uint64 sequence = 2;</code>
       * @param value The sequence to set.
       * @return This builder for chaining.
       */
      public Builder setSequence(long value) {
        
        sequence_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Start WAL sequence of this mutation.
       * </pre>
       *
       * <code>uint64 sequence = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearSequence() {
        
        sequence_ = 0L;
        onChanged();
        return this;
      }

      private io.greptime.v1.RowData.Rows rows_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.RowData.Rows, io.greptime.v1.RowData.Rows.Builder, io.greptime.v1.RowData.RowsOrBuilder> rowsBuilder_;
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       * @return Whether the rows field is set.
       */
      public boolean hasRows() {
        return rowsBuilder_ != null || rows_ != null;
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       * @return The rows.
       */
      public io.greptime.v1.RowData.Rows getRows() {
        if (rowsBuilder_ == null) {
          return rows_ == null ? io.greptime.v1.RowData.Rows.getDefaultInstance() : rows_;
        } else {
          return rowsBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public Builder setRows(io.greptime.v1.RowData.Rows value) {
        if (rowsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          rows_ = value;
          onChanged();
        } else {
          rowsBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public Builder setRows(
          io.greptime.v1.RowData.Rows.Builder builderForValue) {
        if (rowsBuilder_ == null) {
          rows_ = builderForValue.build();
          onChanged();
        } else {
          rowsBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public Builder mergeRows(io.greptime.v1.RowData.Rows value) {
        if (rowsBuilder_ == null) {
          if (rows_ != null) {
            rows_ =
              io.greptime.v1.RowData.Rows.newBuilder(rows_).mergeFrom(value).buildPartial();
          } else {
            rows_ = value;
          }
          onChanged();
        } else {
          rowsBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public Builder clearRows() {
        if (rowsBuilder_ == null) {
          rows_ = null;
          onChanged();
        } else {
          rows_ = null;
          rowsBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public io.greptime.v1.RowData.Rows.Builder getRowsBuilder() {
        
        onChanged();
        return getRowsFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      public io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder() {
        if (rowsBuilder_ != null) {
          return rowsBuilder_.getMessageOrBuilder();
        } else {
          return rows_ == null ?
              io.greptime.v1.RowData.Rows.getDefaultInstance() : rows_;
        }
      }
      /**
       * <pre>
       * Row updates to write to the WAL.
       * </pre>
       *
       * <code>.greptime.v1.Rows rows = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.RowData.Rows, io.greptime.v1.RowData.Rows.Builder, io.greptime.v1.RowData.RowsOrBuilder> 
          getRowsFieldBuilder() {
        if (rowsBuilder_ == null) {
          rowsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.RowData.Rows, io.greptime.v1.RowData.Rows.Builder, io.greptime.v1.RowData.RowsOrBuilder>(
                  getRows(),
                  getParentForChildren(),
                  isClean());
          rows_ = null;
        }
        return rowsBuilder_;
      }

      private greptime.v1.Wal.WriteHint writeHint_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.Wal.WriteHint, greptime.v1.Wal.WriteHint.Builder, greptime.v1.Wal.WriteHintOrBuilder> writeHintBuilder_;
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       * @return Whether the writeHint field is set.
       */
      public boolean hasWriteHint() {
        return writeHintBuilder_ != null || writeHint_ != null;
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       * @return The writeHint.
       */
      public greptime.v1.Wal.WriteHint getWriteHint() {
        if (writeHintBuilder_ == null) {
          return writeHint_ == null ? greptime.v1.Wal.WriteHint.getDefaultInstance() : writeHint_;
        } else {
          return writeHintBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public Builder setWriteHint(greptime.v1.Wal.WriteHint value) {
        if (writeHintBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          writeHint_ = value;
          onChanged();
        } else {
          writeHintBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public Builder setWriteHint(
          greptime.v1.Wal.WriteHint.Builder builderForValue) {
        if (writeHintBuilder_ == null) {
          writeHint_ = builderForValue.build();
          onChanged();
        } else {
          writeHintBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public Builder mergeWriteHint(greptime.v1.Wal.WriteHint value) {
        if (writeHintBuilder_ == null) {
          if (writeHint_ != null) {
            writeHint_ =
              greptime.v1.Wal.WriteHint.newBuilder(writeHint_).mergeFrom(value).buildPartial();
          } else {
            writeHint_ = value;
          }
          onChanged();
        } else {
          writeHintBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public Builder clearWriteHint() {
        if (writeHintBuilder_ == null) {
          writeHint_ = null;
          onChanged();
        } else {
          writeHint_ = null;
          writeHintBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public greptime.v1.Wal.WriteHint.Builder getWriteHintBuilder() {
        
        onChanged();
        return getWriteHintFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      public greptime.v1.Wal.WriteHintOrBuilder getWriteHintOrBuilder() {
        if (writeHintBuilder_ != null) {
          return writeHintBuilder_.getMessageOrBuilder();
        } else {
          return writeHint_ == null ?
              greptime.v1.Wal.WriteHint.getDefaultInstance() : writeHint_;
        }
      }
      /**
       * <pre>
       * Write hint of the mutation.
       * </pre>
       *
       * <code>.greptime.v1.WriteHint write_hint = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.Wal.WriteHint, greptime.v1.Wal.WriteHint.Builder, greptime.v1.Wal.WriteHintOrBuilder> 
          getWriteHintFieldBuilder() {
        if (writeHintBuilder_ == null) {
          writeHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.Wal.WriteHint, greptime.v1.Wal.WriteHint.Builder, greptime.v1.Wal.WriteHintOrBuilder>(
                  getWriteHint(),
                  getParentForChildren(),
                  isClean());
          writeHint_ = null;
        }
        return writeHintBuilder_;
      }
      @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:greptime.v1.Mutation)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.Mutation)
    private static final greptime.v1.Wal.Mutation DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.Wal.Mutation();
    }

    public static greptime.v1.Wal.Mutation getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.Wal.Mutation getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WalEntryOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.WalEntry)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    java.util.List<greptime.v1.Wal.Mutation> 
        getMutationsList();
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    greptime.v1.Wal.Mutation getMutations(int index);
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    int getMutationsCount();
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    java.util.List<? extends greptime.v1.Wal.MutationOrBuilder> 
        getMutationsOrBuilderList();
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    greptime.v1.Wal.MutationOrBuilder getMutationsOrBuilder(
        int index);
  }
  /**
   * <pre>
   * A WAL entry contains a list of mutations for a region to write.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.WalEntry}
   */
  public static final class WalEntry extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.WalEntry)
      WalEntryOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WalEntry.newBuilder() to construct.
    private WalEntry(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WalEntry() {
      mutations_ = java.util.Collections.emptyList();
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WalEntry();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WalEntry(
        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 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                mutations_ = new java.util.ArrayList<greptime.v1.Wal.Mutation>();
                mutable_bitField0_ |= 0x00000001;
              }
              mutations_.add(
                  input.readMessage(greptime.v1.Wal.Mutation.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          mutations_ = java.util.Collections.unmodifiableList(mutations_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.Wal.internal_static_greptime_v1_WalEntry_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.Wal.internal_static_greptime_v1_WalEntry_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.Wal.WalEntry.class, greptime.v1.Wal.WalEntry.Builder.class);
    }

    public static final int MUTATIONS_FIELD_NUMBER = 1;
    private java.util.List<greptime.v1.Wal.Mutation> mutations_;
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    @java.lang.Override
    public java.util.List<greptime.v1.Wal.Mutation> getMutationsList() {
      return mutations_;
    }
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends greptime.v1.Wal.MutationOrBuilder> 
        getMutationsOrBuilderList() {
      return mutations_;
    }
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    @java.lang.Override
    public int getMutationsCount() {
      return mutations_.size();
    }
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.Wal.Mutation getMutations(int index) {
      return mutations_.get(index);
    }
    /**
     * <pre>
     * List of mutations for a region.
     * </pre>
     *
     * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.Wal.MutationOrBuilder getMutationsOrBuilder(
        int index) {
      return mutations_.get(index);
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < mutations_.size(); i++) {
        output.writeMessage(1, mutations_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < mutations_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, mutations_.get(i));
      }
      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 greptime.v1.Wal.WalEntry)) {
        return super.equals(obj);
      }
      greptime.v1.Wal.WalEntry other = (greptime.v1.Wal.WalEntry) obj;

      if (!getMutationsList()
          .equals(other.getMutationsList())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

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

    public static greptime.v1.Wal.WalEntry parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.Wal.WalEntry parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WalEntry 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 greptime.v1.Wal.WalEntry parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WalEntry 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 greptime.v1.Wal.WalEntry parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.Wal.WalEntry 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(greptime.v1.Wal.WalEntry 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>
     * A WAL entry contains a list of mutations for a region to write.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.WalEntry}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.WalEntry)
        greptime.v1.Wal.WalEntryOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.Wal.internal_static_greptime_v1_WalEntry_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.Wal.internal_static_greptime_v1_WalEntry_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.Wal.WalEntry.class, greptime.v1.Wal.WalEntry.Builder.class);
      }

      // Construct using greptime.v1.Wal.WalEntry.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getMutationsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (mutationsBuilder_ == null) {
          mutations_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          mutationsBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.Wal.internal_static_greptime_v1_WalEntry_descriptor;
      }

      @java.lang.Override
      public greptime.v1.Wal.WalEntry getDefaultInstanceForType() {
        return greptime.v1.Wal.WalEntry.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.Wal.WalEntry build() {
        greptime.v1.Wal.WalEntry result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.Wal.WalEntry buildPartial() {
        greptime.v1.Wal.WalEntry result = new greptime.v1.Wal.WalEntry(this);
        int from_bitField0_ = bitField0_;
        if (mutationsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            mutations_ = java.util.Collections.unmodifiableList(mutations_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.mutations_ = mutations_;
        } else {
          result.mutations_ = mutationsBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(greptime.v1.Wal.WalEntry other) {
        if (other == greptime.v1.Wal.WalEntry.getDefaultInstance()) return this;
        if (mutationsBuilder_ == null) {
          if (!other.mutations_.isEmpty()) {
            if (mutations_.isEmpty()) {
              mutations_ = other.mutations_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureMutationsIsMutable();
              mutations_.addAll(other.mutations_);
            }
            onChanged();
          }
        } else {
          if (!other.mutations_.isEmpty()) {
            if (mutationsBuilder_.isEmpty()) {
              mutationsBuilder_.dispose();
              mutationsBuilder_ = null;
              mutations_ = other.mutations_;
              bitField0_ = (bitField0_ & ~0x00000001);
              mutationsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getMutationsFieldBuilder() : null;
            } else {
              mutationsBuilder_.addAllMessages(other.mutations_);
            }
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

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

      private java.util.List<greptime.v1.Wal.Mutation> mutations_ =
        java.util.Collections.emptyList();
      private void ensureMutationsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          mutations_ = new java.util.ArrayList<greptime.v1.Wal.Mutation>(mutations_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.Wal.Mutation, greptime.v1.Wal.Mutation.Builder, greptime.v1.Wal.MutationOrBuilder> mutationsBuilder_;

      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public java.util.List<greptime.v1.Wal.Mutation> getMutationsList() {
        if (mutationsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(mutations_);
        } else {
          return mutationsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public int getMutationsCount() {
        if (mutationsBuilder_ == null) {
          return mutations_.size();
        } else {
          return mutationsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public greptime.v1.Wal.Mutation getMutations(int index) {
        if (mutationsBuilder_ == null) {
          return mutations_.get(index);
        } else {
          return mutationsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder setMutations(
          int index, greptime.v1.Wal.Mutation value) {
        if (mutationsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMutationsIsMutable();
          mutations_.set(index, value);
          onChanged();
        } else {
          mutationsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder setMutations(
          int index, greptime.v1.Wal.Mutation.Builder builderForValue) {
        if (mutationsBuilder_ == null) {
          ensureMutationsIsMutable();
          mutations_.set(index, builderForValue.build());
          onChanged();
        } else {
          mutationsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder addMutations(greptime.v1.Wal.Mutation value) {
        if (mutationsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMutationsIsMutable();
          mutations_.add(value);
          onChanged();
        } else {
          mutationsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder addMutations(
          int index, greptime.v1.Wal.Mutation value) {
        if (mutationsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMutationsIsMutable();
          mutations_.add(index, value);
          onChanged();
        } else {
          mutationsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder addMutations(
          greptime.v1.Wal.Mutation.Builder builderForValue) {
        if (mutationsBuilder_ == null) {
          ensureMutationsIsMutable();
          mutations_.add(builderForValue.build());
          onChanged();
        } else {
          mutationsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder addMutations(
          int index, greptime.v1.Wal.Mutation.Builder builderForValue) {
        if (mutationsBuilder_ == null) {
          ensureMutationsIsMutable();
          mutations_.add(index, builderForValue.build());
          onChanged();
        } else {
          mutationsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder addAllMutations(
          java.lang.Iterable<? extends greptime.v1.Wal.Mutation> values) {
        if (mutationsBuilder_ == null) {
          ensureMutationsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, mutations_);
          onChanged();
        } else {
          mutationsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder clearMutations() {
        if (mutationsBuilder_ == null) {
          mutations_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          mutationsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public Builder removeMutations(int index) {
        if (mutationsBuilder_ == null) {
          ensureMutationsIsMutable();
          mutations_.remove(index);
          onChanged();
        } else {
          mutationsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public greptime.v1.Wal.Mutation.Builder getMutationsBuilder(
          int index) {
        return getMutationsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public greptime.v1.Wal.MutationOrBuilder getMutationsOrBuilder(
          int index) {
        if (mutationsBuilder_ == null) {
          return mutations_.get(index);  } else {
          return mutationsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public java.util.List<? extends greptime.v1.Wal.MutationOrBuilder> 
           getMutationsOrBuilderList() {
        if (mutationsBuilder_ != null) {
          return mutationsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(mutations_);
        }
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public greptime.v1.Wal.Mutation.Builder addMutationsBuilder() {
        return getMutationsFieldBuilder().addBuilder(
            greptime.v1.Wal.Mutation.getDefaultInstance());
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public greptime.v1.Wal.Mutation.Builder addMutationsBuilder(
          int index) {
        return getMutationsFieldBuilder().addBuilder(
            index, greptime.v1.Wal.Mutation.getDefaultInstance());
      }
      /**
       * <pre>
       * List of mutations for a region.
       * </pre>
       *
       * <code>repeated .greptime.v1.Mutation mutations = 1;</code>
       */
      public java.util.List<greptime.v1.Wal.Mutation.Builder> 
           getMutationsBuilderList() {
        return getMutationsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.Wal.Mutation, greptime.v1.Wal.Mutation.Builder, greptime.v1.Wal.MutationOrBuilder> 
          getMutationsFieldBuilder() {
        if (mutationsBuilder_ == null) {
          mutationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              greptime.v1.Wal.Mutation, greptime.v1.Wal.Mutation.Builder, greptime.v1.Wal.MutationOrBuilder>(
                  mutations_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          mutations_ = null;
        }
        return mutationsBuilder_;
      }
      @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:greptime.v1.WalEntry)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.WalEntry)
    private static final greptime.v1.Wal.WalEntry DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.Wal.WalEntry();
    }

    public static greptime.v1.Wal.WalEntry getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.Wal.WalEntry getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_WriteHint_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_WriteHint_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_Mutation_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_Mutation_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_WalEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_WalEntry_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\025greptime/v1/wal.proto\022\013greptime.v1\032\025gr" +
      "eptime/v1/row.proto\"J\n\tWriteHint\022=\n\024prim" +
      "ary_key_encoding\030\001 \001(\0162\037.greptime.v1.Pri" +
      "maryKeyEncoding\"\217\001\n\010Mutation\022$\n\007op_type\030" +
      "\001 \001(\0162\023.greptime.v1.OpType\022\020\n\010sequence\030\002" +
      " \001(\004\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Rows\022*\n" +
      "\nwrite_hint\030\004 \001(\0132\026.greptime.v1.WriteHin" +
      "t\"4\n\010WalEntry\022(\n\tmutations\030\001 \003(\0132\025.grept" +
      "ime.v1.Mutation*\035\n\006OpType\022\n\n\006DELETE\020\000\022\007\n" +
      "\003PUT\020\001*+\n\022PrimaryKeyEncoding\022\t\n\005DENSE\020\000\022" +
      "\n\n\006SPARSE\020\001B7Z5github.com/GreptimeTeam/g" +
      "reptime-proto/go/greptime/v1b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          io.greptime.v1.RowData.getDescriptor(),
        });
    internal_static_greptime_v1_WriteHint_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_greptime_v1_WriteHint_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_WriteHint_descriptor,
        new java.lang.String[] { "PrimaryKeyEncoding", });
    internal_static_greptime_v1_Mutation_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_greptime_v1_Mutation_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_Mutation_descriptor,
        new java.lang.String[] { "OpType", "Sequence", "Rows", "WriteHint", });
    internal_static_greptime_v1_WalEntry_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_greptime_v1_WalEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_WalEntry_descriptor,
        new java.lang.String[] { "Mutations", });
    io.greptime.v1.RowData.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
