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

com.clarifai.grpc.api.DatasetVersionMetricsGroup Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/clarifai/api/resources.proto

package com.clarifai.grpc.api;

/**
 * Protobuf type {@code clarifai.api.DatasetVersionMetricsGroup}
 */
public final class DatasetVersionMetricsGroup extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:clarifai.api.DatasetVersionMetricsGroup)
    DatasetVersionMetricsGroupOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DatasetVersionMetricsGroup.newBuilder() to construct.
  private DatasetVersionMetricsGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private DatasetVersionMetricsGroup() {
    parentPath_ = "";
    type_ = 0;
  }

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

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

            parentPath_ = s;
            break;
          }
          case 16: {
            int rawValue = input.readEnum();

            type_ = rawValue;
            break;
          }
          case 26: {
            com.google.protobuf.Value.Builder subBuilder = null;
            if (value_ != null) {
              subBuilder = value_.toBuilder();
            }
            value_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(value_);
              value_ = subBuilder.buildPartial();
            }

            break;
          }
          case 34: {
            com.clarifai.grpc.api.DatasetVersionMetrics.Builder subBuilder = null;
            if (metrics_ != null) {
              subBuilder = metrics_.toBuilder();
            }
            metrics_ = input.readMessage(com.clarifai.grpc.api.DatasetVersionMetrics.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(metrics_);
              metrics_ = 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 com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DatasetVersionMetricsGroup_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DatasetVersionMetricsGroup_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.clarifai.grpc.api.DatasetVersionMetricsGroup.class, com.clarifai.grpc.api.DatasetVersionMetricsGroup.Builder.class);
  }

  public static final int PARENT_PATH_FIELD_NUMBER = 1;
  private volatile java.lang.Object parentPath_;
  /**
   * string parent_path = 1;
   * @return The parentPath.
   */
  @java.lang.Override
  public java.lang.String getParentPath() {
    java.lang.Object ref = parentPath_;
    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();
      parentPath_ = s;
      return s;
    }
  }
  /**
   * string parent_path = 1;
   * @return The bytes for parentPath.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getParentPathBytes() {
    java.lang.Object ref = parentPath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      parentPath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TYPE_FIELD_NUMBER = 2;
  private int type_;
  /**
   * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
   * @return The enum numeric value on the wire for type.
   */
  @java.lang.Override public int getTypeValue() {
    return type_;
  }
  /**
   * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
   * @return The type.
   */
  @java.lang.Override public com.clarifai.grpc.api.DatasetVersionMetricsGroupType getType() {
    @SuppressWarnings("deprecation")
    com.clarifai.grpc.api.DatasetVersionMetricsGroupType result = com.clarifai.grpc.api.DatasetVersionMetricsGroupType.valueOf(type_);
    return result == null ? com.clarifai.grpc.api.DatasetVersionMetricsGroupType.UNRECOGNIZED : result;
  }

  public static final int VALUE_FIELD_NUMBER = 3;
  private com.google.protobuf.Value value_;
  /**
   * .google.protobuf.Value value = 3;
   * @return Whether the value field is set.
   */
  @java.lang.Override
  public boolean hasValue() {
    return value_ != null;
  }
  /**
   * .google.protobuf.Value value = 3;
   * @return The value.
   */
  @java.lang.Override
  public com.google.protobuf.Value getValue() {
    return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
  }
  /**
   * .google.protobuf.Value value = 3;
   */
  @java.lang.Override
  public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
    return getValue();
  }

  public static final int METRICS_FIELD_NUMBER = 4;
  private com.clarifai.grpc.api.DatasetVersionMetrics metrics_;
  /**
   * .clarifai.api.DatasetVersionMetrics metrics = 4;
   * @return Whether the metrics field is set.
   */
  @java.lang.Override
  public boolean hasMetrics() {
    return metrics_ != null;
  }
  /**
   * .clarifai.api.DatasetVersionMetrics metrics = 4;
   * @return The metrics.
   */
  @java.lang.Override
  public com.clarifai.grpc.api.DatasetVersionMetrics getMetrics() {
    return metrics_ == null ? com.clarifai.grpc.api.DatasetVersionMetrics.getDefaultInstance() : metrics_;
  }
  /**
   * .clarifai.api.DatasetVersionMetrics metrics = 4;
   */
  @java.lang.Override
  public com.clarifai.grpc.api.DatasetVersionMetricsOrBuilder getMetricsOrBuilder() {
    return getMetrics();
  }

  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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentPath_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parentPath_);
    }
    if (type_ != com.clarifai.grpc.api.DatasetVersionMetricsGroupType.DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET.getNumber()) {
      output.writeEnum(2, type_);
    }
    if (value_ != null) {
      output.writeMessage(3, getValue());
    }
    if (metrics_ != null) {
      output.writeMessage(4, getMetrics());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentPath_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parentPath_);
    }
    if (type_ != com.clarifai.grpc.api.DatasetVersionMetricsGroupType.DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(2, type_);
    }
    if (value_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getValue());
    }
    if (metrics_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getMetrics());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.clarifai.grpc.api.DatasetVersionMetricsGroup)) {
      return super.equals(obj);
    }
    com.clarifai.grpc.api.DatasetVersionMetricsGroup other = (com.clarifai.grpc.api.DatasetVersionMetricsGroup) obj;

    if (!getParentPath()
        .equals(other.getParentPath())) return false;
    if (type_ != other.type_) return false;
    if (hasValue() != other.hasValue()) return false;
    if (hasValue()) {
      if (!getValue()
          .equals(other.getValue())) return false;
    }
    if (hasMetrics() != other.hasMetrics()) return false;
    if (hasMetrics()) {
      if (!getMetrics()
          .equals(other.getMetrics())) 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) + PARENT_PATH_FIELD_NUMBER;
    hash = (53 * hash) + getParentPath().hashCode();
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    if (hasValue()) {
      hash = (37 * hash) + VALUE_FIELD_NUMBER;
      hash = (53 * hash) + getValue().hashCode();
    }
    if (hasMetrics()) {
      hash = (37 * hash) + METRICS_FIELD_NUMBER;
      hash = (53 * hash) + getMetrics().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.clarifai.grpc.api.DatasetVersionMetricsGroup 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 clarifai.api.DatasetVersionMetricsGroup}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:clarifai.api.DatasetVersionMetricsGroup)
      com.clarifai.grpc.api.DatasetVersionMetricsGroupOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DatasetVersionMetricsGroup_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DatasetVersionMetricsGroup_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.clarifai.grpc.api.DatasetVersionMetricsGroup.class, com.clarifai.grpc.api.DatasetVersionMetricsGroup.Builder.class);
    }

    // Construct using com.clarifai.grpc.api.DatasetVersionMetricsGroup.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();
      parentPath_ = "";

      type_ = 0;

      if (valueBuilder_ == null) {
        value_ = null;
      } else {
        value_ = null;
        valueBuilder_ = null;
      }
      if (metricsBuilder_ == null) {
        metrics_ = null;
      } else {
        metrics_ = null;
        metricsBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_DatasetVersionMetricsGroup_descriptor;
    }

    @java.lang.Override
    public com.clarifai.grpc.api.DatasetVersionMetricsGroup getDefaultInstanceForType() {
      return com.clarifai.grpc.api.DatasetVersionMetricsGroup.getDefaultInstance();
    }

    @java.lang.Override
    public com.clarifai.grpc.api.DatasetVersionMetricsGroup build() {
      com.clarifai.grpc.api.DatasetVersionMetricsGroup result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.clarifai.grpc.api.DatasetVersionMetricsGroup buildPartial() {
      com.clarifai.grpc.api.DatasetVersionMetricsGroup result = new com.clarifai.grpc.api.DatasetVersionMetricsGroup(this);
      result.parentPath_ = parentPath_;
      result.type_ = type_;
      if (valueBuilder_ == null) {
        result.value_ = value_;
      } else {
        result.value_ = valueBuilder_.build();
      }
      if (metricsBuilder_ == null) {
        result.metrics_ = metrics_;
      } else {
        result.metrics_ = metricsBuilder_.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 com.clarifai.grpc.api.DatasetVersionMetricsGroup) {
        return mergeFrom((com.clarifai.grpc.api.DatasetVersionMetricsGroup)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.clarifai.grpc.api.DatasetVersionMetricsGroup other) {
      if (other == com.clarifai.grpc.api.DatasetVersionMetricsGroup.getDefaultInstance()) return this;
      if (!other.getParentPath().isEmpty()) {
        parentPath_ = other.parentPath_;
        onChanged();
      }
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (other.hasValue()) {
        mergeValue(other.getValue());
      }
      if (other.hasMetrics()) {
        mergeMetrics(other.getMetrics());
      }
      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 {
      com.clarifai.grpc.api.DatasetVersionMetricsGroup parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.clarifai.grpc.api.DatasetVersionMetricsGroup) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object parentPath_ = "";
    /**
     * string parent_path = 1;
     * @return The parentPath.
     */
    public java.lang.String getParentPath() {
      java.lang.Object ref = parentPath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parentPath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string parent_path = 1;
     * @return The bytes for parentPath.
     */
    public com.google.protobuf.ByteString
        getParentPathBytes() {
      java.lang.Object ref = parentPath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        parentPath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string parent_path = 1;
     * @param value The parentPath to set.
     * @return This builder for chaining.
     */
    public Builder setParentPath(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      parentPath_ = value;
      onChanged();
      return this;
    }
    /**
     * string parent_path = 1;
     * @return This builder for chaining.
     */
    public Builder clearParentPath() {
      
      parentPath_ = getDefaultInstance().getParentPath();
      onChanged();
      return this;
    }
    /**
     * string parent_path = 1;
     * @param value The bytes for parentPath to set.
     * @return This builder for chaining.
     */
    public Builder setParentPathBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      parentPath_ = value;
      onChanged();
      return this;
    }

    private int type_ = 0;
    /**
     * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override public int getTypeValue() {
      return type_;
    }
    /**
     * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
     * @param value The enum numeric value on the wire for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeValue(int value) {
      
      type_ = value;
      onChanged();
      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
     * @return The type.
     */
    @java.lang.Override
    public com.clarifai.grpc.api.DatasetVersionMetricsGroupType getType() {
      @SuppressWarnings("deprecation")
      com.clarifai.grpc.api.DatasetVersionMetricsGroupType result = com.clarifai.grpc.api.DatasetVersionMetricsGroupType.valueOf(type_);
      return result == null ? com.clarifai.grpc.api.DatasetVersionMetricsGroupType.UNRECOGNIZED : result;
    }
    /**
     * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(com.clarifai.grpc.api.DatasetVersionMetricsGroupType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetricsGroupType type = 2;
     * @return This builder for chaining.
     */
    public Builder clearType() {
      
      type_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Value value_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> valueBuilder_;
    /**
     * .google.protobuf.Value value = 3;
     * @return Whether the value field is set.
     */
    public boolean hasValue() {
      return valueBuilder_ != null || value_ != null;
    }
    /**
     * .google.protobuf.Value value = 3;
     * @return The value.
     */
    public com.google.protobuf.Value getValue() {
      if (valueBuilder_ == null) {
        return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
      } else {
        return valueBuilder_.getMessage();
      }
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public Builder setValue(com.google.protobuf.Value value) {
      if (valueBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        value_ = value;
        onChanged();
      } else {
        valueBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public Builder setValue(
        com.google.protobuf.Value.Builder builderForValue) {
      if (valueBuilder_ == null) {
        value_ = builderForValue.build();
        onChanged();
      } else {
        valueBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public Builder mergeValue(com.google.protobuf.Value value) {
      if (valueBuilder_ == null) {
        if (value_ != null) {
          value_ =
            com.google.protobuf.Value.newBuilder(value_).mergeFrom(value).buildPartial();
        } else {
          value_ = value;
        }
        onChanged();
      } else {
        valueBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public Builder clearValue() {
      if (valueBuilder_ == null) {
        value_ = null;
        onChanged();
      } else {
        value_ = null;
        valueBuilder_ = null;
      }

      return this;
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public com.google.protobuf.Value.Builder getValueBuilder() {
      
      onChanged();
      return getValueFieldBuilder().getBuilder();
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
      if (valueBuilder_ != null) {
        return valueBuilder_.getMessageOrBuilder();
      } else {
        return value_ == null ?
            com.google.protobuf.Value.getDefaultInstance() : value_;
      }
    }
    /**
     * .google.protobuf.Value value = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> 
        getValueFieldBuilder() {
      if (valueBuilder_ == null) {
        valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>(
                getValue(),
                getParentForChildren(),
                isClean());
        value_ = null;
      }
      return valueBuilder_;
    }

    private com.clarifai.grpc.api.DatasetVersionMetrics metrics_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.DatasetVersionMetrics, com.clarifai.grpc.api.DatasetVersionMetrics.Builder, com.clarifai.grpc.api.DatasetVersionMetricsOrBuilder> metricsBuilder_;
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     * @return Whether the metrics field is set.
     */
    public boolean hasMetrics() {
      return metricsBuilder_ != null || metrics_ != null;
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     * @return The metrics.
     */
    public com.clarifai.grpc.api.DatasetVersionMetrics getMetrics() {
      if (metricsBuilder_ == null) {
        return metrics_ == null ? com.clarifai.grpc.api.DatasetVersionMetrics.getDefaultInstance() : metrics_;
      } else {
        return metricsBuilder_.getMessage();
      }
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public Builder setMetrics(com.clarifai.grpc.api.DatasetVersionMetrics value) {
      if (metricsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        metrics_ = value;
        onChanged();
      } else {
        metricsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public Builder setMetrics(
        com.clarifai.grpc.api.DatasetVersionMetrics.Builder builderForValue) {
      if (metricsBuilder_ == null) {
        metrics_ = builderForValue.build();
        onChanged();
      } else {
        metricsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public Builder mergeMetrics(com.clarifai.grpc.api.DatasetVersionMetrics value) {
      if (metricsBuilder_ == null) {
        if (metrics_ != null) {
          metrics_ =
            com.clarifai.grpc.api.DatasetVersionMetrics.newBuilder(metrics_).mergeFrom(value).buildPartial();
        } else {
          metrics_ = value;
        }
        onChanged();
      } else {
        metricsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public Builder clearMetrics() {
      if (metricsBuilder_ == null) {
        metrics_ = null;
        onChanged();
      } else {
        metrics_ = null;
        metricsBuilder_ = null;
      }

      return this;
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public com.clarifai.grpc.api.DatasetVersionMetrics.Builder getMetricsBuilder() {
      
      onChanged();
      return getMetricsFieldBuilder().getBuilder();
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    public com.clarifai.grpc.api.DatasetVersionMetricsOrBuilder getMetricsOrBuilder() {
      if (metricsBuilder_ != null) {
        return metricsBuilder_.getMessageOrBuilder();
      } else {
        return metrics_ == null ?
            com.clarifai.grpc.api.DatasetVersionMetrics.getDefaultInstance() : metrics_;
      }
    }
    /**
     * .clarifai.api.DatasetVersionMetrics metrics = 4;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.clarifai.grpc.api.DatasetVersionMetrics, com.clarifai.grpc.api.DatasetVersionMetrics.Builder, com.clarifai.grpc.api.DatasetVersionMetricsOrBuilder> 
        getMetricsFieldBuilder() {
      if (metricsBuilder_ == null) {
        metricsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.clarifai.grpc.api.DatasetVersionMetrics, com.clarifai.grpc.api.DatasetVersionMetrics.Builder, com.clarifai.grpc.api.DatasetVersionMetricsOrBuilder>(
                getMetrics(),
                getParentForChildren(),
                isClean());
        metrics_ = null;
      }
      return metricsBuilder_;
    }
    @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:clarifai.api.DatasetVersionMetricsGroup)
  }

  // @@protoc_insertion_point(class_scope:clarifai.api.DatasetVersionMetricsGroup)
  private static final com.clarifai.grpc.api.DatasetVersionMetricsGroup DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.clarifai.grpc.api.DatasetVersionMetricsGroup();
  }

  public static com.clarifai.grpc.api.DatasetVersionMetricsGroup getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public DatasetVersionMetricsGroup parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new DatasetVersionMetricsGroup(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 com.clarifai.grpc.api.DatasetVersionMetricsGroup getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy