From 878da07051d19f2a78c1b6b030ee861b4931abd9 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Wed, 31 Jan 2024 09:55:52 +0800 Subject: [PATCH] fix: forgot java Procedure --- .../main/java/greptime/v1/meta/Procedure.java | 1915 +++++++++++++++++ 1 file changed, 1915 insertions(+) create mode 100644 java/src/main/java/greptime/v1/meta/Procedure.java diff --git a/java/src/main/java/greptime/v1/meta/Procedure.java b/java/src/main/java/greptime/v1/meta/Procedure.java new file mode 100644 index 00000000..3430606b --- /dev/null +++ b/java/src/main/java/greptime/v1/meta/Procedure.java @@ -0,0 +1,1915 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/meta/procedure.proto + +package greptime.v1.meta; + +public final class Procedure { + private Procedure() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code greptime.v1.meta.ProcedureStatus} + */ + public enum ProcedureStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Running = 0; + */ + Running(0), + /** + * Done = 1; + */ + Done(1), + /** + * Retrying = 2; + */ + Retrying(2), + /** + * Failed = 3; + */ + Failed(3), + UNRECOGNIZED(-1), + ; + + /** + * Running = 0; + */ + public static final int Running_VALUE = 0; + /** + * Done = 1; + */ + public static final int Done_VALUE = 1; + /** + * Retrying = 2; + */ + public static final int Retrying_VALUE = 2; + /** + * Failed = 3; + */ + public static final int Failed_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcedureStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProcedureStatus forNumber(int value) { + switch (value) { + case 0: return Running; + case 1: return Done; + case 2: return Retrying; + case 3: return Failed; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ProcedureStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProcedureStatus findValueByNumber(int number) { + return ProcedureStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return greptime.v1.meta.Procedure.getDescriptor().getEnumTypes().get(0); + } + + private static final ProcedureStatus[] VALUES = values(); + + public static ProcedureStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProcedureStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:greptime.v1.meta.ProcedureStatus) + } + + public interface QueryProcedureRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.meta.QueryProcedureRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return The header. + */ + greptime.v1.meta.Common.RequestHeader getHeader(); + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return Whether the pid field is set. + */ + boolean hasPid(); + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return The pid. + */ + greptime.v1.meta.Common.ProcedureId getPid(); + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + greptime.v1.meta.Common.ProcedureIdOrBuilder getPidOrBuilder(); + } + /** + * Protobuf type {@code greptime.v1.meta.QueryProcedureRequest} + */ + public static final class QueryProcedureRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.meta.QueryProcedureRequest) + QueryProcedureRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryProcedureRequest.newBuilder() to construct. + private QueryProcedureRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryProcedureRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryProcedureRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryProcedureRequest( + 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: { + greptime.v1.meta.Common.RequestHeader.Builder subBuilder = null; + if (header_ != null) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(greptime.v1.meta.Common.RequestHeader.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + greptime.v1.meta.Common.ProcedureId.Builder subBuilder = null; + if (pid_ != null) { + subBuilder = pid_.toBuilder(); + } + pid_ = input.readMessage(greptime.v1.meta.Common.ProcedureId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pid_); + pid_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_QueryProcedureRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_QueryProcedureRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Procedure.QueryProcedureRequest.class, greptime.v1.meta.Procedure.QueryProcedureRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private greptime.v1.meta.Common.RequestHeader header_; + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return The header. + */ + @java.lang.Override + public greptime.v1.meta.Common.RequestHeader getHeader() { + return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + @java.lang.Override + public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int PID_FIELD_NUMBER = 2; + private greptime.v1.meta.Common.ProcedureId pid_; + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return Whether the pid field is set. + */ + @java.lang.Override + public boolean hasPid() { + return pid_ != null; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return The pid. + */ + @java.lang.Override + public greptime.v1.meta.Common.ProcedureId getPid() { + return pid_ == null ? greptime.v1.meta.Common.ProcedureId.getDefaultInstance() : pid_; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + @java.lang.Override + public greptime.v1.meta.Common.ProcedureIdOrBuilder getPidOrBuilder() { + return getPid(); + } + + 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 (pid_ != null) { + output.writeMessage(2, getPid()); + } + 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 (pid_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.meta.Procedure.QueryProcedureRequest)) { + return super.equals(obj); + } + greptime.v1.meta.Procedure.QueryProcedureRequest other = (greptime.v1.meta.Procedure.QueryProcedureRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader() + .equals(other.getHeader())) return false; + } + if (hasPid() != other.hasPid()) return false; + if (hasPid()) { + if (!getPid() + .equals(other.getPid())) 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(); + } + if (hasPid()) { + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + getPid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.QueryProcedureRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.meta.Procedure.QueryProcedureRequest 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.meta.QueryProcedureRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.meta.QueryProcedureRequest) + greptime.v1.meta.Procedure.QueryProcedureRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_QueryProcedureRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_QueryProcedureRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Procedure.QueryProcedureRequest.class, greptime.v1.meta.Procedure.QueryProcedureRequest.Builder.class); + } + + // Construct using greptime.v1.meta.Procedure.QueryProcedureRequest.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; + } + if (pidBuilder_ == null) { + pid_ = null; + } else { + pid_ = null; + pidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_QueryProcedureRequest_descriptor; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.QueryProcedureRequest getDefaultInstanceForType() { + return greptime.v1.meta.Procedure.QueryProcedureRequest.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.meta.Procedure.QueryProcedureRequest build() { + greptime.v1.meta.Procedure.QueryProcedureRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.QueryProcedureRequest buildPartial() { + greptime.v1.meta.Procedure.QueryProcedureRequest result = new greptime.v1.meta.Procedure.QueryProcedureRequest(this); + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + if (pidBuilder_ == null) { + result.pid_ = pid_; + } else { + result.pid_ = pidBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.meta.Procedure.QueryProcedureRequest) { + return mergeFrom((greptime.v1.meta.Procedure.QueryProcedureRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.meta.Procedure.QueryProcedureRequest other) { + if (other == greptime.v1.meta.Procedure.QueryProcedureRequest.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.hasPid()) { + mergePid(other.getPid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.meta.Procedure.QueryProcedureRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.meta.Procedure.QueryProcedureRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private greptime.v1.meta.Common.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> headerBuilder_; + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + * @return The header. + */ + public greptime.v1.meta.Common.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public Builder setHeader(greptime.v1.meta.Common.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public Builder setHeader( + greptime.v1.meta.Common.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public Builder mergeHeader(greptime.v1.meta.Common.RequestHeader value) { + if (headerBuilder_ == null) { + if (header_ != null) { + header_ = + greptime.v1.meta.Common.RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + onChanged(); + } else { + headerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public greptime.v1.meta.Common.RequestHeader.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; + } + } + /** + * .greptime.v1.meta.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder>( + getHeader(), + getParentForChildren(), + isClean()); + header_ = null; + } + return headerBuilder_; + } + + private greptime.v1.meta.Common.ProcedureId pid_; + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ProcedureId, greptime.v1.meta.Common.ProcedureId.Builder, greptime.v1.meta.Common.ProcedureIdOrBuilder> pidBuilder_; + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return Whether the pid field is set. + */ + public boolean hasPid() { + return pidBuilder_ != null || pid_ != null; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + * @return The pid. + */ + public greptime.v1.meta.Common.ProcedureId getPid() { + if (pidBuilder_ == null) { + return pid_ == null ? greptime.v1.meta.Common.ProcedureId.getDefaultInstance() : pid_; + } else { + return pidBuilder_.getMessage(); + } + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public Builder setPid(greptime.v1.meta.Common.ProcedureId value) { + if (pidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pid_ = value; + onChanged(); + } else { + pidBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public Builder setPid( + greptime.v1.meta.Common.ProcedureId.Builder builderForValue) { + if (pidBuilder_ == null) { + pid_ = builderForValue.build(); + onChanged(); + } else { + pidBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public Builder mergePid(greptime.v1.meta.Common.ProcedureId value) { + if (pidBuilder_ == null) { + if (pid_ != null) { + pid_ = + greptime.v1.meta.Common.ProcedureId.newBuilder(pid_).mergeFrom(value).buildPartial(); + } else { + pid_ = value; + } + onChanged(); + } else { + pidBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public Builder clearPid() { + if (pidBuilder_ == null) { + pid_ = null; + onChanged(); + } else { + pid_ = null; + pidBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public greptime.v1.meta.Common.ProcedureId.Builder getPidBuilder() { + + onChanged(); + return getPidFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + public greptime.v1.meta.Common.ProcedureIdOrBuilder getPidOrBuilder() { + if (pidBuilder_ != null) { + return pidBuilder_.getMessageOrBuilder(); + } else { + return pid_ == null ? + greptime.v1.meta.Common.ProcedureId.getDefaultInstance() : pid_; + } + } + /** + * .greptime.v1.meta.ProcedureId pid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ProcedureId, greptime.v1.meta.Common.ProcedureId.Builder, greptime.v1.meta.Common.ProcedureIdOrBuilder> + getPidFieldBuilder() { + if (pidBuilder_ == null) { + pidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ProcedureId, greptime.v1.meta.Common.ProcedureId.Builder, greptime.v1.meta.Common.ProcedureIdOrBuilder>( + getPid(), + getParentForChildren(), + isClean()); + pid_ = null; + } + return pidBuilder_; + } + @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.meta.QueryProcedureRequest) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.QueryProcedureRequest) + private static final greptime.v1.meta.Procedure.QueryProcedureRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.meta.Procedure.QueryProcedureRequest(); + } + + public static greptime.v1.meta.Procedure.QueryProcedureRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryProcedureRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryProcedureRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.QueryProcedureRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProcedureStateResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.meta.ProcedureStateResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return The header. + */ + greptime.v1.meta.Common.ResponseHeader getHeader(); + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder(); + + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The status. + */ + greptime.v1.meta.Procedure.ProcedureStatus getStatus(); + + /** + * string error = 3; + * @return The error. + */ + java.lang.String getError(); + /** + * string error = 3; + * @return The bytes for error. + */ + com.google.protobuf.ByteString + getErrorBytes(); + } + /** + * Protobuf type {@code greptime.v1.meta.ProcedureStateResponse} + */ + public static final class ProcedureStateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.meta.ProcedureStateResponse) + ProcedureStateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcedureStateResponse.newBuilder() to construct. + private ProcedureStateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProcedureStateResponse() { + status_ = 0; + error_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProcedureStateResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProcedureStateResponse( + 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: { + greptime.v1.meta.Common.ResponseHeader.Builder subBuilder = null; + if (header_ != null) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(greptime.v1.meta.Common.ResponseHeader.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + error_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_ProcedureStateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_ProcedureStateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Procedure.ProcedureStateResponse.class, greptime.v1.meta.Procedure.ProcedureStateResponse.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private greptime.v1.meta.Common.ResponseHeader header_; + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return The header. + */ + @java.lang.Override + public greptime.v1.meta.Common.ResponseHeader getHeader() { + return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + @java.lang.Override + public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_; + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The status. + */ + @java.lang.Override public greptime.v1.meta.Procedure.ProcedureStatus getStatus() { + @SuppressWarnings("deprecation") + greptime.v1.meta.Procedure.ProcedureStatus result = greptime.v1.meta.Procedure.ProcedureStatus.valueOf(status_); + return result == null ? greptime.v1.meta.Procedure.ProcedureStatus.UNRECOGNIZED : result; + } + + public static final int ERROR_FIELD_NUMBER = 3; + private volatile java.lang.Object error_; + /** + * string error = 3; + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + 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(); + error_ = s; + return s; + } + } + /** + * string error = 3; + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (status_ != greptime.v1.meta.Procedure.ProcedureStatus.Running.getNumber()) { + output.writeEnum(2, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, error_); + } + 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 (status_ != greptime.v1.meta.Procedure.ProcedureStatus.Running.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, error_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.meta.Procedure.ProcedureStateResponse)) { + return super.equals(obj); + } + greptime.v1.meta.Procedure.ProcedureStateResponse other = (greptime.v1.meta.Procedure.ProcedureStateResponse) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader() + .equals(other.getHeader())) return false; + } + if (status_ != other.status_) return false; + if (!getError() + .equals(other.getError())) 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) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Procedure.ProcedureStateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.meta.Procedure.ProcedureStateResponse 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.meta.ProcedureStateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.meta.ProcedureStateResponse) + greptime.v1.meta.Procedure.ProcedureStateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_ProcedureStateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_ProcedureStateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Procedure.ProcedureStateResponse.class, greptime.v1.meta.Procedure.ProcedureStateResponse.Builder.class); + } + + // Construct using greptime.v1.meta.Procedure.ProcedureStateResponse.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; + } + status_ = 0; + + error_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.meta.Procedure.internal_static_greptime_v1_meta_ProcedureStateResponse_descriptor; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.ProcedureStateResponse getDefaultInstanceForType() { + return greptime.v1.meta.Procedure.ProcedureStateResponse.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.meta.Procedure.ProcedureStateResponse build() { + greptime.v1.meta.Procedure.ProcedureStateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.ProcedureStateResponse buildPartial() { + greptime.v1.meta.Procedure.ProcedureStateResponse result = new greptime.v1.meta.Procedure.ProcedureStateResponse(this); + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + result.status_ = status_; + result.error_ = error_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.meta.Procedure.ProcedureStateResponse) { + return mergeFrom((greptime.v1.meta.Procedure.ProcedureStateResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.meta.Procedure.ProcedureStateResponse other) { + if (other == greptime.v1.meta.Procedure.ProcedureStateResponse.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.meta.Procedure.ProcedureStateResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.meta.Procedure.ProcedureStateResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private greptime.v1.meta.Common.ResponseHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> headerBuilder_; + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + * @return The header. + */ + public greptime.v1.meta.Common.ResponseHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public Builder setHeader(greptime.v1.meta.Common.ResponseHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public Builder setHeader( + greptime.v1.meta.Common.ResponseHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public Builder mergeHeader(greptime.v1.meta.Common.ResponseHeader value) { + if (headerBuilder_ == null) { + if (header_ != null) { + header_ = + greptime.v1.meta.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + onChanged(); + } else { + headerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public greptime.v1.meta.Common.ResponseHeader.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; + } + } + /** + * .greptime.v1.meta.ResponseHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder>( + getHeader(), + getParentForChildren(), + isClean()); + header_ = null; + } + return headerBuilder_; + } + + private int status_ = 0; + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return The status. + */ + @java.lang.Override + public greptime.v1.meta.Procedure.ProcedureStatus getStatus() { + @SuppressWarnings("deprecation") + greptime.v1.meta.Procedure.ProcedureStatus result = greptime.v1.meta.Procedure.ProcedureStatus.valueOf(status_); + return result == null ? greptime.v1.meta.Procedure.ProcedureStatus.UNRECOGNIZED : result; + } + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(greptime.v1.meta.Procedure.ProcedureStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .greptime.v1.meta.ProcedureStatus status = 2; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + * string error = 3; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string error = 3; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string error = 3; + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + error_ = value; + onChanged(); + return this; + } + /** + * string error = 3; + * @return This builder for chaining. + */ + public Builder clearError() { + + error_ = getDefaultInstance().getError(); + onChanged(); + return this; + } + /** + * string error = 3; + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + error_ = value; + 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.meta.ProcedureStateResponse) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.ProcedureStateResponse) + private static final greptime.v1.meta.Procedure.ProcedureStateResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.meta.Procedure.ProcedureStateResponse(); + } + + public static greptime.v1.meta.Procedure.ProcedureStateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcedureStateResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProcedureStateResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.meta.Procedure.ProcedureStateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_meta_QueryProcedureRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_QueryProcedureRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_meta_ProcedureStateResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_ProcedureStateResponse_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 greptime/v1/meta/procedure.proto\022\020grep" + + "time.v1.meta\032\035greptime/v1/meta/common.pr" + + "oto\032\032greptime/v1/meta/ddl.proto\032\035greptim" + + "e/v1/meta/region.proto\"t\n\025QueryProcedure" + + "Request\022/\n\006header\030\001 \001(\0132\037.greptime.v1.me" + + "ta.RequestHeader\022*\n\003pid\030\002 \001(\0132\035.greptime" + + ".v1.meta.ProcedureId\"\214\001\n\026ProcedureStateR" + + "esponse\0220\n\006header\030\001 \001(\0132 .greptime.v1.me" + + "ta.ResponseHeader\0221\n\006status\030\002 \001(\0162!.grep" + + "time.v1.meta.ProcedureStatus\022\r\n\005error\030\003 " + + "\001(\t*B\n\017ProcedureStatus\022\013\n\007Running\020\000\022\010\n\004D" + + "one\020\001\022\014\n\010Retrying\020\002\022\n\n\006Failed\020\0032\226\002\n\020Proc" + + "edureService\022Z\n\005query\022\'.greptime.v1.meta" + + ".QueryProcedureRequest\032(.greptime.v1.met" + + "a.ProcedureStateResponse\022J\n\003ddl\022 .grepti" + + "me.v1.meta.DdlTaskRequest\032!.greptime.v1." + + "meta.DdlTaskResponse\022Z\n\007migrate\022&.grepti" + + "me.v1.meta.MigrateRegionRequest\032\'.grepti" + + "me.v1.meta.MigrateRegionResponseB