All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.milvus.grpc.ValueField Maven / Gradle / Ivy

There is a newer version: 2.4.8
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: schema.proto

package io.milvus.grpc;

/**
 * Protobuf type {@code milvus.proto.schema.ValueField}
 */
public final class ValueField extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:milvus.proto.schema.ValueField)
    ValueFieldOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ValueField.newBuilder() to construct.
  private ValueField(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ValueField() {
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_ValueField_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_ValueField_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.milvus.grpc.ValueField.class, io.milvus.grpc.ValueField.Builder.class);
  }

  private int dataCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object data_;
  public enum DataCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    BOOL_DATA(1),
    INT_DATA(2),
    LONG_DATA(3),
    FLOAT_DATA(4),
    DOUBLE_DATA(5),
    STRING_DATA(6),
    BYTES_DATA(7),
    DATA_NOT_SET(0);
    private final int value;
    private DataCase(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 DataCase valueOf(int value) {
      return forNumber(value);
    }

    public static DataCase forNumber(int value) {
      switch (value) {
        case 1: return BOOL_DATA;
        case 2: return INT_DATA;
        case 3: return LONG_DATA;
        case 4: return FLOAT_DATA;
        case 5: return DOUBLE_DATA;
        case 6: return STRING_DATA;
        case 7: return BYTES_DATA;
        case 0: return DATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DataCase
  getDataCase() {
    return DataCase.forNumber(
        dataCase_);
  }

  public static final int BOOL_DATA_FIELD_NUMBER = 1;
  /**
   * bool bool_data = 1;
   * @return Whether the boolData field is set.
   */
  @java.lang.Override
  public boolean hasBoolData() {
    return dataCase_ == 1;
  }
  /**
   * bool bool_data = 1;
   * @return The boolData.
   */
  @java.lang.Override
  public boolean getBoolData() {
    if (dataCase_ == 1) {
      return (java.lang.Boolean) data_;
    }
    return false;
  }

  public static final int INT_DATA_FIELD_NUMBER = 2;
  /**
   * int32 int_data = 2;
   * @return Whether the intData field is set.
   */
  @java.lang.Override
  public boolean hasIntData() {
    return dataCase_ == 2;
  }
  /**
   * int32 int_data = 2;
   * @return The intData.
   */
  @java.lang.Override
  public int getIntData() {
    if (dataCase_ == 2) {
      return (java.lang.Integer) data_;
    }
    return 0;
  }

  public static final int LONG_DATA_FIELD_NUMBER = 3;
  /**
   * int64 long_data = 3;
   * @return Whether the longData field is set.
   */
  @java.lang.Override
  public boolean hasLongData() {
    return dataCase_ == 3;
  }
  /**
   * int64 long_data = 3;
   * @return The longData.
   */
  @java.lang.Override
  public long getLongData() {
    if (dataCase_ == 3) {
      return (java.lang.Long) data_;
    }
    return 0L;
  }

  public static final int FLOAT_DATA_FIELD_NUMBER = 4;
  /**
   * float float_data = 4;
   * @return Whether the floatData field is set.
   */
  @java.lang.Override
  public boolean hasFloatData() {
    return dataCase_ == 4;
  }
  /**
   * float float_data = 4;
   * @return The floatData.
   */
  @java.lang.Override
  public float getFloatData() {
    if (dataCase_ == 4) {
      return (java.lang.Float) data_;
    }
    return 0F;
  }

  public static final int DOUBLE_DATA_FIELD_NUMBER = 5;
  /**
   * double double_data = 5;
   * @return Whether the doubleData field is set.
   */
  @java.lang.Override
  public boolean hasDoubleData() {
    return dataCase_ == 5;
  }
  /**
   * double double_data = 5;
   * @return The doubleData.
   */
  @java.lang.Override
  public double getDoubleData() {
    if (dataCase_ == 5) {
      return (java.lang.Double) data_;
    }
    return 0D;
  }

  public static final int STRING_DATA_FIELD_NUMBER = 6;
  /**
   * string string_data = 6;
   * @return Whether the stringData field is set.
   */
  public boolean hasStringData() {
    return dataCase_ == 6;
  }
  /**
   * string string_data = 6;
   * @return The stringData.
   */
  public java.lang.String getStringData() {
    java.lang.Object ref = "";
    if (dataCase_ == 6) {
      ref = data_;
    }
    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();
      if (dataCase_ == 6) {
        data_ = s;
      }
      return s;
    }
  }
  /**
   * string string_data = 6;
   * @return The bytes for stringData.
   */
  public com.google.protobuf.ByteString
      getStringDataBytes() {
    java.lang.Object ref = "";
    if (dataCase_ == 6) {
      ref = data_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (dataCase_ == 6) {
        data_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BYTES_DATA_FIELD_NUMBER = 7;
  /**
   * bytes bytes_data = 7;
   * @return Whether the bytesData field is set.
   */
  @java.lang.Override
  public boolean hasBytesData() {
    return dataCase_ == 7;
  }
  /**
   * bytes bytes_data = 7;
   * @return The bytesData.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getBytesData() {
    if (dataCase_ == 7) {
      return (com.google.protobuf.ByteString) data_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  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 (dataCase_ == 1) {
      output.writeBool(
          1, (boolean)((java.lang.Boolean) data_));
    }
    if (dataCase_ == 2) {
      output.writeInt32(
          2, (int)((java.lang.Integer) data_));
    }
    if (dataCase_ == 3) {
      output.writeInt64(
          3, (long)((java.lang.Long) data_));
    }
    if (dataCase_ == 4) {
      output.writeFloat(
          4, (float)((java.lang.Float) data_));
    }
    if (dataCase_ == 5) {
      output.writeDouble(
          5, (double)((java.lang.Double) data_));
    }
    if (dataCase_ == 6) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, data_);
    }
    if (dataCase_ == 7) {
      output.writeBytes(
          7, (com.google.protobuf.ByteString) data_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (dataCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            1, (boolean)((java.lang.Boolean) data_));
    }
    if (dataCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(
            2, (int)((java.lang.Integer) data_));
    }
    if (dataCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(
            3, (long)((java.lang.Long) data_));
    }
    if (dataCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(
            4, (float)((java.lang.Float) data_));
    }
    if (dataCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(
            5, (double)((java.lang.Double) data_));
    }
    if (dataCase_ == 6) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, data_);
    }
    if (dataCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            7, (com.google.protobuf.ByteString) data_);
    }
    size += getUnknownFields().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.milvus.grpc.ValueField)) {
      return super.equals(obj);
    }
    io.milvus.grpc.ValueField other = (io.milvus.grpc.ValueField) obj;

    if (!getDataCase().equals(other.getDataCase())) return false;
    switch (dataCase_) {
      case 1:
        if (getBoolData()
            != other.getBoolData()) return false;
        break;
      case 2:
        if (getIntData()
            != other.getIntData()) return false;
        break;
      case 3:
        if (getLongData()
            != other.getLongData()) return false;
        break;
      case 4:
        if (java.lang.Float.floatToIntBits(getFloatData())
            != java.lang.Float.floatToIntBits(
                other.getFloatData())) return false;
        break;
      case 5:
        if (java.lang.Double.doubleToLongBits(getDoubleData())
            != java.lang.Double.doubleToLongBits(
                other.getDoubleData())) return false;
        break;
      case 6:
        if (!getStringData()
            .equals(other.getStringData())) return false;
        break;
      case 7:
        if (!getBytesData()
            .equals(other.getBytesData())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (dataCase_) {
      case 1:
        hash = (37 * hash) + BOOL_DATA_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getBoolData());
        break;
      case 2:
        hash = (37 * hash) + INT_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getIntData();
        break;
      case 3:
        hash = (37 * hash) + LONG_DATA_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getLongData());
        break;
      case 4:
        hash = (37 * hash) + FLOAT_DATA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getFloatData());
        break;
      case 5:
        hash = (37 * hash) + DOUBLE_DATA_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            java.lang.Double.doubleToLongBits(getDoubleData()));
        break;
      case 6:
        hash = (37 * hash) + STRING_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getStringData().hashCode();
        break;
      case 7:
        hash = (37 * hash) + BYTES_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getBytesData().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.milvus.grpc.ValueField parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.ValueField parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.milvus.grpc.ValueField parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.ValueField parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.milvus.grpc.ValueField parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.ValueField parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.milvus.grpc.ValueField parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.ValueField 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.milvus.grpc.ValueField parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static io.milvus.grpc.ValueField 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.milvus.grpc.ValueField parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.ValueField 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.milvus.grpc.ValueField 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 milvus.proto.schema.ValueField}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:milvus.proto.schema.ValueField)
      io.milvus.grpc.ValueFieldOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_ValueField_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_ValueField_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.milvus.grpc.ValueField.class, io.milvus.grpc.ValueField.Builder.class);
    }

    // Construct using io.milvus.grpc.ValueField.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      dataCase_ = 0;
      data_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_ValueField_descriptor;
    }

    @java.lang.Override
    public io.milvus.grpc.ValueField getDefaultInstanceForType() {
      return io.milvus.grpc.ValueField.getDefaultInstance();
    }

    @java.lang.Override
    public io.milvus.grpc.ValueField build() {
      io.milvus.grpc.ValueField result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.milvus.grpc.ValueField buildPartial() {
      io.milvus.grpc.ValueField result = new io.milvus.grpc.ValueField(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(io.milvus.grpc.ValueField result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(io.milvus.grpc.ValueField result) {
      result.dataCase_ = dataCase_;
      result.data_ = this.data_;
    }

    @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.milvus.grpc.ValueField) {
        return mergeFrom((io.milvus.grpc.ValueField)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.milvus.grpc.ValueField other) {
      if (other == io.milvus.grpc.ValueField.getDefaultInstance()) return this;
      switch (other.getDataCase()) {
        case BOOL_DATA: {
          setBoolData(other.getBoolData());
          break;
        }
        case INT_DATA: {
          setIntData(other.getIntData());
          break;
        }
        case LONG_DATA: {
          setLongData(other.getLongData());
          break;
        }
        case FLOAT_DATA: {
          setFloatData(other.getFloatData());
          break;
        }
        case DOUBLE_DATA: {
          setDoubleData(other.getDoubleData());
          break;
        }
        case STRING_DATA: {
          dataCase_ = 6;
          data_ = other.data_;
          onChanged();
          break;
        }
        case BYTES_DATA: {
          setBytesData(other.getBytesData());
          break;
        }
        case DATA_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              data_ = input.readBool();
              dataCase_ = 1;
              break;
            } // case 8
            case 16: {
              data_ = input.readInt32();
              dataCase_ = 2;
              break;
            } // case 16
            case 24: {
              data_ = input.readInt64();
              dataCase_ = 3;
              break;
            } // case 24
            case 37: {
              data_ = input.readFloat();
              dataCase_ = 4;
              break;
            } // case 37
            case 41: {
              data_ = input.readDouble();
              dataCase_ = 5;
              break;
            } // case 41
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();
              dataCase_ = 6;
              data_ = s;
              break;
            } // case 50
            case 58: {
              data_ = input.readBytes();
              dataCase_ = 7;
              break;
            } // case 58
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int dataCase_ = 0;
    private java.lang.Object data_;
    public DataCase
        getDataCase() {
      return DataCase.forNumber(
          dataCase_);
    }

    public Builder clearData() {
      dataCase_ = 0;
      data_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    /**
     * bool bool_data = 1;
     * @return Whether the boolData field is set.
     */
    public boolean hasBoolData() {
      return dataCase_ == 1;
    }
    /**
     * bool bool_data = 1;
     * @return The boolData.
     */
    public boolean getBoolData() {
      if (dataCase_ == 1) {
        return (java.lang.Boolean) data_;
      }
      return false;
    }
    /**
     * bool bool_data = 1;
     * @param value The boolData to set.
     * @return This builder for chaining.
     */
    public Builder setBoolData(boolean value) {

      dataCase_ = 1;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * bool bool_data = 1;
     * @return This builder for chaining.
     */
    public Builder clearBoolData() {
      if (dataCase_ == 1) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * int32 int_data = 2;
     * @return Whether the intData field is set.
     */
    public boolean hasIntData() {
      return dataCase_ == 2;
    }
    /**
     * int32 int_data = 2;
     * @return The intData.
     */
    public int getIntData() {
      if (dataCase_ == 2) {
        return (java.lang.Integer) data_;
      }
      return 0;
    }
    /**
     * int32 int_data = 2;
     * @param value The intData to set.
     * @return This builder for chaining.
     */
    public Builder setIntData(int value) {

      dataCase_ = 2;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * int32 int_data = 2;
     * @return This builder for chaining.
     */
    public Builder clearIntData() {
      if (dataCase_ == 2) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * int64 long_data = 3;
     * @return Whether the longData field is set.
     */
    public boolean hasLongData() {
      return dataCase_ == 3;
    }
    /**
     * int64 long_data = 3;
     * @return The longData.
     */
    public long getLongData() {
      if (dataCase_ == 3) {
        return (java.lang.Long) data_;
      }
      return 0L;
    }
    /**
     * int64 long_data = 3;
     * @param value The longData to set.
     * @return This builder for chaining.
     */
    public Builder setLongData(long value) {

      dataCase_ = 3;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * int64 long_data = 3;
     * @return This builder for chaining.
     */
    public Builder clearLongData() {
      if (dataCase_ == 3) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * float float_data = 4;
     * @return Whether the floatData field is set.
     */
    public boolean hasFloatData() {
      return dataCase_ == 4;
    }
    /**
     * float float_data = 4;
     * @return The floatData.
     */
    public float getFloatData() {
      if (dataCase_ == 4) {
        return (java.lang.Float) data_;
      }
      return 0F;
    }
    /**
     * float float_data = 4;
     * @param value The floatData to set.
     * @return This builder for chaining.
     */
    public Builder setFloatData(float value) {

      dataCase_ = 4;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * float float_data = 4;
     * @return This builder for chaining.
     */
    public Builder clearFloatData() {
      if (dataCase_ == 4) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * double double_data = 5;
     * @return Whether the doubleData field is set.
     */
    public boolean hasDoubleData() {
      return dataCase_ == 5;
    }
    /**
     * double double_data = 5;
     * @return The doubleData.
     */
    public double getDoubleData() {
      if (dataCase_ == 5) {
        return (java.lang.Double) data_;
      }
      return 0D;
    }
    /**
     * double double_data = 5;
     * @param value The doubleData to set.
     * @return This builder for chaining.
     */
    public Builder setDoubleData(double value) {

      dataCase_ = 5;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * double double_data = 5;
     * @return This builder for chaining.
     */
    public Builder clearDoubleData() {
      if (dataCase_ == 5) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * string string_data = 6;
     * @return Whether the stringData field is set.
     */
    @java.lang.Override
    public boolean hasStringData() {
      return dataCase_ == 6;
    }
    /**
     * string string_data = 6;
     * @return The stringData.
     */
    @java.lang.Override
    public java.lang.String getStringData() {
      java.lang.Object ref = "";
      if (dataCase_ == 6) {
        ref = data_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (dataCase_ == 6) {
          data_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string string_data = 6;
     * @return The bytes for stringData.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getStringDataBytes() {
      java.lang.Object ref = "";
      if (dataCase_ == 6) {
        ref = data_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (dataCase_ == 6) {
          data_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string string_data = 6;
     * @param value The stringData to set.
     * @return This builder for chaining.
     */
    public Builder setStringData(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 6;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * string string_data = 6;
     * @return This builder for chaining.
     */
    public Builder clearStringData() {
      if (dataCase_ == 6) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * string string_data = 6;
     * @param value The bytes for stringData to set.
     * @return This builder for chaining.
     */
    public Builder setStringDataBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      dataCase_ = 6;
      data_ = value;
      onChanged();
      return this;
    }

    /**
     * bytes bytes_data = 7;
     * @return Whether the bytesData field is set.
     */
    public boolean hasBytesData() {
      return dataCase_ == 7;
    }
    /**
     * bytes bytes_data = 7;
     * @return The bytesData.
     */
    public com.google.protobuf.ByteString getBytesData() {
      if (dataCase_ == 7) {
        return (com.google.protobuf.ByteString) data_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * bytes bytes_data = 7;
     * @param value The bytesData to set.
     * @return This builder for chaining.
     */
    public Builder setBytesData(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 7;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * bytes bytes_data = 7;
     * @return This builder for chaining.
     */
    public Builder clearBytesData() {
      if (dataCase_ == 7) {
        dataCase_ = 0;
        data_ = null;
        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:milvus.proto.schema.ValueField)
  }

  // @@protoc_insertion_point(class_scope:milvus.proto.schema.ValueField)
  private static final io.milvus.grpc.ValueField DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.milvus.grpc.ValueField();
  }

  public static io.milvus.grpc.ValueField getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public ValueField parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

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

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

  @java.lang.Override
  public io.milvus.grpc.ValueField getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy