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

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

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

package com.clarifai.grpc.api;

/**
 * 
 * BinaryMetrics
 * 
* * Protobuf type {@code clarifai.api.BinaryMetrics} */ public final class BinaryMetrics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.BinaryMetrics) BinaryMetricsOrBuilder { private static final long serialVersionUID = 0L; // Use BinaryMetrics.newBuilder() to construct. private BinaryMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BinaryMetrics() { areaName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new BinaryMetrics(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BinaryMetrics( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { numPos_ = input.readUInt32(); break; } case 16: { numNeg_ = input.readUInt32(); break; } case 24: { numTot_ = input.readUInt32(); break; } case 37: { rocAuc_ = input.readFloat(); break; } case 45: { f1_ = input.readFloat(); break; } case 50: { com.clarifai.grpc.api.Concept.Builder subBuilder = null; if (concept_ != null) { subBuilder = concept_.toBuilder(); } concept_ = input.readMessage(com.clarifai.grpc.api.Concept.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(concept_); concept_ = subBuilder.buildPartial(); } break; } case 58: { com.clarifai.grpc.api.ROC.Builder subBuilder = null; if (rocCurve_ != null) { subBuilder = rocCurve_.toBuilder(); } rocCurve_ = input.readMessage(com.clarifai.grpc.api.ROC.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(rocCurve_); rocCurve_ = subBuilder.buildPartial(); } break; } case 66: { com.clarifai.grpc.api.PrecisionRecallCurve.Builder subBuilder = null; if (precisionRecallCurve_ != null) { subBuilder = precisionRecallCurve_.toBuilder(); } precisionRecallCurve_ = input.readMessage(com.clarifai.grpc.api.PrecisionRecallCurve.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(precisionRecallCurve_); precisionRecallCurve_ = subBuilder.buildPartial(); } break; } case 77: { avgPrecision_ = input.readFloat(); break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); areaName_ = s; break; } case 89: { areaMin_ = input.readDouble(); break; } case 97: { areaMax_ = input.readDouble(); break; } case 109: { iou_ = input.readFloat(); 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_BinaryMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_BinaryMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.BinaryMetrics.class, com.clarifai.grpc.api.BinaryMetrics.Builder.class); } public static final int NUM_POS_FIELD_NUMBER = 1; private int numPos_; /** * uint32 num_pos = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numPos. */ @java.lang.Override public int getNumPos() { return numPos_; } public static final int NUM_NEG_FIELD_NUMBER = 2; private int numNeg_; /** * uint32 num_neg = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numNeg. */ @java.lang.Override public int getNumNeg() { return numNeg_; } public static final int NUM_TOT_FIELD_NUMBER = 3; private int numTot_; /** * uint32 num_tot = 3 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numTot. */ @java.lang.Override public int getNumTot() { return numTot_; } public static final int ROC_AUC_FIELD_NUMBER = 4; private float rocAuc_; /** * float roc_auc = 4 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The rocAuc. */ @java.lang.Override public float getRocAuc() { return rocAuc_; } public static final int F1_FIELD_NUMBER = 5; private float f1_; /** * float f1 = 5 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The f1. */ @java.lang.Override public float getF1() { return f1_; } public static final int CONCEPT_FIELD_NUMBER = 6; private com.clarifai.grpc.api.Concept concept_; /** * .clarifai.api.Concept concept = 6; * @return Whether the concept field is set. */ @java.lang.Override public boolean hasConcept() { return concept_ != null; } /** * .clarifai.api.Concept concept = 6; * @return The concept. */ @java.lang.Override public com.clarifai.grpc.api.Concept getConcept() { return concept_ == null ? com.clarifai.grpc.api.Concept.getDefaultInstance() : concept_; } /** * .clarifai.api.Concept concept = 6; */ @java.lang.Override public com.clarifai.grpc.api.ConceptOrBuilder getConceptOrBuilder() { return getConcept(); } public static final int ROC_CURVE_FIELD_NUMBER = 7; private com.clarifai.grpc.api.ROC rocCurve_; /** * .clarifai.api.ROC roc_curve = 7; * @return Whether the rocCurve field is set. */ @java.lang.Override public boolean hasRocCurve() { return rocCurve_ != null; } /** * .clarifai.api.ROC roc_curve = 7; * @return The rocCurve. */ @java.lang.Override public com.clarifai.grpc.api.ROC getRocCurve() { return rocCurve_ == null ? com.clarifai.grpc.api.ROC.getDefaultInstance() : rocCurve_; } /** * .clarifai.api.ROC roc_curve = 7; */ @java.lang.Override public com.clarifai.grpc.api.ROCOrBuilder getRocCurveOrBuilder() { return getRocCurve(); } public static final int PRECISION_RECALL_CURVE_FIELD_NUMBER = 8; private com.clarifai.grpc.api.PrecisionRecallCurve precisionRecallCurve_; /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; * @return Whether the precisionRecallCurve field is set. */ @java.lang.Override public boolean hasPrecisionRecallCurve() { return precisionRecallCurve_ != null; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; * @return The precisionRecallCurve. */ @java.lang.Override public com.clarifai.grpc.api.PrecisionRecallCurve getPrecisionRecallCurve() { return precisionRecallCurve_ == null ? com.clarifai.grpc.api.PrecisionRecallCurve.getDefaultInstance() : precisionRecallCurve_; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ @java.lang.Override public com.clarifai.grpc.api.PrecisionRecallCurveOrBuilder getPrecisionRecallCurveOrBuilder() { return getPrecisionRecallCurve(); } public static final int AVG_PRECISION_FIELD_NUMBER = 9; private float avgPrecision_; /** * float avg_precision = 9; * @return The avgPrecision. */ @java.lang.Override public float getAvgPrecision() { return avgPrecision_; } public static final int AREA_NAME_FIELD_NUMBER = 10; private volatile java.lang.Object areaName_; /** * string area_name = 10; * @return The areaName. */ @java.lang.Override public java.lang.String getAreaName() { java.lang.Object ref = areaName_; 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(); areaName_ = s; return s; } } /** * string area_name = 10; * @return The bytes for areaName. */ @java.lang.Override public com.google.protobuf.ByteString getAreaNameBytes() { java.lang.Object ref = areaName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); areaName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AREA_MIN_FIELD_NUMBER = 11; private double areaMin_; /** * double area_min = 11; * @return The areaMin. */ @java.lang.Override public double getAreaMin() { return areaMin_; } public static final int AREA_MAX_FIELD_NUMBER = 12; private double areaMax_; /** * double area_max = 12; * @return The areaMax. */ @java.lang.Override public double getAreaMax() { return areaMax_; } public static final int IOU_FIELD_NUMBER = 13; private float iou_; /** * float iou = 13; * @return The iou. */ @java.lang.Override public float getIou() { return iou_; } 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 (numPos_ != 0) { output.writeUInt32(1, numPos_); } if (numNeg_ != 0) { output.writeUInt32(2, numNeg_); } if (numTot_ != 0) { output.writeUInt32(3, numTot_); } if (java.lang.Float.floatToRawIntBits(rocAuc_) != 0) { output.writeFloat(4, rocAuc_); } if (java.lang.Float.floatToRawIntBits(f1_) != 0) { output.writeFloat(5, f1_); } if (concept_ != null) { output.writeMessage(6, getConcept()); } if (rocCurve_ != null) { output.writeMessage(7, getRocCurve()); } if (precisionRecallCurve_ != null) { output.writeMessage(8, getPrecisionRecallCurve()); } if (java.lang.Float.floatToRawIntBits(avgPrecision_) != 0) { output.writeFloat(9, avgPrecision_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(areaName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, areaName_); } if (java.lang.Double.doubleToRawLongBits(areaMin_) != 0) { output.writeDouble(11, areaMin_); } if (java.lang.Double.doubleToRawLongBits(areaMax_) != 0) { output.writeDouble(12, areaMax_); } if (java.lang.Float.floatToRawIntBits(iou_) != 0) { output.writeFloat(13, iou_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (numPos_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, numPos_); } if (numNeg_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, numNeg_); } if (numTot_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, numTot_); } if (java.lang.Float.floatToRawIntBits(rocAuc_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(4, rocAuc_); } if (java.lang.Float.floatToRawIntBits(f1_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(5, f1_); } if (concept_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getConcept()); } if (rocCurve_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getRocCurve()); } if (precisionRecallCurve_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getPrecisionRecallCurve()); } if (java.lang.Float.floatToRawIntBits(avgPrecision_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(9, avgPrecision_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(areaName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, areaName_); } if (java.lang.Double.doubleToRawLongBits(areaMin_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(11, areaMin_); } if (java.lang.Double.doubleToRawLongBits(areaMax_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(12, areaMax_); } if (java.lang.Float.floatToRawIntBits(iou_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(13, iou_); } 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.BinaryMetrics)) { return super.equals(obj); } com.clarifai.grpc.api.BinaryMetrics other = (com.clarifai.grpc.api.BinaryMetrics) obj; if (getNumPos() != other.getNumPos()) return false; if (getNumNeg() != other.getNumNeg()) return false; if (getNumTot() != other.getNumTot()) return false; if (java.lang.Float.floatToIntBits(getRocAuc()) != java.lang.Float.floatToIntBits( other.getRocAuc())) return false; if (java.lang.Float.floatToIntBits(getF1()) != java.lang.Float.floatToIntBits( other.getF1())) return false; if (hasConcept() != other.hasConcept()) return false; if (hasConcept()) { if (!getConcept() .equals(other.getConcept())) return false; } if (hasRocCurve() != other.hasRocCurve()) return false; if (hasRocCurve()) { if (!getRocCurve() .equals(other.getRocCurve())) return false; } if (hasPrecisionRecallCurve() != other.hasPrecisionRecallCurve()) return false; if (hasPrecisionRecallCurve()) { if (!getPrecisionRecallCurve() .equals(other.getPrecisionRecallCurve())) return false; } if (java.lang.Float.floatToIntBits(getAvgPrecision()) != java.lang.Float.floatToIntBits( other.getAvgPrecision())) return false; if (!getAreaName() .equals(other.getAreaName())) return false; if (java.lang.Double.doubleToLongBits(getAreaMin()) != java.lang.Double.doubleToLongBits( other.getAreaMin())) return false; if (java.lang.Double.doubleToLongBits(getAreaMax()) != java.lang.Double.doubleToLongBits( other.getAreaMax())) return false; if (java.lang.Float.floatToIntBits(getIou()) != java.lang.Float.floatToIntBits( other.getIou())) 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) + NUM_POS_FIELD_NUMBER; hash = (53 * hash) + getNumPos(); hash = (37 * hash) + NUM_NEG_FIELD_NUMBER; hash = (53 * hash) + getNumNeg(); hash = (37 * hash) + NUM_TOT_FIELD_NUMBER; hash = (53 * hash) + getNumTot(); hash = (37 * hash) + ROC_AUC_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getRocAuc()); hash = (37 * hash) + F1_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getF1()); if (hasConcept()) { hash = (37 * hash) + CONCEPT_FIELD_NUMBER; hash = (53 * hash) + getConcept().hashCode(); } if (hasRocCurve()) { hash = (37 * hash) + ROC_CURVE_FIELD_NUMBER; hash = (53 * hash) + getRocCurve().hashCode(); } if (hasPrecisionRecallCurve()) { hash = (37 * hash) + PRECISION_RECALL_CURVE_FIELD_NUMBER; hash = (53 * hash) + getPrecisionRecallCurve().hashCode(); } hash = (37 * hash) + AVG_PRECISION_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getAvgPrecision()); hash = (37 * hash) + AREA_NAME_FIELD_NUMBER; hash = (53 * hash) + getAreaName().hashCode(); hash = (37 * hash) + AREA_MIN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getAreaMin())); hash = (37 * hash) + AREA_MAX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getAreaMax())); hash = (37 * hash) + IOU_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getIou()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.BinaryMetrics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.BinaryMetrics 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.BinaryMetrics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.BinaryMetrics 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.BinaryMetrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.BinaryMetrics parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.BinaryMetrics parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.BinaryMetrics 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.BinaryMetrics parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.BinaryMetrics 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.BinaryMetrics parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.BinaryMetrics 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.BinaryMetrics 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; } /** *
   * BinaryMetrics
   * 
* * Protobuf type {@code clarifai.api.BinaryMetrics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.BinaryMetrics) com.clarifai.grpc.api.BinaryMetricsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_BinaryMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_BinaryMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.BinaryMetrics.class, com.clarifai.grpc.api.BinaryMetrics.Builder.class); } // Construct using com.clarifai.grpc.api.BinaryMetrics.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(); numPos_ = 0; numNeg_ = 0; numTot_ = 0; rocAuc_ = 0F; f1_ = 0F; if (conceptBuilder_ == null) { concept_ = null; } else { concept_ = null; conceptBuilder_ = null; } if (rocCurveBuilder_ == null) { rocCurve_ = null; } else { rocCurve_ = null; rocCurveBuilder_ = null; } if (precisionRecallCurveBuilder_ == null) { precisionRecallCurve_ = null; } else { precisionRecallCurve_ = null; precisionRecallCurveBuilder_ = null; } avgPrecision_ = 0F; areaName_ = ""; areaMin_ = 0D; areaMax_ = 0D; iou_ = 0F; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_BinaryMetrics_descriptor; } @java.lang.Override public com.clarifai.grpc.api.BinaryMetrics getDefaultInstanceForType() { return com.clarifai.grpc.api.BinaryMetrics.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.BinaryMetrics build() { com.clarifai.grpc.api.BinaryMetrics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.BinaryMetrics buildPartial() { com.clarifai.grpc.api.BinaryMetrics result = new com.clarifai.grpc.api.BinaryMetrics(this); result.numPos_ = numPos_; result.numNeg_ = numNeg_; result.numTot_ = numTot_; result.rocAuc_ = rocAuc_; result.f1_ = f1_; if (conceptBuilder_ == null) { result.concept_ = concept_; } else { result.concept_ = conceptBuilder_.build(); } if (rocCurveBuilder_ == null) { result.rocCurve_ = rocCurve_; } else { result.rocCurve_ = rocCurveBuilder_.build(); } if (precisionRecallCurveBuilder_ == null) { result.precisionRecallCurve_ = precisionRecallCurve_; } else { result.precisionRecallCurve_ = precisionRecallCurveBuilder_.build(); } result.avgPrecision_ = avgPrecision_; result.areaName_ = areaName_; result.areaMin_ = areaMin_; result.areaMax_ = areaMax_; result.iou_ = iou_; 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.BinaryMetrics) { return mergeFrom((com.clarifai.grpc.api.BinaryMetrics)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.BinaryMetrics other) { if (other == com.clarifai.grpc.api.BinaryMetrics.getDefaultInstance()) return this; if (other.getNumPos() != 0) { setNumPos(other.getNumPos()); } if (other.getNumNeg() != 0) { setNumNeg(other.getNumNeg()); } if (other.getNumTot() != 0) { setNumTot(other.getNumTot()); } if (other.getRocAuc() != 0F) { setRocAuc(other.getRocAuc()); } if (other.getF1() != 0F) { setF1(other.getF1()); } if (other.hasConcept()) { mergeConcept(other.getConcept()); } if (other.hasRocCurve()) { mergeRocCurve(other.getRocCurve()); } if (other.hasPrecisionRecallCurve()) { mergePrecisionRecallCurve(other.getPrecisionRecallCurve()); } if (other.getAvgPrecision() != 0F) { setAvgPrecision(other.getAvgPrecision()); } if (!other.getAreaName().isEmpty()) { areaName_ = other.areaName_; onChanged(); } if (other.getAreaMin() != 0D) { setAreaMin(other.getAreaMin()); } if (other.getAreaMax() != 0D) { setAreaMax(other.getAreaMax()); } if (other.getIou() != 0F) { setIou(other.getIou()); } 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.BinaryMetrics parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.BinaryMetrics) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int numPos_ ; /** * uint32 num_pos = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numPos. */ @java.lang.Override public int getNumPos() { return numPos_; } /** * uint32 num_pos = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The numPos to set. * @return This builder for chaining. */ public Builder setNumPos(int value) { numPos_ = value; onChanged(); return this; } /** * uint32 num_pos = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearNumPos() { numPos_ = 0; onChanged(); return this; } private int numNeg_ ; /** * uint32 num_neg = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numNeg. */ @java.lang.Override public int getNumNeg() { return numNeg_; } /** * uint32 num_neg = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The numNeg to set. * @return This builder for chaining. */ public Builder setNumNeg(int value) { numNeg_ = value; onChanged(); return this; } /** * uint32 num_neg = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearNumNeg() { numNeg_ = 0; onChanged(); return this; } private int numTot_ ; /** * uint32 num_tot = 3 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The numTot. */ @java.lang.Override public int getNumTot() { return numTot_; } /** * uint32 num_tot = 3 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The numTot to set. * @return This builder for chaining. */ public Builder setNumTot(int value) { numTot_ = value; onChanged(); return this; } /** * uint32 num_tot = 3 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearNumTot() { numTot_ = 0; onChanged(); return this; } private float rocAuc_ ; /** * float roc_auc = 4 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The rocAuc. */ @java.lang.Override public float getRocAuc() { return rocAuc_; } /** * float roc_auc = 4 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The rocAuc to set. * @return This builder for chaining. */ public Builder setRocAuc(float value) { rocAuc_ = value; onChanged(); return this; } /** * float roc_auc = 4 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearRocAuc() { rocAuc_ = 0F; onChanged(); return this; } private float f1_ ; /** * float f1 = 5 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The f1. */ @java.lang.Override public float getF1() { return f1_; } /** * float f1 = 5 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The f1 to set. * @return This builder for chaining. */ public Builder setF1(float value) { f1_ = value; onChanged(); return this; } /** * float f1 = 5 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearF1() { f1_ = 0F; onChanged(); return this; } private com.clarifai.grpc.api.Concept concept_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder> conceptBuilder_; /** * .clarifai.api.Concept concept = 6; * @return Whether the concept field is set. */ public boolean hasConcept() { return conceptBuilder_ != null || concept_ != null; } /** * .clarifai.api.Concept concept = 6; * @return The concept. */ public com.clarifai.grpc.api.Concept getConcept() { if (conceptBuilder_ == null) { return concept_ == null ? com.clarifai.grpc.api.Concept.getDefaultInstance() : concept_; } else { return conceptBuilder_.getMessage(); } } /** * .clarifai.api.Concept concept = 6; */ public Builder setConcept(com.clarifai.grpc.api.Concept value) { if (conceptBuilder_ == null) { if (value == null) { throw new NullPointerException(); } concept_ = value; onChanged(); } else { conceptBuilder_.setMessage(value); } return this; } /** * .clarifai.api.Concept concept = 6; */ public Builder setConcept( com.clarifai.grpc.api.Concept.Builder builderForValue) { if (conceptBuilder_ == null) { concept_ = builderForValue.build(); onChanged(); } else { conceptBuilder_.setMessage(builderForValue.build()); } return this; } /** * .clarifai.api.Concept concept = 6; */ public Builder mergeConcept(com.clarifai.grpc.api.Concept value) { if (conceptBuilder_ == null) { if (concept_ != null) { concept_ = com.clarifai.grpc.api.Concept.newBuilder(concept_).mergeFrom(value).buildPartial(); } else { concept_ = value; } onChanged(); } else { conceptBuilder_.mergeFrom(value); } return this; } /** * .clarifai.api.Concept concept = 6; */ public Builder clearConcept() { if (conceptBuilder_ == null) { concept_ = null; onChanged(); } else { concept_ = null; conceptBuilder_ = null; } return this; } /** * .clarifai.api.Concept concept = 6; */ public com.clarifai.grpc.api.Concept.Builder getConceptBuilder() { onChanged(); return getConceptFieldBuilder().getBuilder(); } /** * .clarifai.api.Concept concept = 6; */ public com.clarifai.grpc.api.ConceptOrBuilder getConceptOrBuilder() { if (conceptBuilder_ != null) { return conceptBuilder_.getMessageOrBuilder(); } else { return concept_ == null ? com.clarifai.grpc.api.Concept.getDefaultInstance() : concept_; } } /** * .clarifai.api.Concept concept = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder> getConceptFieldBuilder() { if (conceptBuilder_ == null) { conceptBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Concept, com.clarifai.grpc.api.Concept.Builder, com.clarifai.grpc.api.ConceptOrBuilder>( getConcept(), getParentForChildren(), isClean()); concept_ = null; } return conceptBuilder_; } private com.clarifai.grpc.api.ROC rocCurve_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ROC, com.clarifai.grpc.api.ROC.Builder, com.clarifai.grpc.api.ROCOrBuilder> rocCurveBuilder_; /** * .clarifai.api.ROC roc_curve = 7; * @return Whether the rocCurve field is set. */ public boolean hasRocCurve() { return rocCurveBuilder_ != null || rocCurve_ != null; } /** * .clarifai.api.ROC roc_curve = 7; * @return The rocCurve. */ public com.clarifai.grpc.api.ROC getRocCurve() { if (rocCurveBuilder_ == null) { return rocCurve_ == null ? com.clarifai.grpc.api.ROC.getDefaultInstance() : rocCurve_; } else { return rocCurveBuilder_.getMessage(); } } /** * .clarifai.api.ROC roc_curve = 7; */ public Builder setRocCurve(com.clarifai.grpc.api.ROC value) { if (rocCurveBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rocCurve_ = value; onChanged(); } else { rocCurveBuilder_.setMessage(value); } return this; } /** * .clarifai.api.ROC roc_curve = 7; */ public Builder setRocCurve( com.clarifai.grpc.api.ROC.Builder builderForValue) { if (rocCurveBuilder_ == null) { rocCurve_ = builderForValue.build(); onChanged(); } else { rocCurveBuilder_.setMessage(builderForValue.build()); } return this; } /** * .clarifai.api.ROC roc_curve = 7; */ public Builder mergeRocCurve(com.clarifai.grpc.api.ROC value) { if (rocCurveBuilder_ == null) { if (rocCurve_ != null) { rocCurve_ = com.clarifai.grpc.api.ROC.newBuilder(rocCurve_).mergeFrom(value).buildPartial(); } else { rocCurve_ = value; } onChanged(); } else { rocCurveBuilder_.mergeFrom(value); } return this; } /** * .clarifai.api.ROC roc_curve = 7; */ public Builder clearRocCurve() { if (rocCurveBuilder_ == null) { rocCurve_ = null; onChanged(); } else { rocCurve_ = null; rocCurveBuilder_ = null; } return this; } /** * .clarifai.api.ROC roc_curve = 7; */ public com.clarifai.grpc.api.ROC.Builder getRocCurveBuilder() { onChanged(); return getRocCurveFieldBuilder().getBuilder(); } /** * .clarifai.api.ROC roc_curve = 7; */ public com.clarifai.grpc.api.ROCOrBuilder getRocCurveOrBuilder() { if (rocCurveBuilder_ != null) { return rocCurveBuilder_.getMessageOrBuilder(); } else { return rocCurve_ == null ? com.clarifai.grpc.api.ROC.getDefaultInstance() : rocCurve_; } } /** * .clarifai.api.ROC roc_curve = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ROC, com.clarifai.grpc.api.ROC.Builder, com.clarifai.grpc.api.ROCOrBuilder> getRocCurveFieldBuilder() { if (rocCurveBuilder_ == null) { rocCurveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ROC, com.clarifai.grpc.api.ROC.Builder, com.clarifai.grpc.api.ROCOrBuilder>( getRocCurve(), getParentForChildren(), isClean()); rocCurve_ = null; } return rocCurveBuilder_; } private com.clarifai.grpc.api.PrecisionRecallCurve precisionRecallCurve_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.PrecisionRecallCurve, com.clarifai.grpc.api.PrecisionRecallCurve.Builder, com.clarifai.grpc.api.PrecisionRecallCurveOrBuilder> precisionRecallCurveBuilder_; /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; * @return Whether the precisionRecallCurve field is set. */ public boolean hasPrecisionRecallCurve() { return precisionRecallCurveBuilder_ != null || precisionRecallCurve_ != null; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; * @return The precisionRecallCurve. */ public com.clarifai.grpc.api.PrecisionRecallCurve getPrecisionRecallCurve() { if (precisionRecallCurveBuilder_ == null) { return precisionRecallCurve_ == null ? com.clarifai.grpc.api.PrecisionRecallCurve.getDefaultInstance() : precisionRecallCurve_; } else { return precisionRecallCurveBuilder_.getMessage(); } } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public Builder setPrecisionRecallCurve(com.clarifai.grpc.api.PrecisionRecallCurve value) { if (precisionRecallCurveBuilder_ == null) { if (value == null) { throw new NullPointerException(); } precisionRecallCurve_ = value; onChanged(); } else { precisionRecallCurveBuilder_.setMessage(value); } return this; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public Builder setPrecisionRecallCurve( com.clarifai.grpc.api.PrecisionRecallCurve.Builder builderForValue) { if (precisionRecallCurveBuilder_ == null) { precisionRecallCurve_ = builderForValue.build(); onChanged(); } else { precisionRecallCurveBuilder_.setMessage(builderForValue.build()); } return this; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public Builder mergePrecisionRecallCurve(com.clarifai.grpc.api.PrecisionRecallCurve value) { if (precisionRecallCurveBuilder_ == null) { if (precisionRecallCurve_ != null) { precisionRecallCurve_ = com.clarifai.grpc.api.PrecisionRecallCurve.newBuilder(precisionRecallCurve_).mergeFrom(value).buildPartial(); } else { precisionRecallCurve_ = value; } onChanged(); } else { precisionRecallCurveBuilder_.mergeFrom(value); } return this; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public Builder clearPrecisionRecallCurve() { if (precisionRecallCurveBuilder_ == null) { precisionRecallCurve_ = null; onChanged(); } else { precisionRecallCurve_ = null; precisionRecallCurveBuilder_ = null; } return this; } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public com.clarifai.grpc.api.PrecisionRecallCurve.Builder getPrecisionRecallCurveBuilder() { onChanged(); return getPrecisionRecallCurveFieldBuilder().getBuilder(); } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ public com.clarifai.grpc.api.PrecisionRecallCurveOrBuilder getPrecisionRecallCurveOrBuilder() { if (precisionRecallCurveBuilder_ != null) { return precisionRecallCurveBuilder_.getMessageOrBuilder(); } else { return precisionRecallCurve_ == null ? com.clarifai.grpc.api.PrecisionRecallCurve.getDefaultInstance() : precisionRecallCurve_; } } /** * .clarifai.api.PrecisionRecallCurve precision_recall_curve = 8; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.PrecisionRecallCurve, com.clarifai.grpc.api.PrecisionRecallCurve.Builder, com.clarifai.grpc.api.PrecisionRecallCurveOrBuilder> getPrecisionRecallCurveFieldBuilder() { if (precisionRecallCurveBuilder_ == null) { precisionRecallCurveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.PrecisionRecallCurve, com.clarifai.grpc.api.PrecisionRecallCurve.Builder, com.clarifai.grpc.api.PrecisionRecallCurveOrBuilder>( getPrecisionRecallCurve(), getParentForChildren(), isClean()); precisionRecallCurve_ = null; } return precisionRecallCurveBuilder_; } private float avgPrecision_ ; /** * float avg_precision = 9; * @return The avgPrecision. */ @java.lang.Override public float getAvgPrecision() { return avgPrecision_; } /** * float avg_precision = 9; * @param value The avgPrecision to set. * @return This builder for chaining. */ public Builder setAvgPrecision(float value) { avgPrecision_ = value; onChanged(); return this; } /** * float avg_precision = 9; * @return This builder for chaining. */ public Builder clearAvgPrecision() { avgPrecision_ = 0F; onChanged(); return this; } private java.lang.Object areaName_ = ""; /** * string area_name = 10; * @return The areaName. */ public java.lang.String getAreaName() { java.lang.Object ref = areaName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); areaName_ = s; return s; } else { return (java.lang.String) ref; } } /** * string area_name = 10; * @return The bytes for areaName. */ public com.google.protobuf.ByteString getAreaNameBytes() { java.lang.Object ref = areaName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); areaName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string area_name = 10; * @param value The areaName to set. * @return This builder for chaining. */ public Builder setAreaName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } areaName_ = value; onChanged(); return this; } /** * string area_name = 10; * @return This builder for chaining. */ public Builder clearAreaName() { areaName_ = getDefaultInstance().getAreaName(); onChanged(); return this; } /** * string area_name = 10; * @param value The bytes for areaName to set. * @return This builder for chaining. */ public Builder setAreaNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); areaName_ = value; onChanged(); return this; } private double areaMin_ ; /** * double area_min = 11; * @return The areaMin. */ @java.lang.Override public double getAreaMin() { return areaMin_; } /** * double area_min = 11; * @param value The areaMin to set. * @return This builder for chaining. */ public Builder setAreaMin(double value) { areaMin_ = value; onChanged(); return this; } /** * double area_min = 11; * @return This builder for chaining. */ public Builder clearAreaMin() { areaMin_ = 0D; onChanged(); return this; } private double areaMax_ ; /** * double area_max = 12; * @return The areaMax. */ @java.lang.Override public double getAreaMax() { return areaMax_; } /** * double area_max = 12; * @param value The areaMax to set. * @return This builder for chaining. */ public Builder setAreaMax(double value) { areaMax_ = value; onChanged(); return this; } /** * double area_max = 12; * @return This builder for chaining. */ public Builder clearAreaMax() { areaMax_ = 0D; onChanged(); return this; } private float iou_ ; /** * float iou = 13; * @return The iou. */ @java.lang.Override public float getIou() { return iou_; } /** * float iou = 13; * @param value The iou to set. * @return This builder for chaining. */ public Builder setIou(float value) { iou_ = value; onChanged(); return this; } /** * float iou = 13; * @return This builder for chaining. */ public Builder clearIou() { iou_ = 0F; 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:clarifai.api.BinaryMetrics) } // @@protoc_insertion_point(class_scope:clarifai.api.BinaryMetrics) private static final com.clarifai.grpc.api.BinaryMetrics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.BinaryMetrics(); } public static com.clarifai.grpc.api.BinaryMetrics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BinaryMetrics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BinaryMetrics(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.BinaryMetrics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy