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

package io.greptime.v1.flow;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface FlowRequestHeaderOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.FlowRequestHeader)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    int getTracingContextCount();
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    boolean containsTracingContext(
        java.lang.String key);
    /**
     * Use {@link #getTracingContextMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, java.lang.String>
    getTracingContext();
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    java.util.Map<java.lang.String, java.lang.String>
    getTracingContextMap();
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */

    /* nullable */
java.lang.String getTracingContextOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue);
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */

    java.lang.String getTracingContextOrThrow(
        java.lang.String key);

    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     * @return Whether the queryContext field is set.
     */
    boolean hasQueryContext();
    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     * @return The queryContext.
     */
    io.greptime.v1.Common.QueryContext getQueryContext();
    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     */
    io.greptime.v1.Common.QueryContextOrBuilder getQueryContextOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.flow.FlowRequestHeader}
   */
  public static final class FlowRequestHeader extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.FlowRequestHeader)
      FlowRequestHeaderOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FlowRequestHeader.newBuilder() to construct.
    private FlowRequestHeader(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FlowRequestHeader() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FlowRequestHeader(
        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)) {
                tracingContext_ = com.google.protobuf.MapField.newMapField(
                    TracingContextDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000001;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
              tracingContext__ = input.readMessage(
                  TracingContextDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              tracingContext_.getMutableMap().put(
                  tracingContext__.getKey(), tracingContext__.getValue());
              break;
            }
            case 18: {
              io.greptime.v1.Common.QueryContext.Builder subBuilder = null;
              if (queryContext_ != null) {
                subBuilder = queryContext_.toBuilder();
              }
              queryContext_ = input.readMessage(io.greptime.v1.Common.QueryContext.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(queryContext_);
                queryContext_ = 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 io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetTracingContext();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.FlowRequestHeader.class, io.greptime.v1.flow.Server.FlowRequestHeader.Builder.class);
    }

    public static final int TRACING_CONTEXT_FIELD_NUMBER = 1;
    private static final class TracingContextDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, java.lang.String> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, java.lang.String>newDefaultInstance(
                  io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "");
    }
    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> tracingContext_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetTracingContext() {
      if (tracingContext_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            TracingContextDefaultEntryHolder.defaultEntry);
      }
      return tracingContext_;
    }

    public int getTracingContextCount() {
      return internalGetTracingContext().getMap().size();
    }
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */

    @java.lang.Override
    public boolean containsTracingContext(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetTracingContext().getMap().containsKey(key);
    }
    /**
     * Use {@link #getTracingContextMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getTracingContext() {
      return getTracingContextMap();
    }
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    @java.lang.Override

    public java.util.Map<java.lang.String, java.lang.String> getTracingContextMap() {
      return internalGetTracingContext().getMap();
    }
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    @java.lang.Override

    public java.lang.String getTracingContextOrDefault(
        java.lang.String key,
        java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetTracingContext().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Encoded trace_id &amp; span_id, follow the w3c Trace Context
     * https://www.w3.org/TR/trace-context/#header-name
     * </pre>
     *
     * <code>map&lt;string, string&gt; tracing_context = 1;</code>
     */
    @java.lang.Override

    public java.lang.String getTracingContextOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetTracingContext().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public static final int QUERY_CONTEXT_FIELD_NUMBER = 2;
    private io.greptime.v1.Common.QueryContext queryContext_;
    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     * @return Whether the queryContext field is set.
     */
    @java.lang.Override
    public boolean hasQueryContext() {
      return queryContext_ != null;
    }
    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     * @return The queryContext.
     */
    @java.lang.Override
    public io.greptime.v1.Common.QueryContext getQueryContext() {
      return queryContext_ == null ? io.greptime.v1.Common.QueryContext.getDefaultInstance() : queryContext_;
    }
    /**
     * <pre>
     * The contextual information of the query
     * </pre>
     *
     * <code>.greptime.v1.QueryContext query_context = 2;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Common.QueryContextOrBuilder getQueryContextOrBuilder() {
      return getQueryContext();
    }

    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 {
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetTracingContext(),
          TracingContextDefaultEntryHolder.defaultEntry,
          1);
      if (queryContext_ != null) {
        output.writeMessage(2, getQueryContext());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
           : internalGetTracingContext().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
        tracingContext__ = TracingContextDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(1, tracingContext__);
      }
      if (queryContext_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getQueryContext());
      }
      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 io.greptime.v1.flow.Server.FlowRequestHeader)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.FlowRequestHeader other = (io.greptime.v1.flow.Server.FlowRequestHeader) obj;

      if (!internalGetTracingContext().equals(
          other.internalGetTracingContext())) return false;
      if (hasQueryContext() != other.hasQueryContext()) return false;
      if (hasQueryContext()) {
        if (!getQueryContext()
            .equals(other.getQueryContext())) 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 (!internalGetTracingContext().getMap().isEmpty()) {
        hash = (37 * hash) + TRACING_CONTEXT_FIELD_NUMBER;
        hash = (53 * hash) + internalGetTracingContext().hashCode();
      }
      if (hasQueryContext()) {
        hash = (37 * hash) + QUERY_CONTEXT_FIELD_NUMBER;
        hash = (53 * hash) + getQueryContext().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader 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 io.greptime.v1.flow.Server.FlowRequestHeader parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader 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 io.greptime.v1.flow.Server.FlowRequestHeader parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequestHeader 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(io.greptime.v1.flow.Server.FlowRequestHeader prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.FlowRequestHeader}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.FlowRequestHeader)
        io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 1:
            return internalGetTracingContext();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 1:
            return internalGetMutableTracingContext();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.FlowRequestHeader.class, io.greptime.v1.flow.Server.FlowRequestHeader.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.FlowRequestHeader.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();
        internalGetMutableTracingContext().clear();
        if (queryContextBuilder_ == null) {
          queryContext_ = null;
        } else {
          queryContext_ = null;
          queryContextBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequestHeader_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequestHeader getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.FlowRequestHeader.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequestHeader build() {
        io.greptime.v1.flow.Server.FlowRequestHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequestHeader buildPartial() {
        io.greptime.v1.flow.Server.FlowRequestHeader result = new io.greptime.v1.flow.Server.FlowRequestHeader(this);
        int from_bitField0_ = bitField0_;
        result.tracingContext_ = internalGetTracingContext();
        result.tracingContext_.makeImmutable();
        if (queryContextBuilder_ == null) {
          result.queryContext_ = queryContext_;
        } else {
          result.queryContext_ = queryContextBuilder_.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 io.greptime.v1.flow.Server.FlowRequestHeader) {
          return mergeFrom((io.greptime.v1.flow.Server.FlowRequestHeader)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.FlowRequestHeader other) {
        if (other == io.greptime.v1.flow.Server.FlowRequestHeader.getDefaultInstance()) return this;
        internalGetMutableTracingContext().mergeFrom(
            other.internalGetTracingContext());
        if (other.hasQueryContext()) {
          mergeQueryContext(other.getQueryContext());
        }
        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 {
        io.greptime.v1.flow.Server.FlowRequestHeader parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.FlowRequestHeader) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.MapField<
          java.lang.String, java.lang.String> tracingContext_;
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetTracingContext() {
        if (tracingContext_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              TracingContextDefaultEntryHolder.defaultEntry);
        }
        return tracingContext_;
      }
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetMutableTracingContext() {
        onChanged();;
        if (tracingContext_ == null) {
          tracingContext_ = com.google.protobuf.MapField.newMapField(
              TracingContextDefaultEntryHolder.defaultEntry);
        }
        if (!tracingContext_.isMutable()) {
          tracingContext_ = tracingContext_.copy();
        }
        return tracingContext_;
      }

      public int getTracingContextCount() {
        return internalGetTracingContext().getMap().size();
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */

      @java.lang.Override
      public boolean containsTracingContext(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        return internalGetTracingContext().getMap().containsKey(key);
      }
      /**
       * Use {@link #getTracingContextMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String> getTracingContext() {
        return getTracingContextMap();
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */
      @java.lang.Override

      public java.util.Map<java.lang.String, java.lang.String> getTracingContextMap() {
        return internalGetTracingContext().getMap();
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */
      @java.lang.Override

      public java.lang.String getTracingContextOrDefault(
          java.lang.String key,
          java.lang.String defaultValue) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetTracingContext().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */
      @java.lang.Override

      public java.lang.String getTracingContextOrThrow(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetTracingContext().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }

      public Builder clearTracingContext() {
        internalGetMutableTracingContext().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */

      public Builder removeTracingContext(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        internalGetMutableTracingContext().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String>
      getMutableTracingContext() {
        return internalGetMutableTracingContext().getMutableMap();
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */
      public Builder putTracingContext(
          java.lang.String key,
          java.lang.String value) {
        if (key == null) { throw new NullPointerException("map key"); }
        if (value == null) {
  throw new NullPointerException("map value");
}

        internalGetMutableTracingContext().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <pre>
       * Encoded trace_id &amp; span_id, follow the w3c Trace Context
       * https://www.w3.org/TR/trace-context/#header-name
       * </pre>
       *
       * <code>map&lt;string, string&gt; tracing_context = 1;</code>
       */

      public Builder putAllTracingContext(
          java.util.Map<java.lang.String, java.lang.String> values) {
        internalGetMutableTracingContext().getMutableMap()
            .putAll(values);
        return this;
      }

      private io.greptime.v1.Common.QueryContext queryContext_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.QueryContext, io.greptime.v1.Common.QueryContext.Builder, io.greptime.v1.Common.QueryContextOrBuilder> queryContextBuilder_;
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       * @return Whether the queryContext field is set.
       */
      public boolean hasQueryContext() {
        return queryContextBuilder_ != null || queryContext_ != null;
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       * @return The queryContext.
       */
      public io.greptime.v1.Common.QueryContext getQueryContext() {
        if (queryContextBuilder_ == null) {
          return queryContext_ == null ? io.greptime.v1.Common.QueryContext.getDefaultInstance() : queryContext_;
        } else {
          return queryContextBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public Builder setQueryContext(io.greptime.v1.Common.QueryContext value) {
        if (queryContextBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          queryContext_ = value;
          onChanged();
        } else {
          queryContextBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public Builder setQueryContext(
          io.greptime.v1.Common.QueryContext.Builder builderForValue) {
        if (queryContextBuilder_ == null) {
          queryContext_ = builderForValue.build();
          onChanged();
        } else {
          queryContextBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public Builder mergeQueryContext(io.greptime.v1.Common.QueryContext value) {
        if (queryContextBuilder_ == null) {
          if (queryContext_ != null) {
            queryContext_ =
              io.greptime.v1.Common.QueryContext.newBuilder(queryContext_).mergeFrom(value).buildPartial();
          } else {
            queryContext_ = value;
          }
          onChanged();
        } else {
          queryContextBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public Builder clearQueryContext() {
        if (queryContextBuilder_ == null) {
          queryContext_ = null;
          onChanged();
        } else {
          queryContext_ = null;
          queryContextBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public io.greptime.v1.Common.QueryContext.Builder getQueryContextBuilder() {
        
        onChanged();
        return getQueryContextFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      public io.greptime.v1.Common.QueryContextOrBuilder getQueryContextOrBuilder() {
        if (queryContextBuilder_ != null) {
          return queryContextBuilder_.getMessageOrBuilder();
        } else {
          return queryContext_ == null ?
              io.greptime.v1.Common.QueryContext.getDefaultInstance() : queryContext_;
        }
      }
      /**
       * <pre>
       * The contextual information of the query
       * </pre>
       *
       * <code>.greptime.v1.QueryContext query_context = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.QueryContext, io.greptime.v1.Common.QueryContext.Builder, io.greptime.v1.Common.QueryContextOrBuilder> 
          getQueryContextFieldBuilder() {
        if (queryContextBuilder_ == null) {
          queryContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Common.QueryContext, io.greptime.v1.Common.QueryContext.Builder, io.greptime.v1.Common.QueryContextOrBuilder>(
                  getQueryContext(),
                  getParentForChildren(),
                  isClean());
          queryContext_ = null;
        }
        return queryContextBuilder_;
      }
      @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.flow.FlowRequestHeader)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.FlowRequestHeader)
    private static final io.greptime.v1.flow.Server.FlowRequestHeader DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.FlowRequestHeader();
    }

    public static io.greptime.v1.flow.Server.FlowRequestHeader getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.FlowRequestHeader getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface InsertRequestsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.InsertRequests)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    java.util.List<io.greptime.v1.flow.Server.InsertRequest> 
        getRequestsList();
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    io.greptime.v1.flow.Server.InsertRequest getRequests(int index);
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    int getRequestsCount();
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    java.util.List<? extends io.greptime.v1.flow.Server.InsertRequestOrBuilder> 
        getRequestsOrBuilderList();
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    io.greptime.v1.flow.Server.InsertRequestOrBuilder getRequestsOrBuilder(
        int index);
  }
  /**
   * Protobuf type {@code greptime.v1.flow.InsertRequests}
   */
  public static final class InsertRequests extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.InsertRequests)
      InsertRequestsOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InsertRequests.newBuilder() to construct.
    private InsertRequests(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InsertRequests() {
      requests_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InsertRequests(
        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)) {
                requests_ = new java.util.ArrayList<io.greptime.v1.flow.Server.InsertRequest>();
                mutable_bitField0_ |= 0x00000001;
              }
              requests_.add(
                  input.readMessage(io.greptime.v1.flow.Server.InsertRequest.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)) {
          requests_ = java.util.Collections.unmodifiableList(requests_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequests_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequests_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.InsertRequests.class, io.greptime.v1.flow.Server.InsertRequests.Builder.class);
    }

    public static final int REQUESTS_FIELD_NUMBER = 1;
    private java.util.List<io.greptime.v1.flow.Server.InsertRequest> requests_;
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    @java.lang.Override
    public java.util.List<io.greptime.v1.flow.Server.InsertRequest> getRequestsList() {
      return requests_;
    }
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.greptime.v1.flow.Server.InsertRequestOrBuilder> 
        getRequestsOrBuilderList() {
      return requests_;
    }
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    @java.lang.Override
    public int getRequestsCount() {
      return requests_.size();
    }
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.InsertRequest getRequests(int index) {
      return requests_.get(index);
    }
    /**
     * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.InsertRequestOrBuilder getRequestsOrBuilder(
        int index) {
      return requests_.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 < requests_.size(); i++) {
        output.writeMessage(1, requests_.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 < requests_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, requests_.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 io.greptime.v1.flow.Server.InsertRequests)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.InsertRequests other = (io.greptime.v1.flow.Server.InsertRequests) obj;

      if (!getRequestsList()
          .equals(other.getRequestsList())) 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 (getRequestsCount() > 0) {
        hash = (37 * hash) + REQUESTS_FIELD_NUMBER;
        hash = (53 * hash) + getRequestsList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequests parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequests 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 io.greptime.v1.flow.Server.InsertRequests parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequests 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 io.greptime.v1.flow.Server.InsertRequests parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequests 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(io.greptime.v1.flow.Server.InsertRequests prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.InsertRequests}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.InsertRequests)
        io.greptime.v1.flow.Server.InsertRequestsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequests_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequests_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.InsertRequests.class, io.greptime.v1.flow.Server.InsertRequests.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.InsertRequests.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequests_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequests getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.InsertRequests.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequests build() {
        io.greptime.v1.flow.Server.InsertRequests result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequests buildPartial() {
        io.greptime.v1.flow.Server.InsertRequests result = new io.greptime.v1.flow.Server.InsertRequests(this);
        int from_bitField0_ = bitField0_;
        if (requestsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            requests_ = java.util.Collections.unmodifiableList(requests_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.requests_ = requests_;
        } else {
          result.requests_ = requestsBuilder_.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 io.greptime.v1.flow.Server.InsertRequests) {
          return mergeFrom((io.greptime.v1.flow.Server.InsertRequests)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.InsertRequests other) {
        if (other == io.greptime.v1.flow.Server.InsertRequests.getDefaultInstance()) return this;
        if (requestsBuilder_ == null) {
          if (!other.requests_.isEmpty()) {
            if (requests_.isEmpty()) {
              requests_ = other.requests_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureRequestsIsMutable();
              requests_.addAll(other.requests_);
            }
            onChanged();
          }
        } else {
          if (!other.requests_.isEmpty()) {
            if (requestsBuilder_.isEmpty()) {
              requestsBuilder_.dispose();
              requestsBuilder_ = null;
              requests_ = other.requests_;
              bitField0_ = (bitField0_ & ~0x00000001);
              requestsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getRequestsFieldBuilder() : null;
            } else {
              requestsBuilder_.addAllMessages(other.requests_);
            }
          }
        }
        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 {
        io.greptime.v1.flow.Server.InsertRequests parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.InsertRequests) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<io.greptime.v1.flow.Server.InsertRequest> requests_ =
        java.util.Collections.emptyList();
      private void ensureRequestsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          requests_ = new java.util.ArrayList<io.greptime.v1.flow.Server.InsertRequest>(requests_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.flow.Server.InsertRequest, io.greptime.v1.flow.Server.InsertRequest.Builder, io.greptime.v1.flow.Server.InsertRequestOrBuilder> requestsBuilder_;

      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public java.util.List<io.greptime.v1.flow.Server.InsertRequest> getRequestsList() {
        if (requestsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(requests_);
        } else {
          return requestsBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public int getRequestsCount() {
        if (requestsBuilder_ == null) {
          return requests_.size();
        } else {
          return requestsBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public io.greptime.v1.flow.Server.InsertRequest getRequests(int index) {
        if (requestsBuilder_ == null) {
          return requests_.get(index);
        } else {
          return requestsBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder setRequests(
          int index, io.greptime.v1.flow.Server.InsertRequest value) {
        if (requestsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRequestsIsMutable();
          requests_.set(index, value);
          onChanged();
        } else {
          requestsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder setRequests(
          int index, io.greptime.v1.flow.Server.InsertRequest.Builder builderForValue) {
        if (requestsBuilder_ == null) {
          ensureRequestsIsMutable();
          requests_.set(index, builderForValue.build());
          onChanged();
        } else {
          requestsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder addRequests(io.greptime.v1.flow.Server.InsertRequest value) {
        if (requestsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRequestsIsMutable();
          requests_.add(value);
          onChanged();
        } else {
          requestsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder addRequests(
          int index, io.greptime.v1.flow.Server.InsertRequest value) {
        if (requestsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRequestsIsMutable();
          requests_.add(index, value);
          onChanged();
        } else {
          requestsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder addRequests(
          io.greptime.v1.flow.Server.InsertRequest.Builder builderForValue) {
        if (requestsBuilder_ == null) {
          ensureRequestsIsMutable();
          requests_.add(builderForValue.build());
          onChanged();
        } else {
          requestsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder addRequests(
          int index, io.greptime.v1.flow.Server.InsertRequest.Builder builderForValue) {
        if (requestsBuilder_ == null) {
          ensureRequestsIsMutable();
          requests_.add(index, builderForValue.build());
          onChanged();
        } else {
          requestsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder addAllRequests(
          java.lang.Iterable<? extends io.greptime.v1.flow.Server.InsertRequest> values) {
        if (requestsBuilder_ == null) {
          ensureRequestsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, requests_);
          onChanged();
        } else {
          requestsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder clearRequests() {
        if (requestsBuilder_ == null) {
          requests_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          requestsBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public Builder removeRequests(int index) {
        if (requestsBuilder_ == null) {
          ensureRequestsIsMutable();
          requests_.remove(index);
          onChanged();
        } else {
          requestsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public io.greptime.v1.flow.Server.InsertRequest.Builder getRequestsBuilder(
          int index) {
        return getRequestsFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public io.greptime.v1.flow.Server.InsertRequestOrBuilder getRequestsOrBuilder(
          int index) {
        if (requestsBuilder_ == null) {
          return requests_.get(index);  } else {
          return requestsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public java.util.List<? extends io.greptime.v1.flow.Server.InsertRequestOrBuilder> 
           getRequestsOrBuilderList() {
        if (requestsBuilder_ != null) {
          return requestsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(requests_);
        }
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public io.greptime.v1.flow.Server.InsertRequest.Builder addRequestsBuilder() {
        return getRequestsFieldBuilder().addBuilder(
            io.greptime.v1.flow.Server.InsertRequest.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public io.greptime.v1.flow.Server.InsertRequest.Builder addRequestsBuilder(
          int index) {
        return getRequestsFieldBuilder().addBuilder(
            index, io.greptime.v1.flow.Server.InsertRequest.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.flow.InsertRequest requests = 1;</code>
       */
      public java.util.List<io.greptime.v1.flow.Server.InsertRequest.Builder> 
           getRequestsBuilderList() {
        return getRequestsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.flow.Server.InsertRequest, io.greptime.v1.flow.Server.InsertRequest.Builder, io.greptime.v1.flow.Server.InsertRequestOrBuilder> 
          getRequestsFieldBuilder() {
        if (requestsBuilder_ == null) {
          requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              io.greptime.v1.flow.Server.InsertRequest, io.greptime.v1.flow.Server.InsertRequest.Builder, io.greptime.v1.flow.Server.InsertRequestOrBuilder>(
                  requests_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          requests_ = null;
        }
        return requestsBuilder_;
      }
      @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.flow.InsertRequests)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.InsertRequests)
    private static final io.greptime.v1.flow.Server.InsertRequests DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.InsertRequests();
    }

    public static io.greptime.v1.flow.Server.InsertRequests getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.InsertRequests getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface InsertRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.InsertRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    long getRegionId();

    /**
     * <code>.greptime.v1.Rows rows = 2;</code>
     * @return Whether the rows field is set.
     */
    boolean hasRows();
    /**
     * <code>.greptime.v1.Rows rows = 2;</code>
     * @return The rows.
     */
    io.greptime.v1.RowData.Rows getRows();
    /**
     * <code>.greptime.v1.Rows rows = 2;</code>
     */
    io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.flow.InsertRequest}
   */
  public static final class InsertRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.InsertRequest)
      InsertRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InsertRequest.newBuilder() to construct.
    private InsertRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InsertRequest() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InsertRequest(
        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: {

              regionId_ = input.readUInt64();
              break;
            }
            case 18: {
              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;
            }
            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 io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.InsertRequest.class, io.greptime.v1.flow.Server.InsertRequest.Builder.class);
    }

    public static final int REGION_ID_FIELD_NUMBER = 1;
    private long regionId_;
    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    @java.lang.Override
    public long getRegionId() {
      return regionId_;
    }

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

    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 (regionId_ != 0L) {
        output.writeUInt64(1, regionId_);
      }
      if (rows_ != null) {
        output.writeMessage(2, getRows());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (regionId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, regionId_);
      }
      if (rows_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getRows());
      }
      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 io.greptime.v1.flow.Server.InsertRequest)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.InsertRequest other = (io.greptime.v1.flow.Server.InsertRequest) obj;

      if (getRegionId()
          != other.getRegionId()) return false;
      if (hasRows() != other.hasRows()) return false;
      if (hasRows()) {
        if (!getRows()
            .equals(other.getRows())) 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) + REGION_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getRegionId());
      if (hasRows()) {
        hash = (37 * hash) + ROWS_FIELD_NUMBER;
        hash = (53 * hash) + getRows().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.InsertRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequest 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 io.greptime.v1.flow.Server.InsertRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequest 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 io.greptime.v1.flow.Server.InsertRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.InsertRequest 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(io.greptime.v1.flow.Server.InsertRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.InsertRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.InsertRequest)
        io.greptime.v1.flow.Server.InsertRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.InsertRequest.class, io.greptime.v1.flow.Server.InsertRequest.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.InsertRequest.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();
        regionId_ = 0L;

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

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_InsertRequest_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequest getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.InsertRequest.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequest build() {
        io.greptime.v1.flow.Server.InsertRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.InsertRequest buildPartial() {
        io.greptime.v1.flow.Server.InsertRequest result = new io.greptime.v1.flow.Server.InsertRequest(this);
        result.regionId_ = regionId_;
        if (rowsBuilder_ == null) {
          result.rows_ = rows_;
        } else {
          result.rows_ = rowsBuilder_.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 io.greptime.v1.flow.Server.InsertRequest) {
          return mergeFrom((io.greptime.v1.flow.Server.InsertRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.InsertRequest other) {
        if (other == io.greptime.v1.flow.Server.InsertRequest.getDefaultInstance()) return this;
        if (other.getRegionId() != 0L) {
          setRegionId(other.getRegionId());
        }
        if (other.hasRows()) {
          mergeRows(other.getRows());
        }
        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 {
        io.greptime.v1.flow.Server.InsertRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.InsertRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private long regionId_ ;
      /**
       * <code>uint64 region_id = 1;</code>
       * @return The regionId.
       */
      @java.lang.Override
      public long getRegionId() {
        return regionId_;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @param value The regionId to set.
       * @return This builder for chaining.
       */
      public Builder setRegionId(long value) {
        
        regionId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearRegionId() {
        
        regionId_ = 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_;
      /**
       * <code>.greptime.v1.Rows rows = 2;</code>
       * @return Whether the rows field is set.
       */
      public boolean hasRows() {
        return rowsBuilder_ != null || rows_ != null;
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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();
        }
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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;
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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;
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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;
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</code>
       */
      public Builder clearRows() {
        if (rowsBuilder_ == null) {
          rows_ = null;
          onChanged();
        } else {
          rows_ = null;
          rowsBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</code>
       */
      public io.greptime.v1.RowData.Rows.Builder getRowsBuilder() {
        
        onChanged();
        return getRowsFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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_;
        }
      }
      /**
       * <code>.greptime.v1.Rows rows = 2;</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_;
      }
      @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.flow.InsertRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.InsertRequest)
    private static final io.greptime.v1.flow.Server.InsertRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.InsertRequest();
    }

    public static io.greptime.v1.flow.Server.InsertRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.InsertRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface FlowRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.FlowRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     * @return The header.
     */
    io.greptime.v1.flow.Server.FlowRequestHeader getHeader();
    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     */
    io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     * @return Whether the create field is set.
     */
    boolean hasCreate();
    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     * @return The create.
     */
    io.greptime.v1.flow.Server.CreateRequest getCreate();
    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     */
    io.greptime.v1.flow.Server.CreateRequestOrBuilder getCreateOrBuilder();

    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     * @return Whether the drop field is set.
     */
    boolean hasDrop();
    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     * @return The drop.
     */
    io.greptime.v1.flow.Server.DropRequest getDrop();
    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     */
    io.greptime.v1.flow.Server.DropRequestOrBuilder getDropOrBuilder();

    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     * @return Whether the flush field is set.
     */
    boolean hasFlush();
    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     * @return The flush.
     */
    io.greptime.v1.flow.Server.FlushFlow getFlush();
    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     */
    io.greptime.v1.flow.Server.FlushFlowOrBuilder getFlushOrBuilder();

    public io.greptime.v1.flow.Server.FlowRequest.BodyCase getBodyCase();
  }
  /**
   * Protobuf type {@code greptime.v1.flow.FlowRequest}
   */
  public static final class FlowRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.FlowRequest)
      FlowRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FlowRequest.newBuilder() to construct.
    private FlowRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FlowRequest() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FlowRequest(
        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 10: {
              io.greptime.v1.flow.Server.CreateRequest.Builder subBuilder = null;
              if (bodyCase_ == 1) {
                subBuilder = ((io.greptime.v1.flow.Server.CreateRequest) body_).toBuilder();
              }
              body_ =
                  input.readMessage(io.greptime.v1.flow.Server.CreateRequest.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((io.greptime.v1.flow.Server.CreateRequest) body_);
                body_ = subBuilder.buildPartial();
              }
              bodyCase_ = 1;
              break;
            }
            case 18: {
              io.greptime.v1.flow.Server.DropRequest.Builder subBuilder = null;
              if (bodyCase_ == 2) {
                subBuilder = ((io.greptime.v1.flow.Server.DropRequest) body_).toBuilder();
              }
              body_ =
                  input.readMessage(io.greptime.v1.flow.Server.DropRequest.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((io.greptime.v1.flow.Server.DropRequest) body_);
                body_ = subBuilder.buildPartial();
              }
              bodyCase_ = 2;
              break;
            }
            case 26: {
              io.greptime.v1.flow.Server.FlushFlow.Builder subBuilder = null;
              if (bodyCase_ == 3) {
                subBuilder = ((io.greptime.v1.flow.Server.FlushFlow) body_).toBuilder();
              }
              body_ =
                  input.readMessage(io.greptime.v1.flow.Server.FlushFlow.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((io.greptime.v1.flow.Server.FlushFlow) body_);
                body_ = subBuilder.buildPartial();
              }
              bodyCase_ = 3;
              break;
            }
            case 514: {
              io.greptime.v1.flow.Server.FlowRequestHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(io.greptime.v1.flow.Server.FlowRequestHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = 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 io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.FlowRequest.class, io.greptime.v1.flow.Server.FlowRequest.Builder.class);
    }

    private int bodyCase_ = 0;
    private java.lang.Object body_;
    public enum BodyCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      CREATE(1),
      DROP(2),
      FLUSH(3),
      BODY_NOT_SET(0);
      private final int value;
      private BodyCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static BodyCase valueOf(int value) {
        return forNumber(value);
      }

      public static BodyCase forNumber(int value) {
        switch (value) {
          case 1: return CREATE;
          case 2: return DROP;
          case 3: return FLUSH;
          case 0: return BODY_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public BodyCase
    getBodyCase() {
      return BodyCase.forNumber(
          bodyCase_);
    }

    public static final int HEADER_FIELD_NUMBER = 64;
    private io.greptime.v1.flow.Server.FlowRequestHeader header_;
    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     * @return The header.
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.FlowRequestHeader getHeader() {
      return header_ == null ? io.greptime.v1.flow.Server.FlowRequestHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int CREATE_FIELD_NUMBER = 1;
    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     * @return Whether the create field is set.
     */
    @java.lang.Override
    public boolean hasCreate() {
      return bodyCase_ == 1;
    }
    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     * @return The create.
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.CreateRequest getCreate() {
      if (bodyCase_ == 1) {
         return (io.greptime.v1.flow.Server.CreateRequest) body_;
      }
      return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
    }
    /**
     * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.CreateRequestOrBuilder getCreateOrBuilder() {
      if (bodyCase_ == 1) {
         return (io.greptime.v1.flow.Server.CreateRequest) body_;
      }
      return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
    }

    public static final int DROP_FIELD_NUMBER = 2;
    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     * @return Whether the drop field is set.
     */
    @java.lang.Override
    public boolean hasDrop() {
      return bodyCase_ == 2;
    }
    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     * @return The drop.
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.DropRequest getDrop() {
      if (bodyCase_ == 2) {
         return (io.greptime.v1.flow.Server.DropRequest) body_;
      }
      return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
    }
    /**
     * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.DropRequestOrBuilder getDropOrBuilder() {
      if (bodyCase_ == 2) {
         return (io.greptime.v1.flow.Server.DropRequest) body_;
      }
      return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
    }

    public static final int FLUSH_FIELD_NUMBER = 3;
    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     * @return Whether the flush field is set.
     */
    @java.lang.Override
    public boolean hasFlush() {
      return bodyCase_ == 3;
    }
    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     * @return The flush.
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.FlushFlow getFlush() {
      if (bodyCase_ == 3) {
         return (io.greptime.v1.flow.Server.FlushFlow) body_;
      }
      return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
    }
    /**
     * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.flow.Server.FlushFlowOrBuilder getFlushOrBuilder() {
      if (bodyCase_ == 3) {
         return (io.greptime.v1.flow.Server.FlushFlow) body_;
      }
      return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
    }

    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 (bodyCase_ == 1) {
        output.writeMessage(1, (io.greptime.v1.flow.Server.CreateRequest) body_);
      }
      if (bodyCase_ == 2) {
        output.writeMessage(2, (io.greptime.v1.flow.Server.DropRequest) body_);
      }
      if (bodyCase_ == 3) {
        output.writeMessage(3, (io.greptime.v1.flow.Server.FlushFlow) body_);
      }
      if (header_ != null) {
        output.writeMessage(64, getHeader());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (bodyCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, (io.greptime.v1.flow.Server.CreateRequest) body_);
      }
      if (bodyCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (io.greptime.v1.flow.Server.DropRequest) body_);
      }
      if (bodyCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (io.greptime.v1.flow.Server.FlushFlow) body_);
      }
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(64, getHeader());
      }
      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 io.greptime.v1.flow.Server.FlowRequest)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.FlowRequest other = (io.greptime.v1.flow.Server.FlowRequest) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (!getBodyCase().equals(other.getBodyCase())) return false;
      switch (bodyCase_) {
        case 1:
          if (!getCreate()
              .equals(other.getCreate())) return false;
          break;
        case 2:
          if (!getDrop()
              .equals(other.getDrop())) return false;
          break;
        case 3:
          if (!getFlush()
              .equals(other.getFlush())) return false;
          break;
        case 0:
        default:
      }
      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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      switch (bodyCase_) {
        case 1:
          hash = (37 * hash) + CREATE_FIELD_NUMBER;
          hash = (53 * hash) + getCreate().hashCode();
          break;
        case 2:
          hash = (37 * hash) + DROP_FIELD_NUMBER;
          hash = (53 * hash) + getDrop().hashCode();
          break;
        case 3:
          hash = (37 * hash) + FLUSH_FIELD_NUMBER;
          hash = (53 * hash) + getFlush().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequest 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 io.greptime.v1.flow.Server.FlowRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequest 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 io.greptime.v1.flow.Server.FlowRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowRequest 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(io.greptime.v1.flow.Server.FlowRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.FlowRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.FlowRequest)
        io.greptime.v1.flow.Server.FlowRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.FlowRequest.class, io.greptime.v1.flow.Server.FlowRequest.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.FlowRequest.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();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        bodyCase_ = 0;
        body_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowRequest_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequest getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.FlowRequest.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequest build() {
        io.greptime.v1.flow.Server.FlowRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowRequest buildPartial() {
        io.greptime.v1.flow.Server.FlowRequest result = new io.greptime.v1.flow.Server.FlowRequest(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (bodyCase_ == 1) {
          if (createBuilder_ == null) {
            result.body_ = body_;
          } else {
            result.body_ = createBuilder_.build();
          }
        }
        if (bodyCase_ == 2) {
          if (dropBuilder_ == null) {
            result.body_ = body_;
          } else {
            result.body_ = dropBuilder_.build();
          }
        }
        if (bodyCase_ == 3) {
          if (flushBuilder_ == null) {
            result.body_ = body_;
          } else {
            result.body_ = flushBuilder_.build();
          }
        }
        result.bodyCase_ = bodyCase_;
        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 io.greptime.v1.flow.Server.FlowRequest) {
          return mergeFrom((io.greptime.v1.flow.Server.FlowRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.FlowRequest other) {
        if (other == io.greptime.v1.flow.Server.FlowRequest.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        switch (other.getBodyCase()) {
          case CREATE: {
            mergeCreate(other.getCreate());
            break;
          }
          case DROP: {
            mergeDrop(other.getDrop());
            break;
          }
          case FLUSH: {
            mergeFlush(other.getFlush());
            break;
          }
          case BODY_NOT_SET: {
            break;
          }
        }
        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 {
        io.greptime.v1.flow.Server.FlowRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.FlowRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bodyCase_ = 0;
      private java.lang.Object body_;
      public BodyCase
          getBodyCase() {
        return BodyCase.forNumber(
            bodyCase_);
      }

      public Builder clearBody() {
        bodyCase_ = 0;
        body_ = null;
        onChanged();
        return this;
      }


      private io.greptime.v1.flow.Server.FlowRequestHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.FlowRequestHeader, io.greptime.v1.flow.Server.FlowRequestHeader.Builder, io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       * @return The header.
       */
      public io.greptime.v1.flow.Server.FlowRequestHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? io.greptime.v1.flow.Server.FlowRequestHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public Builder setHeader(io.greptime.v1.flow.Server.FlowRequestHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public Builder setHeader(
          io.greptime.v1.flow.Server.FlowRequestHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public Builder mergeHeader(io.greptime.v1.flow.Server.FlowRequestHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              io.greptime.v1.flow.Server.FlowRequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public io.greptime.v1.flow.Server.FlowRequestHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      public io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              io.greptime.v1.flow.Server.FlowRequestHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.flow.FlowRequestHeader header = 64;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.FlowRequestHeader, io.greptime.v1.flow.Server.FlowRequestHeader.Builder, io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.flow.Server.FlowRequestHeader, io.greptime.v1.flow.Server.FlowRequestHeader.Builder, io.greptime.v1.flow.Server.FlowRequestHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.CreateRequest, io.greptime.v1.flow.Server.CreateRequest.Builder, io.greptime.v1.flow.Server.CreateRequestOrBuilder> createBuilder_;
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       * @return Whether the create field is set.
       */
      @java.lang.Override
      public boolean hasCreate() {
        return bodyCase_ == 1;
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       * @return The create.
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.CreateRequest getCreate() {
        if (createBuilder_ == null) {
          if (bodyCase_ == 1) {
            return (io.greptime.v1.flow.Server.CreateRequest) body_;
          }
          return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
        } else {
          if (bodyCase_ == 1) {
            return createBuilder_.getMessage();
          }
          return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      public Builder setCreate(io.greptime.v1.flow.Server.CreateRequest value) {
        if (createBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          body_ = value;
          onChanged();
        } else {
          createBuilder_.setMessage(value);
        }
        bodyCase_ = 1;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      public Builder setCreate(
          io.greptime.v1.flow.Server.CreateRequest.Builder builderForValue) {
        if (createBuilder_ == null) {
          body_ = builderForValue.build();
          onChanged();
        } else {
          createBuilder_.setMessage(builderForValue.build());
        }
        bodyCase_ = 1;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      public Builder mergeCreate(io.greptime.v1.flow.Server.CreateRequest value) {
        if (createBuilder_ == null) {
          if (bodyCase_ == 1 &&
              body_ != io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance()) {
            body_ = io.greptime.v1.flow.Server.CreateRequest.newBuilder((io.greptime.v1.flow.Server.CreateRequest) body_)
                .mergeFrom(value).buildPartial();
          } else {
            body_ = value;
          }
          onChanged();
        } else {
          if (bodyCase_ == 1) {
            createBuilder_.mergeFrom(value);
          } else {
            createBuilder_.setMessage(value);
          }
        }
        bodyCase_ = 1;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      public Builder clearCreate() {
        if (createBuilder_ == null) {
          if (bodyCase_ == 1) {
            bodyCase_ = 0;
            body_ = null;
            onChanged();
          }
        } else {
          if (bodyCase_ == 1) {
            bodyCase_ = 0;
            body_ = null;
          }
          createBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      public io.greptime.v1.flow.Server.CreateRequest.Builder getCreateBuilder() {
        return getCreateFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.CreateRequestOrBuilder getCreateOrBuilder() {
        if ((bodyCase_ == 1) && (createBuilder_ != null)) {
          return createBuilder_.getMessageOrBuilder();
        } else {
          if (bodyCase_ == 1) {
            return (io.greptime.v1.flow.Server.CreateRequest) body_;
          }
          return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.CreateRequest create = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.CreateRequest, io.greptime.v1.flow.Server.CreateRequest.Builder, io.greptime.v1.flow.Server.CreateRequestOrBuilder> 
          getCreateFieldBuilder() {
        if (createBuilder_ == null) {
          if (!(bodyCase_ == 1)) {
            body_ = io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
          }
          createBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.flow.Server.CreateRequest, io.greptime.v1.flow.Server.CreateRequest.Builder, io.greptime.v1.flow.Server.CreateRequestOrBuilder>(
                  (io.greptime.v1.flow.Server.CreateRequest) body_,
                  getParentForChildren(),
                  isClean());
          body_ = null;
        }
        bodyCase_ = 1;
        onChanged();;
        return createBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.DropRequest, io.greptime.v1.flow.Server.DropRequest.Builder, io.greptime.v1.flow.Server.DropRequestOrBuilder> dropBuilder_;
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       * @return Whether the drop field is set.
       */
      @java.lang.Override
      public boolean hasDrop() {
        return bodyCase_ == 2;
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       * @return The drop.
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.DropRequest getDrop() {
        if (dropBuilder_ == null) {
          if (bodyCase_ == 2) {
            return (io.greptime.v1.flow.Server.DropRequest) body_;
          }
          return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
        } else {
          if (bodyCase_ == 2) {
            return dropBuilder_.getMessage();
          }
          return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      public Builder setDrop(io.greptime.v1.flow.Server.DropRequest value) {
        if (dropBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          body_ = value;
          onChanged();
        } else {
          dropBuilder_.setMessage(value);
        }
        bodyCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      public Builder setDrop(
          io.greptime.v1.flow.Server.DropRequest.Builder builderForValue) {
        if (dropBuilder_ == null) {
          body_ = builderForValue.build();
          onChanged();
        } else {
          dropBuilder_.setMessage(builderForValue.build());
        }
        bodyCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      public Builder mergeDrop(io.greptime.v1.flow.Server.DropRequest value) {
        if (dropBuilder_ == null) {
          if (bodyCase_ == 2 &&
              body_ != io.greptime.v1.flow.Server.DropRequest.getDefaultInstance()) {
            body_ = io.greptime.v1.flow.Server.DropRequest.newBuilder((io.greptime.v1.flow.Server.DropRequest) body_)
                .mergeFrom(value).buildPartial();
          } else {
            body_ = value;
          }
          onChanged();
        } else {
          if (bodyCase_ == 2) {
            dropBuilder_.mergeFrom(value);
          } else {
            dropBuilder_.setMessage(value);
          }
        }
        bodyCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      public Builder clearDrop() {
        if (dropBuilder_ == null) {
          if (bodyCase_ == 2) {
            bodyCase_ = 0;
            body_ = null;
            onChanged();
          }
        } else {
          if (bodyCase_ == 2) {
            bodyCase_ = 0;
            body_ = null;
          }
          dropBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      public io.greptime.v1.flow.Server.DropRequest.Builder getDropBuilder() {
        return getDropFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.DropRequestOrBuilder getDropOrBuilder() {
        if ((bodyCase_ == 2) && (dropBuilder_ != null)) {
          return dropBuilder_.getMessageOrBuilder();
        } else {
          if (bodyCase_ == 2) {
            return (io.greptime.v1.flow.Server.DropRequest) body_;
          }
          return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.DropRequest drop = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.DropRequest, io.greptime.v1.flow.Server.DropRequest.Builder, io.greptime.v1.flow.Server.DropRequestOrBuilder> 
          getDropFieldBuilder() {
        if (dropBuilder_ == null) {
          if (!(bodyCase_ == 2)) {
            body_ = io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
          }
          dropBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.flow.Server.DropRequest, io.greptime.v1.flow.Server.DropRequest.Builder, io.greptime.v1.flow.Server.DropRequestOrBuilder>(
                  (io.greptime.v1.flow.Server.DropRequest) body_,
                  getParentForChildren(),
                  isClean());
          body_ = null;
        }
        bodyCase_ = 2;
        onChanged();;
        return dropBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.FlushFlow, io.greptime.v1.flow.Server.FlushFlow.Builder, io.greptime.v1.flow.Server.FlushFlowOrBuilder> flushBuilder_;
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       * @return Whether the flush field is set.
       */
      @java.lang.Override
      public boolean hasFlush() {
        return bodyCase_ == 3;
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       * @return The flush.
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.FlushFlow getFlush() {
        if (flushBuilder_ == null) {
          if (bodyCase_ == 3) {
            return (io.greptime.v1.flow.Server.FlushFlow) body_;
          }
          return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
        } else {
          if (bodyCase_ == 3) {
            return flushBuilder_.getMessage();
          }
          return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      public Builder setFlush(io.greptime.v1.flow.Server.FlushFlow value) {
        if (flushBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          body_ = value;
          onChanged();
        } else {
          flushBuilder_.setMessage(value);
        }
        bodyCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      public Builder setFlush(
          io.greptime.v1.flow.Server.FlushFlow.Builder builderForValue) {
        if (flushBuilder_ == null) {
          body_ = builderForValue.build();
          onChanged();
        } else {
          flushBuilder_.setMessage(builderForValue.build());
        }
        bodyCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      public Builder mergeFlush(io.greptime.v1.flow.Server.FlushFlow value) {
        if (flushBuilder_ == null) {
          if (bodyCase_ == 3 &&
              body_ != io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance()) {
            body_ = io.greptime.v1.flow.Server.FlushFlow.newBuilder((io.greptime.v1.flow.Server.FlushFlow) body_)
                .mergeFrom(value).buildPartial();
          } else {
            body_ = value;
          }
          onChanged();
        } else {
          if (bodyCase_ == 3) {
            flushBuilder_.mergeFrom(value);
          } else {
            flushBuilder_.setMessage(value);
          }
        }
        bodyCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      public Builder clearFlush() {
        if (flushBuilder_ == null) {
          if (bodyCase_ == 3) {
            bodyCase_ = 0;
            body_ = null;
            onChanged();
          }
        } else {
          if (bodyCase_ == 3) {
            bodyCase_ = 0;
            body_ = null;
          }
          flushBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      public io.greptime.v1.flow.Server.FlushFlow.Builder getFlushBuilder() {
        return getFlushFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      @java.lang.Override
      public io.greptime.v1.flow.Server.FlushFlowOrBuilder getFlushOrBuilder() {
        if ((bodyCase_ == 3) && (flushBuilder_ != null)) {
          return flushBuilder_.getMessageOrBuilder();
        } else {
          if (bodyCase_ == 3) {
            return (io.greptime.v1.flow.Server.FlushFlow) body_;
          }
          return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.flow.FlushFlow flush = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.flow.Server.FlushFlow, io.greptime.v1.flow.Server.FlushFlow.Builder, io.greptime.v1.flow.Server.FlushFlowOrBuilder> 
          getFlushFieldBuilder() {
        if (flushBuilder_ == null) {
          if (!(bodyCase_ == 3)) {
            body_ = io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
          }
          flushBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.flow.Server.FlushFlow, io.greptime.v1.flow.Server.FlushFlow.Builder, io.greptime.v1.flow.Server.FlushFlowOrBuilder>(
                  (io.greptime.v1.flow.Server.FlushFlow) body_,
                  getParentForChildren(),
                  isClean());
          body_ = null;
        }
        bodyCase_ = 3;
        onChanged();;
        return flushBuilder_;
      }
      @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.flow.FlowRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.FlowRequest)
    private static final io.greptime.v1.flow.Server.FlowRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.FlowRequest();
    }

    public static io.greptime.v1.flow.Server.FlowRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.FlowRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface FlowResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.FlowResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     * @return The header.
     */
    io.greptime.v1.Common.ResponseHeader getHeader();
    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     */
    io.greptime.v1.Common.ResponseHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <code>uint64 affected_rows = 2;</code>
     * @return The affectedRows.
     */
    long getAffectedRows();

    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    java.util.List<io.greptime.v1.Ddl.FlowId> 
        getAffectedFlowsList();
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    io.greptime.v1.Ddl.FlowId getAffectedFlows(int index);
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    int getAffectedFlowsCount();
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    java.util.List<? extends io.greptime.v1.Ddl.FlowIdOrBuilder> 
        getAffectedFlowsOrBuilderList();
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    io.greptime.v1.Ddl.FlowIdOrBuilder getAffectedFlowsOrBuilder(
        int index);

    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    int getExtensionsCount();
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    boolean containsExtensions(
        java.lang.String key);
    /**
     * Use {@link #getExtensionsMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, com.google.protobuf.ByteString>
    getExtensions();
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    java.util.Map<java.lang.String, com.google.protobuf.ByteString>
    getExtensionsMap();
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */

    /* nullable */
com.google.protobuf.ByteString getExtensionsOrDefault(
        java.lang.String key,
        /* nullable */
com.google.protobuf.ByteString defaultValue);
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */

    com.google.protobuf.ByteString getExtensionsOrThrow(
        java.lang.String key);
  }
  /**
   * Protobuf type {@code greptime.v1.flow.FlowResponse}
   */
  public static final class FlowResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.FlowResponse)
      FlowResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FlowResponse.newBuilder() to construct.
    private FlowResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FlowResponse() {
      affectedFlows_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FlowResponse(
        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: {
              io.greptime.v1.Common.ResponseHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(io.greptime.v1.Common.ResponseHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              break;
            }
            case 16: {

              affectedRows_ = input.readUInt64();
              break;
            }
            case 26: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                affectedFlows_ = new java.util.ArrayList<io.greptime.v1.Ddl.FlowId>();
                mutable_bitField0_ |= 0x00000001;
              }
              affectedFlows_.add(
                  input.readMessage(io.greptime.v1.Ddl.FlowId.parser(), extensionRegistry));
              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                extensions_ = com.google.protobuf.MapField.newMapField(
                    ExtensionsDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000002;
              }
              com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.ByteString>
              extensions__ = input.readMessage(
                  ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              extensions_.getMutableMap().put(
                  extensions__.getKey(), extensions__.getValue());
              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)) {
          affectedFlows_ = java.util.Collections.unmodifiableList(affectedFlows_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 4:
          return internalGetExtensions();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.FlowResponse.class, io.greptime.v1.flow.Server.FlowResponse.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private io.greptime.v1.Common.ResponseHeader header_;
    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     * @return The header.
     */
    @java.lang.Override
    public io.greptime.v1.Common.ResponseHeader getHeader() {
      return header_ == null ? io.greptime.v1.Common.ResponseHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.ResponseHeader header = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int AFFECTED_ROWS_FIELD_NUMBER = 2;
    private long affectedRows_;
    /**
     * <code>uint64 affected_rows = 2;</code>
     * @return The affectedRows.
     */
    @java.lang.Override
    public long getAffectedRows() {
      return affectedRows_;
    }

    public static final int AFFECTED_FLOWS_FIELD_NUMBER = 3;
    private java.util.List<io.greptime.v1.Ddl.FlowId> affectedFlows_;
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    @java.lang.Override
    public java.util.List<io.greptime.v1.Ddl.FlowId> getAffectedFlowsList() {
      return affectedFlows_;
    }
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.greptime.v1.Ddl.FlowIdOrBuilder> 
        getAffectedFlowsOrBuilderList() {
      return affectedFlows_;
    }
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    @java.lang.Override
    public int getAffectedFlowsCount() {
      return affectedFlows_.size();
    }
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowId getAffectedFlows(int index) {
      return affectedFlows_.get(index);
    }
    /**
     * <pre>
     * affected flow ids
     * </pre>
     *
     * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowIdOrBuilder getAffectedFlowsOrBuilder(
        int index) {
      return affectedFlows_.get(index);
    }

    public static final int EXTENSIONS_FIELD_NUMBER = 4;
    private static final class ExtensionsDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, com.google.protobuf.ByteString> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, com.google.protobuf.ByteString>newDefaultInstance(
                  io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.BYTES,
                  com.google.protobuf.ByteString.EMPTY);
    }
    private com.google.protobuf.MapField<
        java.lang.String, com.google.protobuf.ByteString> extensions_;
    private com.google.protobuf.MapField<java.lang.String, com.google.protobuf.ByteString>
    internalGetExtensions() {
      if (extensions_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ExtensionsDefaultEntryHolder.defaultEntry);
      }
      return extensions_;
    }

    public int getExtensionsCount() {
      return internalGetExtensions().getMap().size();
    }
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */

    @java.lang.Override
    public boolean containsExtensions(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetExtensions().getMap().containsKey(key);
    }
    /**
     * Use {@link #getExtensionsMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.protobuf.ByteString> getExtensions() {
      return getExtensionsMap();
    }
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    @java.lang.Override

    public java.util.Map<java.lang.String, com.google.protobuf.ByteString> getExtensionsMap() {
      return internalGetExtensions().getMap();
    }
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    @java.lang.Override

    public com.google.protobuf.ByteString getExtensionsOrDefault(
        java.lang.String key,
        com.google.protobuf.ByteString defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, com.google.protobuf.ByteString> map =
          internalGetExtensions().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, bytes&gt; extensions = 4;</code>
     */
    @java.lang.Override

    public com.google.protobuf.ByteString getExtensionsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, com.google.protobuf.ByteString> map =
          internalGetExtensions().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    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 (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      if (affectedRows_ != 0L) {
        output.writeUInt64(2, affectedRows_);
      }
      for (int i = 0; i < affectedFlows_.size(); i++) {
        output.writeMessage(3, affectedFlows_.get(i));
      }
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetExtensions(),
          ExtensionsDefaultEntryHolder.defaultEntry,
          4);
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      if (affectedRows_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, affectedRows_);
      }
      for (int i = 0; i < affectedFlows_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, affectedFlows_.get(i));
      }
      for (java.util.Map.Entry<java.lang.String, com.google.protobuf.ByteString> entry
           : internalGetExtensions().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.ByteString>
        extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(4, extensions__);
      }
      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 io.greptime.v1.flow.Server.FlowResponse)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.FlowResponse other = (io.greptime.v1.flow.Server.FlowResponse) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (getAffectedRows()
          != other.getAffectedRows()) return false;
      if (!getAffectedFlowsList()
          .equals(other.getAffectedFlowsList())) return false;
      if (!internalGetExtensions().equals(
          other.internalGetExtensions())) 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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      hash = (37 * hash) + AFFECTED_ROWS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getAffectedRows());
      if (getAffectedFlowsCount() > 0) {
        hash = (37 * hash) + AFFECTED_FLOWS_FIELD_NUMBER;
        hash = (53 * hash) + getAffectedFlowsList().hashCode();
      }
      if (!internalGetExtensions().getMap().isEmpty()) {
        hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
        hash = (53 * hash) + internalGetExtensions().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlowResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowResponse 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 io.greptime.v1.flow.Server.FlowResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowResponse 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 io.greptime.v1.flow.Server.FlowResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlowResponse 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(io.greptime.v1.flow.Server.FlowResponse prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.FlowResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.FlowResponse)
        io.greptime.v1.flow.Server.FlowResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 4:
            return internalGetExtensions();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 4:
            return internalGetMutableExtensions();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.FlowResponse.class, io.greptime.v1.flow.Server.FlowResponse.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.FlowResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getAffectedFlowsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        affectedRows_ = 0L;

        if (affectedFlowsBuilder_ == null) {
          affectedFlows_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          affectedFlowsBuilder_.clear();
        }
        internalGetMutableExtensions().clear();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowResponse getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.FlowResponse.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowResponse build() {
        io.greptime.v1.flow.Server.FlowResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlowResponse buildPartial() {
        io.greptime.v1.flow.Server.FlowResponse result = new io.greptime.v1.flow.Server.FlowResponse(this);
        int from_bitField0_ = bitField0_;
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        result.affectedRows_ = affectedRows_;
        if (affectedFlowsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            affectedFlows_ = java.util.Collections.unmodifiableList(affectedFlows_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.affectedFlows_ = affectedFlows_;
        } else {
          result.affectedFlows_ = affectedFlowsBuilder_.build();
        }
        result.extensions_ = internalGetExtensions();
        result.extensions_.makeImmutable();
        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 io.greptime.v1.flow.Server.FlowResponse) {
          return mergeFrom((io.greptime.v1.flow.Server.FlowResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.FlowResponse other) {
        if (other == io.greptime.v1.flow.Server.FlowResponse.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.getAffectedRows() != 0L) {
          setAffectedRows(other.getAffectedRows());
        }
        if (affectedFlowsBuilder_ == null) {
          if (!other.affectedFlows_.isEmpty()) {
            if (affectedFlows_.isEmpty()) {
              affectedFlows_ = other.affectedFlows_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureAffectedFlowsIsMutable();
              affectedFlows_.addAll(other.affectedFlows_);
            }
            onChanged();
          }
        } else {
          if (!other.affectedFlows_.isEmpty()) {
            if (affectedFlowsBuilder_.isEmpty()) {
              affectedFlowsBuilder_.dispose();
              affectedFlowsBuilder_ = null;
              affectedFlows_ = other.affectedFlows_;
              bitField0_ = (bitField0_ & ~0x00000001);
              affectedFlowsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getAffectedFlowsFieldBuilder() : null;
            } else {
              affectedFlowsBuilder_.addAllMessages(other.affectedFlows_);
            }
          }
        }
        internalGetMutableExtensions().mergeFrom(
            other.internalGetExtensions());
        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 {
        io.greptime.v1.flow.Server.FlowResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.FlowResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private io.greptime.v1.Common.ResponseHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.ResponseHeader, io.greptime.v1.Common.ResponseHeader.Builder, io.greptime.v1.Common.ResponseHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       * @return The header.
       */
      public io.greptime.v1.Common.ResponseHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? io.greptime.v1.Common.ResponseHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(io.greptime.v1.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(
          io.greptime.v1.Common.ResponseHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public Builder mergeHeader(io.greptime.v1.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              io.greptime.v1.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public io.greptime.v1.Common.ResponseHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      public io.greptime.v1.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              io.greptime.v1.Common.ResponseHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.ResponseHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.ResponseHeader, io.greptime.v1.Common.ResponseHeader.Builder, io.greptime.v1.Common.ResponseHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Common.ResponseHeader, io.greptime.v1.Common.ResponseHeader.Builder, io.greptime.v1.Common.ResponseHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private long affectedRows_ ;
      /**
       * <code>uint64 affected_rows = 2;</code>
       * @return The affectedRows.
       */
      @java.lang.Override
      public long getAffectedRows() {
        return affectedRows_;
      }
      /**
       * <code>uint64 affected_rows = 2;</code>
       * @param value The affectedRows to set.
       * @return This builder for chaining.
       */
      public Builder setAffectedRows(long value) {
        
        affectedRows_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 affected_rows = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearAffectedRows() {
        
        affectedRows_ = 0L;
        onChanged();
        return this;
      }

      private java.util.List<io.greptime.v1.Ddl.FlowId> affectedFlows_ =
        java.util.Collections.emptyList();
      private void ensureAffectedFlowsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          affectedFlows_ = new java.util.ArrayList<io.greptime.v1.Ddl.FlowId>(affectedFlows_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> affectedFlowsBuilder_;

      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public java.util.List<io.greptime.v1.Ddl.FlowId> getAffectedFlowsList() {
        if (affectedFlowsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(affectedFlows_);
        } else {
          return affectedFlowsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public int getAffectedFlowsCount() {
        if (affectedFlowsBuilder_ == null) {
          return affectedFlows_.size();
        } else {
          return affectedFlowsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public io.greptime.v1.Ddl.FlowId getAffectedFlows(int index) {
        if (affectedFlowsBuilder_ == null) {
          return affectedFlows_.get(index);
        } else {
          return affectedFlowsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder setAffectedFlows(
          int index, io.greptime.v1.Ddl.FlowId value) {
        if (affectedFlowsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAffectedFlowsIsMutable();
          affectedFlows_.set(index, value);
          onChanged();
        } else {
          affectedFlowsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder setAffectedFlows(
          int index, io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (affectedFlowsBuilder_ == null) {
          ensureAffectedFlowsIsMutable();
          affectedFlows_.set(index, builderForValue.build());
          onChanged();
        } else {
          affectedFlowsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder addAffectedFlows(io.greptime.v1.Ddl.FlowId value) {
        if (affectedFlowsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAffectedFlowsIsMutable();
          affectedFlows_.add(value);
          onChanged();
        } else {
          affectedFlowsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder addAffectedFlows(
          int index, io.greptime.v1.Ddl.FlowId value) {
        if (affectedFlowsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAffectedFlowsIsMutable();
          affectedFlows_.add(index, value);
          onChanged();
        } else {
          affectedFlowsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder addAffectedFlows(
          io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (affectedFlowsBuilder_ == null) {
          ensureAffectedFlowsIsMutable();
          affectedFlows_.add(builderForValue.build());
          onChanged();
        } else {
          affectedFlowsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder addAffectedFlows(
          int index, io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (affectedFlowsBuilder_ == null) {
          ensureAffectedFlowsIsMutable();
          affectedFlows_.add(index, builderForValue.build());
          onChanged();
        } else {
          affectedFlowsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder addAllAffectedFlows(
          java.lang.Iterable<? extends io.greptime.v1.Ddl.FlowId> values) {
        if (affectedFlowsBuilder_ == null) {
          ensureAffectedFlowsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, affectedFlows_);
          onChanged();
        } else {
          affectedFlowsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder clearAffectedFlows() {
        if (affectedFlowsBuilder_ == null) {
          affectedFlows_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          affectedFlowsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public Builder removeAffectedFlows(int index) {
        if (affectedFlowsBuilder_ == null) {
          ensureAffectedFlowsIsMutable();
          affectedFlows_.remove(index);
          onChanged();
        } else {
          affectedFlowsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder getAffectedFlowsBuilder(
          int index) {
        return getAffectedFlowsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public io.greptime.v1.Ddl.FlowIdOrBuilder getAffectedFlowsOrBuilder(
          int index) {
        if (affectedFlowsBuilder_ == null) {
          return affectedFlows_.get(index);  } else {
          return affectedFlowsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public java.util.List<? extends io.greptime.v1.Ddl.FlowIdOrBuilder> 
           getAffectedFlowsOrBuilderList() {
        if (affectedFlowsBuilder_ != null) {
          return affectedFlowsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(affectedFlows_);
        }
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder addAffectedFlowsBuilder() {
        return getAffectedFlowsFieldBuilder().addBuilder(
            io.greptime.v1.Ddl.FlowId.getDefaultInstance());
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder addAffectedFlowsBuilder(
          int index) {
        return getAffectedFlowsFieldBuilder().addBuilder(
            index, io.greptime.v1.Ddl.FlowId.getDefaultInstance());
      }
      /**
       * <pre>
       * affected flow ids
       * </pre>
       *
       * <code>repeated .greptime.v1.FlowId affected_flows = 3;</code>
       */
      public java.util.List<io.greptime.v1.Ddl.FlowId.Builder> 
           getAffectedFlowsBuilderList() {
        return getAffectedFlowsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> 
          getAffectedFlowsFieldBuilder() {
        if (affectedFlowsBuilder_ == null) {
          affectedFlowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder>(
                  affectedFlows_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          affectedFlows_ = null;
        }
        return affectedFlowsBuilder_;
      }

      private com.google.protobuf.MapField<
          java.lang.String, com.google.protobuf.ByteString> extensions_;
      private com.google.protobuf.MapField<java.lang.String, com.google.protobuf.ByteString>
      internalGetExtensions() {
        if (extensions_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              ExtensionsDefaultEntryHolder.defaultEntry);
        }
        return extensions_;
      }
      private com.google.protobuf.MapField<java.lang.String, com.google.protobuf.ByteString>
      internalGetMutableExtensions() {
        onChanged();;
        if (extensions_ == null) {
          extensions_ = com.google.protobuf.MapField.newMapField(
              ExtensionsDefaultEntryHolder.defaultEntry);
        }
        if (!extensions_.isMutable()) {
          extensions_ = extensions_.copy();
        }
        return extensions_;
      }

      public int getExtensionsCount() {
        return internalGetExtensions().getMap().size();
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */

      @java.lang.Override
      public boolean containsExtensions(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        return internalGetExtensions().getMap().containsKey(key);
      }
      /**
       * Use {@link #getExtensionsMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, com.google.protobuf.ByteString> getExtensions() {
        return getExtensionsMap();
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */
      @java.lang.Override

      public java.util.Map<java.lang.String, com.google.protobuf.ByteString> getExtensionsMap() {
        return internalGetExtensions().getMap();
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */
      @java.lang.Override

      public com.google.protobuf.ByteString getExtensionsOrDefault(
          java.lang.String key,
          com.google.protobuf.ByteString defaultValue) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, com.google.protobuf.ByteString> map =
            internalGetExtensions().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */
      @java.lang.Override

      public com.google.protobuf.ByteString getExtensionsOrThrow(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, com.google.protobuf.ByteString> map =
            internalGetExtensions().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }

      public Builder clearExtensions() {
        internalGetMutableExtensions().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */

      public Builder removeExtensions(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        internalGetMutableExtensions().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, com.google.protobuf.ByteString>
      getMutableExtensions() {
        return internalGetMutableExtensions().getMutableMap();
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */
      public Builder putExtensions(
          java.lang.String key,
          com.google.protobuf.ByteString value) {
        if (key == null) { throw new NullPointerException("map key"); }
        if (value == null) {
  throw new NullPointerException("map value");
}

        internalGetMutableExtensions().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <code>map&lt;string, bytes&gt; extensions = 4;</code>
       */

      public Builder putAllExtensions(
          java.util.Map<java.lang.String, com.google.protobuf.ByteString> values) {
        internalGetMutableExtensions().getMutableMap()
            .putAll(values);
        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.flow.FlowResponse)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.FlowResponse)
    private static final io.greptime.v1.flow.Server.FlowResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.FlowResponse();
    }

    public static io.greptime.v1.flow.Server.FlowResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.FlowResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface CreateRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.CreateRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    boolean hasFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    io.greptime.v1.Ddl.FlowId getFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder();

    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    java.util.List<io.greptime.v1.Ddl.TableId> 
        getSourceTableIdsList();
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    io.greptime.v1.Ddl.TableId getSourceTableIds(int index);
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    int getSourceTableIdsCount();
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    java.util.List<? extends io.greptime.v1.Ddl.TableIdOrBuilder> 
        getSourceTableIdsOrBuilderList();
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    io.greptime.v1.Ddl.TableIdOrBuilder getSourceTableIdsOrBuilder(
        int index);

    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     * @return Whether the sinkTableName field is set.
     */
    boolean hasSinkTableName();
    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     * @return The sinkTableName.
     */
    io.greptime.v1.Common.TableName getSinkTableName();
    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     */
    io.greptime.v1.Common.TableNameOrBuilder getSinkTableNameOrBuilder();

    /**
     * <code>bool create_if_not_exists = 4;</code>
     * @return The createIfNotExists.
     */
    boolean getCreateIfNotExists();

    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     * @return Whether the expireAfter field is set.
     */
    boolean hasExpireAfter();
    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     * @return The expireAfter.
     */
    io.greptime.v1.Common.ExpireAfter getExpireAfter();
    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     */
    io.greptime.v1.Common.ExpireAfterOrBuilder getExpireAfterOrBuilder();

    /**
     * <code>string comment = 6;</code>
     * @return The comment.
     */
    java.lang.String getComment();
    /**
     * <code>string comment = 6;</code>
     * @return The bytes for comment.
     */
    com.google.protobuf.ByteString
        getCommentBytes();

    /**
     * <code>string sql = 7;</code>
     * @return The sql.
     */
    java.lang.String getSql();
    /**
     * <code>string sql = 7;</code>
     * @return The bytes for sql.
     */
    com.google.protobuf.ByteString
        getSqlBytes();

    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    int getFlowOptionsCount();
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    boolean containsFlowOptions(
        java.lang.String key);
    /**
     * Use {@link #getFlowOptionsMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, java.lang.String>
    getFlowOptions();
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    java.util.Map<java.lang.String, java.lang.String>
    getFlowOptionsMap();
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */

    /* nullable */
java.lang.String getFlowOptionsOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue);
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */

    java.lang.String getFlowOptionsOrThrow(
        java.lang.String key);

    /**
     * <pre>
     * Set to true if the flow should be created or replaced.
     * </pre>
     *
     * <code>bool or_replace = 9;</code>
     * @return The orReplace.
     */
    boolean getOrReplace();
  }
  /**
   * <pre>
   * Create a flow
   * Very similar to `ddl.CreateTaskExpr`,
   * replace `source_table_names` with `source_table_ids`
   * </pre>
   *
   * Protobuf type {@code greptime.v1.flow.CreateRequest}
   */
  public static final class CreateRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.CreateRequest)
      CreateRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use CreateRequest.newBuilder() to construct.
    private CreateRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private CreateRequest() {
      sourceTableIds_ = java.util.Collections.emptyList();
      comment_ = "";
      sql_ = "";
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private CreateRequest(
        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: {
              io.greptime.v1.Ddl.FlowId.Builder subBuilder = null;
              if (flowId_ != null) {
                subBuilder = flowId_.toBuilder();
              }
              flowId_ = input.readMessage(io.greptime.v1.Ddl.FlowId.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(flowId_);
                flowId_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                sourceTableIds_ = new java.util.ArrayList<io.greptime.v1.Ddl.TableId>();
                mutable_bitField0_ |= 0x00000001;
              }
              sourceTableIds_.add(
                  input.readMessage(io.greptime.v1.Ddl.TableId.parser(), extensionRegistry));
              break;
            }
            case 26: {
              io.greptime.v1.Common.TableName.Builder subBuilder = null;
              if (sinkTableName_ != null) {
                subBuilder = sinkTableName_.toBuilder();
              }
              sinkTableName_ = input.readMessage(io.greptime.v1.Common.TableName.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(sinkTableName_);
                sinkTableName_ = subBuilder.buildPartial();
              }

              break;
            }
            case 32: {

              createIfNotExists_ = input.readBool();
              break;
            }
            case 42: {
              io.greptime.v1.Common.ExpireAfter.Builder subBuilder = null;
              if (expireAfter_ != null) {
                subBuilder = expireAfter_.toBuilder();
              }
              expireAfter_ = input.readMessage(io.greptime.v1.Common.ExpireAfter.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(expireAfter_);
                expireAfter_ = subBuilder.buildPartial();
              }

              break;
            }
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();

              comment_ = s;
              break;
            }
            case 58: {
              java.lang.String s = input.readStringRequireUtf8();

              sql_ = s;
              break;
            }
            case 66: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                flowOptions_ = com.google.protobuf.MapField.newMapField(
                    FlowOptionsDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000002;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
              flowOptions__ = input.readMessage(
                  FlowOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              flowOptions_.getMutableMap().put(
                  flowOptions__.getKey(), flowOptions__.getValue());
              break;
            }
            case 72: {

              orReplace_ = input.readBool();
              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)) {
          sourceTableIds_ = java.util.Collections.unmodifiableList(sourceTableIds_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 8:
          return internalGetFlowOptions();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.CreateRequest.class, io.greptime.v1.flow.Server.CreateRequest.Builder.class);
    }

    public static final int FLOW_ID_FIELD_NUMBER = 1;
    private io.greptime.v1.Ddl.FlowId flowId_;
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    @java.lang.Override
    public boolean hasFlowId() {
      return flowId_ != null;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowId getFlowId() {
      return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
      return getFlowId();
    }

    public static final int SOURCE_TABLE_IDS_FIELD_NUMBER = 2;
    private java.util.List<io.greptime.v1.Ddl.TableId> sourceTableIds_;
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    @java.lang.Override
    public java.util.List<io.greptime.v1.Ddl.TableId> getSourceTableIdsList() {
      return sourceTableIds_;
    }
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.greptime.v1.Ddl.TableIdOrBuilder> 
        getSourceTableIdsOrBuilderList() {
      return sourceTableIds_;
    }
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    @java.lang.Override
    public int getSourceTableIdsCount() {
      return sourceTableIds_.size();
    }
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.TableId getSourceTableIds(int index) {
      return sourceTableIds_.get(index);
    }
    /**
     * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.TableIdOrBuilder getSourceTableIdsOrBuilder(
        int index) {
      return sourceTableIds_.get(index);
    }

    public static final int SINK_TABLE_NAME_FIELD_NUMBER = 3;
    private io.greptime.v1.Common.TableName sinkTableName_;
    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     * @return Whether the sinkTableName field is set.
     */
    @java.lang.Override
    public boolean hasSinkTableName() {
      return sinkTableName_ != null;
    }
    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     * @return The sinkTableName.
     */
    @java.lang.Override
    public io.greptime.v1.Common.TableName getSinkTableName() {
      return sinkTableName_ == null ? io.greptime.v1.Common.TableName.getDefaultInstance() : sinkTableName_;
    }
    /**
     * <code>.greptime.v1.TableName sink_table_name = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Common.TableNameOrBuilder getSinkTableNameOrBuilder() {
      return getSinkTableName();
    }

    public static final int CREATE_IF_NOT_EXISTS_FIELD_NUMBER = 4;
    private boolean createIfNotExists_;
    /**
     * <code>bool create_if_not_exists = 4;</code>
     * @return The createIfNotExists.
     */
    @java.lang.Override
    public boolean getCreateIfNotExists() {
      return createIfNotExists_;
    }

    public static final int EXPIRE_AFTER_FIELD_NUMBER = 5;
    private io.greptime.v1.Common.ExpireAfter expireAfter_;
    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     * @return Whether the expireAfter field is set.
     */
    @java.lang.Override
    public boolean hasExpireAfter() {
      return expireAfter_ != null;
    }
    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     * @return The expireAfter.
     */
    @java.lang.Override
    public io.greptime.v1.Common.ExpireAfter getExpireAfter() {
      return expireAfter_ == null ? io.greptime.v1.Common.ExpireAfter.getDefaultInstance() : expireAfter_;
    }
    /**
     * <pre>
     * Expire data older than the given duration seconds.
     * </pre>
     *
     * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Common.ExpireAfterOrBuilder getExpireAfterOrBuilder() {
      return getExpireAfter();
    }

    public static final int COMMENT_FIELD_NUMBER = 6;
    private volatile java.lang.Object comment_;
    /**
     * <code>string comment = 6;</code>
     * @return The comment.
     */
    @java.lang.Override
    public java.lang.String getComment() {
      java.lang.Object ref = comment_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        comment_ = s;
        return s;
      }
    }
    /**
     * <code>string comment = 6;</code>
     * @return The bytes for comment.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getCommentBytes() {
      java.lang.Object ref = comment_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        comment_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int SQL_FIELD_NUMBER = 7;
    private volatile java.lang.Object sql_;
    /**
     * <code>string sql = 7;</code>
     * @return The sql.
     */
    @java.lang.Override
    public java.lang.String getSql() {
      java.lang.Object ref = sql_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sql_ = s;
        return s;
      }
    }
    /**
     * <code>string sql = 7;</code>
     * @return The bytes for sql.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getSqlBytes() {
      java.lang.Object ref = sql_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sql_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int FLOW_OPTIONS_FIELD_NUMBER = 8;
    private static final class FlowOptionsDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, java.lang.String> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, java.lang.String>newDefaultInstance(
                  io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "");
    }
    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> flowOptions_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetFlowOptions() {
      if (flowOptions_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            FlowOptionsDefaultEntryHolder.defaultEntry);
      }
      return flowOptions_;
    }

    public int getFlowOptionsCount() {
      return internalGetFlowOptions().getMap().size();
    }
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */

    @java.lang.Override
    public boolean containsFlowOptions(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetFlowOptions().getMap().containsKey(key);
    }
    /**
     * Use {@link #getFlowOptionsMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getFlowOptions() {
      return getFlowOptionsMap();
    }
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    @java.lang.Override

    public java.util.Map<java.lang.String, java.lang.String> getFlowOptionsMap() {
      return internalGetFlowOptions().getMap();
    }
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    @java.lang.Override

    public java.lang.String getFlowOptionsOrDefault(
        java.lang.String key,
        java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetFlowOptions().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, string&gt; flow_options = 8;</code>
     */
    @java.lang.Override

    public java.lang.String getFlowOptionsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetFlowOptions().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public static final int OR_REPLACE_FIELD_NUMBER = 9;
    private boolean orReplace_;
    /**
     * <pre>
     * Set to true if the flow should be created or replaced.
     * </pre>
     *
     * <code>bool or_replace = 9;</code>
     * @return The orReplace.
     */
    @java.lang.Override
    public boolean getOrReplace() {
      return orReplace_;
    }

    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 (flowId_ != null) {
        output.writeMessage(1, getFlowId());
      }
      for (int i = 0; i < sourceTableIds_.size(); i++) {
        output.writeMessage(2, sourceTableIds_.get(i));
      }
      if (sinkTableName_ != null) {
        output.writeMessage(3, getSinkTableName());
      }
      if (createIfNotExists_ != false) {
        output.writeBool(4, createIfNotExists_);
      }
      if (expireAfter_ != null) {
        output.writeMessage(5, getExpireAfter());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, comment_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sql_);
      }
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetFlowOptions(),
          FlowOptionsDefaultEntryHolder.defaultEntry,
          8);
      if (orReplace_ != false) {
        output.writeBool(9, orReplace_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (flowId_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getFlowId());
      }
      for (int i = 0; i < sourceTableIds_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, sourceTableIds_.get(i));
      }
      if (sinkTableName_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getSinkTableName());
      }
      if (createIfNotExists_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(4, createIfNotExists_);
      }
      if (expireAfter_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getExpireAfter());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, comment_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sql_);
      }
      for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
           : internalGetFlowOptions().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
        flowOptions__ = FlowOptionsDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(8, flowOptions__);
      }
      if (orReplace_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(9, orReplace_);
      }
      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 io.greptime.v1.flow.Server.CreateRequest)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.CreateRequest other = (io.greptime.v1.flow.Server.CreateRequest) obj;

      if (hasFlowId() != other.hasFlowId()) return false;
      if (hasFlowId()) {
        if (!getFlowId()
            .equals(other.getFlowId())) return false;
      }
      if (!getSourceTableIdsList()
          .equals(other.getSourceTableIdsList())) return false;
      if (hasSinkTableName() != other.hasSinkTableName()) return false;
      if (hasSinkTableName()) {
        if (!getSinkTableName()
            .equals(other.getSinkTableName())) return false;
      }
      if (getCreateIfNotExists()
          != other.getCreateIfNotExists()) return false;
      if (hasExpireAfter() != other.hasExpireAfter()) return false;
      if (hasExpireAfter()) {
        if (!getExpireAfter()
            .equals(other.getExpireAfter())) return false;
      }
      if (!getComment()
          .equals(other.getComment())) return false;
      if (!getSql()
          .equals(other.getSql())) return false;
      if (!internalGetFlowOptions().equals(
          other.internalGetFlowOptions())) return false;
      if (getOrReplace()
          != other.getOrReplace()) 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 (hasFlowId()) {
        hash = (37 * hash) + FLOW_ID_FIELD_NUMBER;
        hash = (53 * hash) + getFlowId().hashCode();
      }
      if (getSourceTableIdsCount() > 0) {
        hash = (37 * hash) + SOURCE_TABLE_IDS_FIELD_NUMBER;
        hash = (53 * hash) + getSourceTableIdsList().hashCode();
      }
      if (hasSinkTableName()) {
        hash = (37 * hash) + SINK_TABLE_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getSinkTableName().hashCode();
      }
      hash = (37 * hash) + CREATE_IF_NOT_EXISTS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getCreateIfNotExists());
      if (hasExpireAfter()) {
        hash = (37 * hash) + EXPIRE_AFTER_FIELD_NUMBER;
        hash = (53 * hash) + getExpireAfter().hashCode();
      }
      hash = (37 * hash) + COMMENT_FIELD_NUMBER;
      hash = (53 * hash) + getComment().hashCode();
      hash = (37 * hash) + SQL_FIELD_NUMBER;
      hash = (53 * hash) + getSql().hashCode();
      if (!internalGetFlowOptions().getMap().isEmpty()) {
        hash = (37 * hash) + FLOW_OPTIONS_FIELD_NUMBER;
        hash = (53 * hash) + internalGetFlowOptions().hashCode();
      }
      hash = (37 * hash) + OR_REPLACE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getOrReplace());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.CreateRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.CreateRequest 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 io.greptime.v1.flow.Server.CreateRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.CreateRequest 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 io.greptime.v1.flow.Server.CreateRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.CreateRequest 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(io.greptime.v1.flow.Server.CreateRequest 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>
     * Create a flow
     * Very similar to `ddl.CreateTaskExpr`,
     * replace `source_table_names` with `source_table_ids`
     * </pre>
     *
     * Protobuf type {@code greptime.v1.flow.CreateRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.CreateRequest)
        io.greptime.v1.flow.Server.CreateRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 8:
            return internalGetFlowOptions();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 8:
            return internalGetMutableFlowOptions();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.CreateRequest.class, io.greptime.v1.flow.Server.CreateRequest.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.CreateRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getSourceTableIdsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (flowIdBuilder_ == null) {
          flowId_ = null;
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }
        if (sourceTableIdsBuilder_ == null) {
          sourceTableIds_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          sourceTableIdsBuilder_.clear();
        }
        if (sinkTableNameBuilder_ == null) {
          sinkTableName_ = null;
        } else {
          sinkTableName_ = null;
          sinkTableNameBuilder_ = null;
        }
        createIfNotExists_ = false;

        if (expireAfterBuilder_ == null) {
          expireAfter_ = null;
        } else {
          expireAfter_ = null;
          expireAfterBuilder_ = null;
        }
        comment_ = "";

        sql_ = "";

        internalGetMutableFlowOptions().clear();
        orReplace_ = false;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_CreateRequest_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.CreateRequest getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.CreateRequest build() {
        io.greptime.v1.flow.Server.CreateRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.CreateRequest buildPartial() {
        io.greptime.v1.flow.Server.CreateRequest result = new io.greptime.v1.flow.Server.CreateRequest(this);
        int from_bitField0_ = bitField0_;
        if (flowIdBuilder_ == null) {
          result.flowId_ = flowId_;
        } else {
          result.flowId_ = flowIdBuilder_.build();
        }
        if (sourceTableIdsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            sourceTableIds_ = java.util.Collections.unmodifiableList(sourceTableIds_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.sourceTableIds_ = sourceTableIds_;
        } else {
          result.sourceTableIds_ = sourceTableIdsBuilder_.build();
        }
        if (sinkTableNameBuilder_ == null) {
          result.sinkTableName_ = sinkTableName_;
        } else {
          result.sinkTableName_ = sinkTableNameBuilder_.build();
        }
        result.createIfNotExists_ = createIfNotExists_;
        if (expireAfterBuilder_ == null) {
          result.expireAfter_ = expireAfter_;
        } else {
          result.expireAfter_ = expireAfterBuilder_.build();
        }
        result.comment_ = comment_;
        result.sql_ = sql_;
        result.flowOptions_ = internalGetFlowOptions();
        result.flowOptions_.makeImmutable();
        result.orReplace_ = orReplace_;
        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 io.greptime.v1.flow.Server.CreateRequest) {
          return mergeFrom((io.greptime.v1.flow.Server.CreateRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.CreateRequest other) {
        if (other == io.greptime.v1.flow.Server.CreateRequest.getDefaultInstance()) return this;
        if (other.hasFlowId()) {
          mergeFlowId(other.getFlowId());
        }
        if (sourceTableIdsBuilder_ == null) {
          if (!other.sourceTableIds_.isEmpty()) {
            if (sourceTableIds_.isEmpty()) {
              sourceTableIds_ = other.sourceTableIds_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureSourceTableIdsIsMutable();
              sourceTableIds_.addAll(other.sourceTableIds_);
            }
            onChanged();
          }
        } else {
          if (!other.sourceTableIds_.isEmpty()) {
            if (sourceTableIdsBuilder_.isEmpty()) {
              sourceTableIdsBuilder_.dispose();
              sourceTableIdsBuilder_ = null;
              sourceTableIds_ = other.sourceTableIds_;
              bitField0_ = (bitField0_ & ~0x00000001);
              sourceTableIdsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getSourceTableIdsFieldBuilder() : null;
            } else {
              sourceTableIdsBuilder_.addAllMessages(other.sourceTableIds_);
            }
          }
        }
        if (other.hasSinkTableName()) {
          mergeSinkTableName(other.getSinkTableName());
        }
        if (other.getCreateIfNotExists() != false) {
          setCreateIfNotExists(other.getCreateIfNotExists());
        }
        if (other.hasExpireAfter()) {
          mergeExpireAfter(other.getExpireAfter());
        }
        if (!other.getComment().isEmpty()) {
          comment_ = other.comment_;
          onChanged();
        }
        if (!other.getSql().isEmpty()) {
          sql_ = other.sql_;
          onChanged();
        }
        internalGetMutableFlowOptions().mergeFrom(
            other.internalGetFlowOptions());
        if (other.getOrReplace() != false) {
          setOrReplace(other.getOrReplace());
        }
        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 {
        io.greptime.v1.flow.Server.CreateRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.CreateRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private io.greptime.v1.Ddl.FlowId flowId_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> flowIdBuilder_;
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return Whether the flowId field is set.
       */
      public boolean hasFlowId() {
        return flowIdBuilder_ != null || flowId_ != null;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return The flowId.
       */
      public io.greptime.v1.Ddl.FlowId getFlowId() {
        if (flowIdBuilder_ == null) {
          return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        } else {
          return flowIdBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          flowId_ = value;
          onChanged();
        } else {
          flowIdBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(
          io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (flowIdBuilder_ == null) {
          flowId_ = builderForValue.build();
          onChanged();
        } else {
          flowIdBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder mergeFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (flowId_ != null) {
            flowId_ =
              io.greptime.v1.Ddl.FlowId.newBuilder(flowId_).mergeFrom(value).buildPartial();
          } else {
            flowId_ = value;
          }
          onChanged();
        } else {
          flowIdBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder clearFlowId() {
        if (flowIdBuilder_ == null) {
          flowId_ = null;
          onChanged();
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder getFlowIdBuilder() {
        
        onChanged();
        return getFlowIdFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
        if (flowIdBuilder_ != null) {
          return flowIdBuilder_.getMessageOrBuilder();
        } else {
          return flowId_ == null ?
              io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> 
          getFlowIdFieldBuilder() {
        if (flowIdBuilder_ == null) {
          flowIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder>(
                  getFlowId(),
                  getParentForChildren(),
                  isClean());
          flowId_ = null;
        }
        return flowIdBuilder_;
      }

      private java.util.List<io.greptime.v1.Ddl.TableId> sourceTableIds_ =
        java.util.Collections.emptyList();
      private void ensureSourceTableIdsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          sourceTableIds_ = new java.util.ArrayList<io.greptime.v1.Ddl.TableId>(sourceTableIds_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> sourceTableIdsBuilder_;

      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public java.util.List<io.greptime.v1.Ddl.TableId> getSourceTableIdsList() {
        if (sourceTableIdsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(sourceTableIds_);
        } else {
          return sourceTableIdsBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public int getSourceTableIdsCount() {
        if (sourceTableIdsBuilder_ == null) {
          return sourceTableIds_.size();
        } else {
          return sourceTableIdsBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public io.greptime.v1.Ddl.TableId getSourceTableIds(int index) {
        if (sourceTableIdsBuilder_ == null) {
          return sourceTableIds_.get(index);
        } else {
          return sourceTableIdsBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder setSourceTableIds(
          int index, io.greptime.v1.Ddl.TableId value) {
        if (sourceTableIdsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.set(index, value);
          onChanged();
        } else {
          sourceTableIdsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder setSourceTableIds(
          int index, io.greptime.v1.Ddl.TableId.Builder builderForValue) {
        if (sourceTableIdsBuilder_ == null) {
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.set(index, builderForValue.build());
          onChanged();
        } else {
          sourceTableIdsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder addSourceTableIds(io.greptime.v1.Ddl.TableId value) {
        if (sourceTableIdsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.add(value);
          onChanged();
        } else {
          sourceTableIdsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder addSourceTableIds(
          int index, io.greptime.v1.Ddl.TableId value) {
        if (sourceTableIdsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.add(index, value);
          onChanged();
        } else {
          sourceTableIdsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder addSourceTableIds(
          io.greptime.v1.Ddl.TableId.Builder builderForValue) {
        if (sourceTableIdsBuilder_ == null) {
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.add(builderForValue.build());
          onChanged();
        } else {
          sourceTableIdsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder addSourceTableIds(
          int index, io.greptime.v1.Ddl.TableId.Builder builderForValue) {
        if (sourceTableIdsBuilder_ == null) {
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.add(index, builderForValue.build());
          onChanged();
        } else {
          sourceTableIdsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder addAllSourceTableIds(
          java.lang.Iterable<? extends io.greptime.v1.Ddl.TableId> values) {
        if (sourceTableIdsBuilder_ == null) {
          ensureSourceTableIdsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, sourceTableIds_);
          onChanged();
        } else {
          sourceTableIdsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder clearSourceTableIds() {
        if (sourceTableIdsBuilder_ == null) {
          sourceTableIds_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          sourceTableIdsBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public Builder removeSourceTableIds(int index) {
        if (sourceTableIdsBuilder_ == null) {
          ensureSourceTableIdsIsMutable();
          sourceTableIds_.remove(index);
          onChanged();
        } else {
          sourceTableIdsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public io.greptime.v1.Ddl.TableId.Builder getSourceTableIdsBuilder(
          int index) {
        return getSourceTableIdsFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public io.greptime.v1.Ddl.TableIdOrBuilder getSourceTableIdsOrBuilder(
          int index) {
        if (sourceTableIdsBuilder_ == null) {
          return sourceTableIds_.get(index);  } else {
          return sourceTableIdsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public java.util.List<? extends io.greptime.v1.Ddl.TableIdOrBuilder> 
           getSourceTableIdsOrBuilderList() {
        if (sourceTableIdsBuilder_ != null) {
          return sourceTableIdsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(sourceTableIds_);
        }
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public io.greptime.v1.Ddl.TableId.Builder addSourceTableIdsBuilder() {
        return getSourceTableIdsFieldBuilder().addBuilder(
            io.greptime.v1.Ddl.TableId.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public io.greptime.v1.Ddl.TableId.Builder addSourceTableIdsBuilder(
          int index) {
        return getSourceTableIdsFieldBuilder().addBuilder(
            index, io.greptime.v1.Ddl.TableId.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.TableId source_table_ids = 2;</code>
       */
      public java.util.List<io.greptime.v1.Ddl.TableId.Builder> 
           getSourceTableIdsBuilderList() {
        return getSourceTableIdsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder> 
          getSourceTableIdsFieldBuilder() {
        if (sourceTableIdsBuilder_ == null) {
          sourceTableIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              io.greptime.v1.Ddl.TableId, io.greptime.v1.Ddl.TableId.Builder, io.greptime.v1.Ddl.TableIdOrBuilder>(
                  sourceTableIds_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          sourceTableIds_ = null;
        }
        return sourceTableIdsBuilder_;
      }

      private io.greptime.v1.Common.TableName sinkTableName_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.TableName, io.greptime.v1.Common.TableName.Builder, io.greptime.v1.Common.TableNameOrBuilder> sinkTableNameBuilder_;
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       * @return Whether the sinkTableName field is set.
       */
      public boolean hasSinkTableName() {
        return sinkTableNameBuilder_ != null || sinkTableName_ != null;
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       * @return The sinkTableName.
       */
      public io.greptime.v1.Common.TableName getSinkTableName() {
        if (sinkTableNameBuilder_ == null) {
          return sinkTableName_ == null ? io.greptime.v1.Common.TableName.getDefaultInstance() : sinkTableName_;
        } else {
          return sinkTableNameBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public Builder setSinkTableName(io.greptime.v1.Common.TableName value) {
        if (sinkTableNameBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          sinkTableName_ = value;
          onChanged();
        } else {
          sinkTableNameBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public Builder setSinkTableName(
          io.greptime.v1.Common.TableName.Builder builderForValue) {
        if (sinkTableNameBuilder_ == null) {
          sinkTableName_ = builderForValue.build();
          onChanged();
        } else {
          sinkTableNameBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public Builder mergeSinkTableName(io.greptime.v1.Common.TableName value) {
        if (sinkTableNameBuilder_ == null) {
          if (sinkTableName_ != null) {
            sinkTableName_ =
              io.greptime.v1.Common.TableName.newBuilder(sinkTableName_).mergeFrom(value).buildPartial();
          } else {
            sinkTableName_ = value;
          }
          onChanged();
        } else {
          sinkTableNameBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public Builder clearSinkTableName() {
        if (sinkTableNameBuilder_ == null) {
          sinkTableName_ = null;
          onChanged();
        } else {
          sinkTableName_ = null;
          sinkTableNameBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public io.greptime.v1.Common.TableName.Builder getSinkTableNameBuilder() {
        
        onChanged();
        return getSinkTableNameFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      public io.greptime.v1.Common.TableNameOrBuilder getSinkTableNameOrBuilder() {
        if (sinkTableNameBuilder_ != null) {
          return sinkTableNameBuilder_.getMessageOrBuilder();
        } else {
          return sinkTableName_ == null ?
              io.greptime.v1.Common.TableName.getDefaultInstance() : sinkTableName_;
        }
      }
      /**
       * <code>.greptime.v1.TableName sink_table_name = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.TableName, io.greptime.v1.Common.TableName.Builder, io.greptime.v1.Common.TableNameOrBuilder> 
          getSinkTableNameFieldBuilder() {
        if (sinkTableNameBuilder_ == null) {
          sinkTableNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Common.TableName, io.greptime.v1.Common.TableName.Builder, io.greptime.v1.Common.TableNameOrBuilder>(
                  getSinkTableName(),
                  getParentForChildren(),
                  isClean());
          sinkTableName_ = null;
        }
        return sinkTableNameBuilder_;
      }

      private boolean createIfNotExists_ ;
      /**
       * <code>bool create_if_not_exists = 4;</code>
       * @return The createIfNotExists.
       */
      @java.lang.Override
      public boolean getCreateIfNotExists() {
        return createIfNotExists_;
      }
      /**
       * <code>bool create_if_not_exists = 4;</code>
       * @param value The createIfNotExists to set.
       * @return This builder for chaining.
       */
      public Builder setCreateIfNotExists(boolean value) {
        
        createIfNotExists_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bool create_if_not_exists = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearCreateIfNotExists() {
        
        createIfNotExists_ = false;
        onChanged();
        return this;
      }

      private io.greptime.v1.Common.ExpireAfter expireAfter_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.ExpireAfter, io.greptime.v1.Common.ExpireAfter.Builder, io.greptime.v1.Common.ExpireAfterOrBuilder> expireAfterBuilder_;
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       * @return Whether the expireAfter field is set.
       */
      public boolean hasExpireAfter() {
        return expireAfterBuilder_ != null || expireAfter_ != null;
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       * @return The expireAfter.
       */
      public io.greptime.v1.Common.ExpireAfter getExpireAfter() {
        if (expireAfterBuilder_ == null) {
          return expireAfter_ == null ? io.greptime.v1.Common.ExpireAfter.getDefaultInstance() : expireAfter_;
        } else {
          return expireAfterBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public Builder setExpireAfter(io.greptime.v1.Common.ExpireAfter value) {
        if (expireAfterBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          expireAfter_ = value;
          onChanged();
        } else {
          expireAfterBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public Builder setExpireAfter(
          io.greptime.v1.Common.ExpireAfter.Builder builderForValue) {
        if (expireAfterBuilder_ == null) {
          expireAfter_ = builderForValue.build();
          onChanged();
        } else {
          expireAfterBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public Builder mergeExpireAfter(io.greptime.v1.Common.ExpireAfter value) {
        if (expireAfterBuilder_ == null) {
          if (expireAfter_ != null) {
            expireAfter_ =
              io.greptime.v1.Common.ExpireAfter.newBuilder(expireAfter_).mergeFrom(value).buildPartial();
          } else {
            expireAfter_ = value;
          }
          onChanged();
        } else {
          expireAfterBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public Builder clearExpireAfter() {
        if (expireAfterBuilder_ == null) {
          expireAfter_ = null;
          onChanged();
        } else {
          expireAfter_ = null;
          expireAfterBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public io.greptime.v1.Common.ExpireAfter.Builder getExpireAfterBuilder() {
        
        onChanged();
        return getExpireAfterFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      public io.greptime.v1.Common.ExpireAfterOrBuilder getExpireAfterOrBuilder() {
        if (expireAfterBuilder_ != null) {
          return expireAfterBuilder_.getMessageOrBuilder();
        } else {
          return expireAfter_ == null ?
              io.greptime.v1.Common.ExpireAfter.getDefaultInstance() : expireAfter_;
        }
      }
      /**
       * <pre>
       * Expire data older than the given duration seconds.
       * </pre>
       *
       * <code>.greptime.v1.ExpireAfter expire_after = 5;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Common.ExpireAfter, io.greptime.v1.Common.ExpireAfter.Builder, io.greptime.v1.Common.ExpireAfterOrBuilder> 
          getExpireAfterFieldBuilder() {
        if (expireAfterBuilder_ == null) {
          expireAfterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Common.ExpireAfter, io.greptime.v1.Common.ExpireAfter.Builder, io.greptime.v1.Common.ExpireAfterOrBuilder>(
                  getExpireAfter(),
                  getParentForChildren(),
                  isClean());
          expireAfter_ = null;
        }
        return expireAfterBuilder_;
      }

      private java.lang.Object comment_ = "";
      /**
       * <code>string comment = 6;</code>
       * @return The comment.
       */
      public java.lang.String getComment() {
        java.lang.Object ref = comment_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          comment_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string comment = 6;</code>
       * @return The bytes for comment.
       */
      public com.google.protobuf.ByteString
          getCommentBytes() {
        java.lang.Object ref = comment_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          comment_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string comment = 6;</code>
       * @param value The comment to set.
       * @return This builder for chaining.
       */
      public Builder setComment(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        comment_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string comment = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearComment() {
        
        comment_ = getDefaultInstance().getComment();
        onChanged();
        return this;
      }
      /**
       * <code>string comment = 6;</code>
       * @param value The bytes for comment to set.
       * @return This builder for chaining.
       */
      public Builder setCommentBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        comment_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object sql_ = "";
      /**
       * <code>string sql = 7;</code>
       * @return The sql.
       */
      public java.lang.String getSql() {
        java.lang.Object ref = sql_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          sql_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string sql = 7;</code>
       * @return The bytes for sql.
       */
      public com.google.protobuf.ByteString
          getSqlBytes() {
        java.lang.Object ref = sql_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          sql_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string sql = 7;</code>
       * @param value The sql to set.
       * @return This builder for chaining.
       */
      public Builder setSql(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        sql_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string sql = 7;</code>
       * @return This builder for chaining.
       */
      public Builder clearSql() {
        
        sql_ = getDefaultInstance().getSql();
        onChanged();
        return this;
      }
      /**
       * <code>string sql = 7;</code>
       * @param value The bytes for sql to set.
       * @return This builder for chaining.
       */
      public Builder setSqlBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        sql_ = value;
        onChanged();
        return this;
      }

      private com.google.protobuf.MapField<
          java.lang.String, java.lang.String> flowOptions_;
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetFlowOptions() {
        if (flowOptions_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              FlowOptionsDefaultEntryHolder.defaultEntry);
        }
        return flowOptions_;
      }
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetMutableFlowOptions() {
        onChanged();;
        if (flowOptions_ == null) {
          flowOptions_ = com.google.protobuf.MapField.newMapField(
              FlowOptionsDefaultEntryHolder.defaultEntry);
        }
        if (!flowOptions_.isMutable()) {
          flowOptions_ = flowOptions_.copy();
        }
        return flowOptions_;
      }

      public int getFlowOptionsCount() {
        return internalGetFlowOptions().getMap().size();
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */

      @java.lang.Override
      public boolean containsFlowOptions(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        return internalGetFlowOptions().getMap().containsKey(key);
      }
      /**
       * Use {@link #getFlowOptionsMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String> getFlowOptions() {
        return getFlowOptionsMap();
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */
      @java.lang.Override

      public java.util.Map<java.lang.String, java.lang.String> getFlowOptionsMap() {
        return internalGetFlowOptions().getMap();
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */
      @java.lang.Override

      public java.lang.String getFlowOptionsOrDefault(
          java.lang.String key,
          java.lang.String defaultValue) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetFlowOptions().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */
      @java.lang.Override

      public java.lang.String getFlowOptionsOrThrow(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetFlowOptions().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }

      public Builder clearFlowOptions() {
        internalGetMutableFlowOptions().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */

      public Builder removeFlowOptions(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        internalGetMutableFlowOptions().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String>
      getMutableFlowOptions() {
        return internalGetMutableFlowOptions().getMutableMap();
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */
      public Builder putFlowOptions(
          java.lang.String key,
          java.lang.String value) {
        if (key == null) { throw new NullPointerException("map key"); }
        if (value == null) {
  throw new NullPointerException("map value");
}

        internalGetMutableFlowOptions().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; flow_options = 8;</code>
       */

      public Builder putAllFlowOptions(
          java.util.Map<java.lang.String, java.lang.String> values) {
        internalGetMutableFlowOptions().getMutableMap()
            .putAll(values);
        return this;
      }

      private boolean orReplace_ ;
      /**
       * <pre>
       * Set to true if the flow should be created or replaced.
       * </pre>
       *
       * <code>bool or_replace = 9;</code>
       * @return The orReplace.
       */
      @java.lang.Override
      public boolean getOrReplace() {
        return orReplace_;
      }
      /**
       * <pre>
       * Set to true if the flow should be created or replaced.
       * </pre>
       *
       * <code>bool or_replace = 9;</code>
       * @param value The orReplace to set.
       * @return This builder for chaining.
       */
      public Builder setOrReplace(boolean value) {
        
        orReplace_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Set to true if the flow should be created or replaced.
       * </pre>
       *
       * <code>bool or_replace = 9;</code>
       * @return This builder for chaining.
       */
      public Builder clearOrReplace() {
        
        orReplace_ = false;
        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.flow.CreateRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.CreateRequest)
    private static final io.greptime.v1.flow.Server.CreateRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.CreateRequest();
    }

    public static io.greptime.v1.flow.Server.CreateRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.CreateRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface DropRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.DropRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    boolean hasFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    io.greptime.v1.Ddl.FlowId getFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.flow.DropRequest}
   */
  public static final class DropRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.DropRequest)
      DropRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use DropRequest.newBuilder() to construct.
    private DropRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private DropRequest() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private DropRequest(
        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 10: {
              io.greptime.v1.Ddl.FlowId.Builder subBuilder = null;
              if (flowId_ != null) {
                subBuilder = flowId_.toBuilder();
              }
              flowId_ = input.readMessage(io.greptime.v1.Ddl.FlowId.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(flowId_);
                flowId_ = 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 io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_DropRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_DropRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.DropRequest.class, io.greptime.v1.flow.Server.DropRequest.Builder.class);
    }

    public static final int FLOW_ID_FIELD_NUMBER = 1;
    private io.greptime.v1.Ddl.FlowId flowId_;
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    @java.lang.Override
    public boolean hasFlowId() {
      return flowId_ != null;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowId getFlowId() {
      return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
      return getFlowId();
    }

    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 (flowId_ != null) {
        output.writeMessage(1, getFlowId());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (flowId_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getFlowId());
      }
      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 io.greptime.v1.flow.Server.DropRequest)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.DropRequest other = (io.greptime.v1.flow.Server.DropRequest) obj;

      if (hasFlowId() != other.hasFlowId()) return false;
      if (hasFlowId()) {
        if (!getFlowId()
            .equals(other.getFlowId())) 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 (hasFlowId()) {
        hash = (37 * hash) + FLOW_ID_FIELD_NUMBER;
        hash = (53 * hash) + getFlowId().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.DropRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.DropRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.DropRequest 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 io.greptime.v1.flow.Server.DropRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.DropRequest 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 io.greptime.v1.flow.Server.DropRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.DropRequest 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(io.greptime.v1.flow.Server.DropRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.DropRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.DropRequest)
        io.greptime.v1.flow.Server.DropRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_DropRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_DropRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.DropRequest.class, io.greptime.v1.flow.Server.DropRequest.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.DropRequest.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();
        if (flowIdBuilder_ == null) {
          flowId_ = null;
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_DropRequest_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.DropRequest getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.DropRequest.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.DropRequest build() {
        io.greptime.v1.flow.Server.DropRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.DropRequest buildPartial() {
        io.greptime.v1.flow.Server.DropRequest result = new io.greptime.v1.flow.Server.DropRequest(this);
        if (flowIdBuilder_ == null) {
          result.flowId_ = flowId_;
        } else {
          result.flowId_ = flowIdBuilder_.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 io.greptime.v1.flow.Server.DropRequest) {
          return mergeFrom((io.greptime.v1.flow.Server.DropRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.DropRequest other) {
        if (other == io.greptime.v1.flow.Server.DropRequest.getDefaultInstance()) return this;
        if (other.hasFlowId()) {
          mergeFlowId(other.getFlowId());
        }
        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 {
        io.greptime.v1.flow.Server.DropRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.DropRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private io.greptime.v1.Ddl.FlowId flowId_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> flowIdBuilder_;
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return Whether the flowId field is set.
       */
      public boolean hasFlowId() {
        return flowIdBuilder_ != null || flowId_ != null;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return The flowId.
       */
      public io.greptime.v1.Ddl.FlowId getFlowId() {
        if (flowIdBuilder_ == null) {
          return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        } else {
          return flowIdBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          flowId_ = value;
          onChanged();
        } else {
          flowIdBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(
          io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (flowIdBuilder_ == null) {
          flowId_ = builderForValue.build();
          onChanged();
        } else {
          flowIdBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder mergeFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (flowId_ != null) {
            flowId_ =
              io.greptime.v1.Ddl.FlowId.newBuilder(flowId_).mergeFrom(value).buildPartial();
          } else {
            flowId_ = value;
          }
          onChanged();
        } else {
          flowIdBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder clearFlowId() {
        if (flowIdBuilder_ == null) {
          flowId_ = null;
          onChanged();
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder getFlowIdBuilder() {
        
        onChanged();
        return getFlowIdFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
        if (flowIdBuilder_ != null) {
          return flowIdBuilder_.getMessageOrBuilder();
        } else {
          return flowId_ == null ?
              io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> 
          getFlowIdFieldBuilder() {
        if (flowIdBuilder_ == null) {
          flowIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder>(
                  getFlowId(),
                  getParentForChildren(),
                  isClean());
          flowId_ = null;
        }
        return flowIdBuilder_;
      }
      @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.flow.DropRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.DropRequest)
    private static final io.greptime.v1.flow.Server.DropRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.DropRequest();
    }

    public static io.greptime.v1.flow.Server.DropRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.DropRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface FlushFlowOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.flow.FlushFlow)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    boolean hasFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    io.greptime.v1.Ddl.FlowId getFlowId();
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.flow.FlushFlow}
   */
  public static final class FlushFlow extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.flow.FlushFlow)
      FlushFlowOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FlushFlow.newBuilder() to construct.
    private FlushFlow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FlushFlow() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FlushFlow(
        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 10: {
              io.greptime.v1.Ddl.FlowId.Builder subBuilder = null;
              if (flowId_ != null) {
                subBuilder = flowId_.toBuilder();
              }
              flowId_ = input.readMessage(io.greptime.v1.Ddl.FlowId.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(flowId_);
                flowId_ = 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 io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlushFlow_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlushFlow_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.flow.Server.FlushFlow.class, io.greptime.v1.flow.Server.FlushFlow.Builder.class);
    }

    public static final int FLOW_ID_FIELD_NUMBER = 1;
    private io.greptime.v1.Ddl.FlowId flowId_;
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return Whether the flowId field is set.
     */
    @java.lang.Override
    public boolean hasFlowId() {
      return flowId_ != null;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     * @return The flowId.
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowId getFlowId() {
      return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
    }
    /**
     * <code>.greptime.v1.FlowId flow_id = 1;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
      return getFlowId();
    }

    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 (flowId_ != null) {
        output.writeMessage(1, getFlowId());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (flowId_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getFlowId());
      }
      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 io.greptime.v1.flow.Server.FlushFlow)) {
        return super.equals(obj);
      }
      io.greptime.v1.flow.Server.FlushFlow other = (io.greptime.v1.flow.Server.FlushFlow) obj;

      if (hasFlowId() != other.hasFlowId()) return false;
      if (hasFlowId()) {
        if (!getFlowId()
            .equals(other.getFlowId())) 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 (hasFlowId()) {
        hash = (37 * hash) + FLOW_ID_FIELD_NUMBER;
        hash = (53 * hash) + getFlowId().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.greptime.v1.flow.Server.FlushFlow parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlushFlow 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 io.greptime.v1.flow.Server.FlushFlow parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlushFlow 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 io.greptime.v1.flow.Server.FlushFlow parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.greptime.v1.flow.Server.FlushFlow 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(io.greptime.v1.flow.Server.FlushFlow prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code greptime.v1.flow.FlushFlow}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.flow.FlushFlow)
        io.greptime.v1.flow.Server.FlushFlowOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlushFlow_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlushFlow_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.flow.Server.FlushFlow.class, io.greptime.v1.flow.Server.FlushFlow.Builder.class);
      }

      // Construct using io.greptime.v1.flow.Server.FlushFlow.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();
        if (flowIdBuilder_ == null) {
          flowId_ = null;
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlushFlow_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() {
        return io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlushFlow build() {
        io.greptime.v1.flow.Server.FlushFlow result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.flow.Server.FlushFlow buildPartial() {
        io.greptime.v1.flow.Server.FlushFlow result = new io.greptime.v1.flow.Server.FlushFlow(this);
        if (flowIdBuilder_ == null) {
          result.flowId_ = flowId_;
        } else {
          result.flowId_ = flowIdBuilder_.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 io.greptime.v1.flow.Server.FlushFlow) {
          return mergeFrom((io.greptime.v1.flow.Server.FlushFlow)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.flow.Server.FlushFlow other) {
        if (other == io.greptime.v1.flow.Server.FlushFlow.getDefaultInstance()) return this;
        if (other.hasFlowId()) {
          mergeFlowId(other.getFlowId());
        }
        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 {
        io.greptime.v1.flow.Server.FlushFlow parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.flow.Server.FlushFlow) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private io.greptime.v1.Ddl.FlowId flowId_;
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> flowIdBuilder_;
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return Whether the flowId field is set.
       */
      public boolean hasFlowId() {
        return flowIdBuilder_ != null || flowId_ != null;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       * @return The flowId.
       */
      public io.greptime.v1.Ddl.FlowId getFlowId() {
        if (flowIdBuilder_ == null) {
          return flowId_ == null ? io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        } else {
          return flowIdBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          flowId_ = value;
          onChanged();
        } else {
          flowIdBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder setFlowId(
          io.greptime.v1.Ddl.FlowId.Builder builderForValue) {
        if (flowIdBuilder_ == null) {
          flowId_ = builderForValue.build();
          onChanged();
        } else {
          flowIdBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder mergeFlowId(io.greptime.v1.Ddl.FlowId value) {
        if (flowIdBuilder_ == null) {
          if (flowId_ != null) {
            flowId_ =
              io.greptime.v1.Ddl.FlowId.newBuilder(flowId_).mergeFrom(value).buildPartial();
          } else {
            flowId_ = value;
          }
          onChanged();
        } else {
          flowIdBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public Builder clearFlowId() {
        if (flowIdBuilder_ == null) {
          flowId_ = null;
          onChanged();
        } else {
          flowId_ = null;
          flowIdBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowId.Builder getFlowIdBuilder() {
        
        onChanged();
        return getFlowIdFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      public io.greptime.v1.Ddl.FlowIdOrBuilder getFlowIdOrBuilder() {
        if (flowIdBuilder_ != null) {
          return flowIdBuilder_.getMessageOrBuilder();
        } else {
          return flowId_ == null ?
              io.greptime.v1.Ddl.FlowId.getDefaultInstance() : flowId_;
        }
      }
      /**
       * <code>.greptime.v1.FlowId flow_id = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder> 
          getFlowIdFieldBuilder() {
        if (flowIdBuilder_ == null) {
          flowIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Ddl.FlowId, io.greptime.v1.Ddl.FlowId.Builder, io.greptime.v1.Ddl.FlowIdOrBuilder>(
                  getFlowId(),
                  getParentForChildren(),
                  isClean());
          flowId_ = null;
        }
        return flowIdBuilder_;
      }
      @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.flow.FlushFlow)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.flow.FlushFlow)
    private static final io.greptime.v1.flow.Server.FlushFlow DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.flow.Server.FlushFlow();
    }

    public static io.greptime.v1.flow.Server.FlushFlow getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlowRequestHeader_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlowRequestHeader_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_InsertRequests_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_InsertRequests_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_InsertRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_InsertRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlowRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlowRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlowResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_CreateRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_DropRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_DropRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_flow_FlushFlow_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_flow_FlushFlow_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\035greptime/v1/flow/server.proto\022\020greptim" +
      "e.v1.flow\032\030greptime/v1/common.proto\032\025gre" +
      "ptime/v1/ddl.proto\032\025greptime/v1/row.prot" +
      "o\"\316\001\n\021FlowRequestHeader\022P\n\017tracing_conte" +
      "xt\030\001 \003(\01327.greptime.v1.flow.FlowRequestH" +
      "eader.TracingContextEntry\0220\n\rquery_conte" +
      "xt\030\002 \001(\0132\031.greptime.v1.QueryContext\0325\n\023T" +
      "racingContextEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" +
      "\030\002 \001(\t:\0028\001\"C\n\016InsertRequests\0221\n\010requests" +
      "\030\001 \003(\0132\037.greptime.v1.flow.InsertRequest\"" +
      "C\n\rInsertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004r" +
      "ows\030\002 \001(\0132\021.greptime.v1.Rows\"\332\001\n\013FlowReq" +
      "uest\0223\n\006header\030@ \001(\0132#.greptime.v1.flow." +
      "FlowRequestHeader\0221\n\006create\030\001 \001(\0132\037.grep" +
      "time.v1.flow.CreateRequestH\000\022-\n\004drop\030\002 \001" +
      "(\0132\035.greptime.v1.flow.DropRequestH\000\022,\n\005f" +
      "lush\030\003 \001(\0132\033.greptime.v1.flow.FlushFlowH" +
      "\000B\006\n\004body\"\366\001\n\014FlowResponse\022+\n\006header\030\001 \001" +
      "(\0132\033.greptime.v1.ResponseHeader\022\025\n\raffec" +
      "ted_rows\030\002 \001(\004\022+\n\016affected_flows\030\003 \003(\0132\023" +
      ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" +
      "..greptime.v1.flow.FlowResponse.Extensio" +
      "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" +
      "\r\n\005value\030\002 \001(\014:\0028\001\"\222\003\n\rCreateRequest\022$\n\007" +
      "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" +
      "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" +
      "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" +
      "1.TableName\022\034\n\024create_if_not_exists\030\004 \001(" +
      "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" +
      "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" +
      "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" +
      ".CreateRequest.FlowOptionsEntry\022\022\n\nor_re" +
      "place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001" +
      " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$" +
      "\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t" +
      "FlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1" +
      ".FlowId2\264\001\n\004Flow\022S\n\022HandleCreateRemove\022\035" +
      ".greptime.v1.flow.FlowRequest\032\036.greptime" +
      ".v1.flow.FlowResponse\022W\n\023HandleMirrorReq" +
      "uest\022 .greptime.v1.flow.InsertRequests\032\036" +
      ".greptime.v1.flow.FlowResponseBY\n\023io.gre" +
      "ptime.v1.flowB\006ServerZ:github.com/Grepti" +
      "meTeam/greptime-proto/go/greptime/v1/flo" +
      "wb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          io.greptime.v1.Common.getDescriptor(),
          io.greptime.v1.Ddl.getDescriptor(),
          io.greptime.v1.RowData.getDescriptor(),
        });
    internal_static_greptime_v1_flow_FlowRequestHeader_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_greptime_v1_flow_FlowRequestHeader_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlowRequestHeader_descriptor,
        new java.lang.String[] { "TracingContext", "QueryContext", });
    internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_descriptor =
      internal_static_greptime_v1_flow_FlowRequestHeader_descriptor.getNestedTypes().get(0);
    internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlowRequestHeader_TracingContextEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    internal_static_greptime_v1_flow_InsertRequests_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_greptime_v1_flow_InsertRequests_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_InsertRequests_descriptor,
        new java.lang.String[] { "Requests", });
    internal_static_greptime_v1_flow_InsertRequest_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_greptime_v1_flow_InsertRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_InsertRequest_descriptor,
        new java.lang.String[] { "RegionId", "Rows", });
    internal_static_greptime_v1_flow_FlowRequest_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_greptime_v1_flow_FlowRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlowRequest_descriptor,
        new java.lang.String[] { "Header", "Create", "Drop", "Flush", "Body", });
    internal_static_greptime_v1_flow_FlowResponse_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlowResponse_descriptor,
        new java.lang.String[] { "Header", "AffectedRows", "AffectedFlows", "Extensions", });
    internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor =
      internal_static_greptime_v1_flow_FlowResponse_descriptor.getNestedTypes().get(0);
    internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    internal_static_greptime_v1_flow_CreateRequest_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_CreateRequest_descriptor,
        new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "OrReplace", });
    internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor =
      internal_static_greptime_v1_flow_CreateRequest_descriptor.getNestedTypes().get(0);
    internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    internal_static_greptime_v1_flow_DropRequest_descriptor =
      getDescriptor().getMessageTypes().get(6);
    internal_static_greptime_v1_flow_DropRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_DropRequest_descriptor,
        new java.lang.String[] { "FlowId", });
    internal_static_greptime_v1_flow_FlushFlow_descriptor =
      getDescriptor().getMessageTypes().get(7);
    internal_static_greptime_v1_flow_FlushFlow_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_flow_FlushFlow_descriptor,
        new java.lang.String[] { "FlowId", });
    io.greptime.v1.Common.getDescriptor();
    io.greptime.v1.Ddl.getDescriptor();
    io.greptime.v1.RowData.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
