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

org.tensorflow.metadata.v0.MultiLabelClassification Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/problem_statement.proto

// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;

/**
 * 
 * Configuration for a multi-label classification task.
 * In this problem type there are n_classes unique possible label values
 * overall. There can be from zero up to n_classes unique labels per example.
 * The output, which is of type real number, is class probabilities associated
 * with each class. It will be of n_classes dimension for each example, if
 * n_classes is specified. Otherwise, the dimension will be set to the number
 * of unique class labels that are dynamically inferred from the data based on
 * dynamic_class_spec.
 * 
* * Protobuf type {@code tensorflow.metadata.v0.MultiLabelClassification} */ public final class MultiLabelClassification extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.MultiLabelClassification) MultiLabelClassificationOrBuilder { private static final long serialVersionUID = 0L; // Use MultiLabelClassification.newBuilder() to construct. private MultiLabelClassification(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MultiLabelClassification() { exampleWeight_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MultiLabelClassification(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MultiLabelClassification_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MultiLabelClassification_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.MultiLabelClassification.class, org.tensorflow.metadata.v0.MultiLabelClassification.Builder.class); } private int labelIdCase_ = 0; @SuppressWarnings("serial") private java.lang.Object labelId_; public enum LabelIdCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { LABEL(1), LABEL_PATH(5), LABELID_NOT_SET(0); private final int value; private LabelIdCase(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 LabelIdCase valueOf(int value) { return forNumber(value); } public static LabelIdCase forNumber(int value) { switch (value) { case 1: return LABEL; case 5: return LABEL_PATH; case 0: return LABELID_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public LabelIdCase getLabelIdCase() { return LabelIdCase.forNumber( labelIdCase_); } private int classSpecCase_ = 0; @SuppressWarnings("serial") private java.lang.Object classSpec_; public enum ClassSpecCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { N_CLASSES(3), DYNAMIC_CLASS_SPEC(4), CLASSSPEC_NOT_SET(0); private final int value; private ClassSpecCase(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 ClassSpecCase valueOf(int value) { return forNumber(value); } public static ClassSpecCase forNumber(int value) { switch (value) { case 3: return N_CLASSES; case 4: return DYNAMIC_CLASS_SPEC; case 0: return CLASSSPEC_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ClassSpecCase getClassSpecCase() { return ClassSpecCase.forNumber( classSpecCase_); } public static final int LABEL_FIELD_NUMBER = 1; /** *
   * The name of the label. Assumes the label is a flat, top-level field.
   * 
* * string label = 1; * @return Whether the label field is set. */ public boolean hasLabel() { return labelIdCase_ == 1; } /** *
   * The name of the label. Assumes the label is a flat, top-level field.
   * 
* * string label = 1; * @return The label. */ public java.lang.String getLabel() { java.lang.Object ref = ""; if (labelIdCase_ == 1) { ref = labelId_; } 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 (labelIdCase_ == 1) { labelId_ = s; } return s; } } /** *
   * The name of the label. Assumes the label is a flat, top-level field.
   * 
* * string label = 1; * @return The bytes for label. */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = ""; if (labelIdCase_ == 1) { ref = labelId_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (labelIdCase_ == 1) { labelId_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_PATH_FIELD_NUMBER = 5; /** *
   * A path can be used instead of a flat string if the label is nested.
   * 
* * .tensorflow.metadata.v0.Path label_path = 5; * @return Whether the labelPath field is set. */ @java.lang.Override public boolean hasLabelPath() { return labelIdCase_ == 5; } /** *
   * A path can be used instead of a flat string if the label is nested.
   * 
* * .tensorflow.metadata.v0.Path label_path = 5; * @return The labelPath. */ @java.lang.Override public org.tensorflow.metadata.v0.Path getLabelPath() { if (labelIdCase_ == 5) { return (org.tensorflow.metadata.v0.Path) labelId_; } return org.tensorflow.metadata.v0.Path.getDefaultInstance(); } /** *
   * A path can be used instead of a flat string if the label is nested.
   * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ @java.lang.Override public org.tensorflow.metadata.v0.PathOrBuilder getLabelPathOrBuilder() { if (labelIdCase_ == 5) { return (org.tensorflow.metadata.v0.Path) labelId_; } return org.tensorflow.metadata.v0.Path.getDefaultInstance(); } public static final int EXAMPLE_WEIGHT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object exampleWeight_ = ""; /** *
   * The weight column.
   * 
* * string example_weight = 2; * @return The exampleWeight. */ @java.lang.Override public java.lang.String getExampleWeight() { java.lang.Object ref = exampleWeight_; 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(); exampleWeight_ = s; return s; } } /** *
   * The weight column.
   * 
* * string example_weight = 2; * @return The bytes for exampleWeight. */ @java.lang.Override public com.google.protobuf.ByteString getExampleWeightBytes() { java.lang.Object ref = exampleWeight_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); exampleWeight_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int N_CLASSES_FIELD_NUMBER = 3; /** *
   * The exact number of unique class labels.
   * 
* * uint64 n_classes = 3; * @return Whether the nClasses field is set. */ @java.lang.Override public boolean hasNClasses() { return classSpecCase_ == 3; } /** *
   * The exact number of unique class labels.
   * 
* * uint64 n_classes = 3; * @return The nClasses. */ @java.lang.Override public long getNClasses() { if (classSpecCase_ == 3) { return (java.lang.Long) classSpec_; } return 0L; } public static final int DYNAMIC_CLASS_SPEC_FIELD_NUMBER = 4; /** *
   * The maximal number of label classes that should be inferred dynamically
   * from the data.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; * @return Whether the dynamicClassSpec field is set. */ @java.lang.Override public boolean hasDynamicClassSpec() { return classSpecCase_ == 4; } /** *
   * The maximal number of label classes that should be inferred dynamically
   * from the data.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; * @return The dynamicClassSpec. */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec getDynamicClassSpec() { if (classSpecCase_ == 4) { return (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_; } return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } /** *
   * The maximal number of label classes that should be inferred dynamically
   * from the data.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder getDynamicClassSpecOrBuilder() { if (classSpecCase_ == 4) { return (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_; } return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (labelIdCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, labelId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exampleWeight_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exampleWeight_); } if (classSpecCase_ == 3) { output.writeUInt64( 3, (long)((java.lang.Long) classSpec_)); } if (classSpecCase_ == 4) { output.writeMessage(4, (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_); } if (labelIdCase_ == 5) { output.writeMessage(5, (org.tensorflow.metadata.v0.Path) labelId_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (labelIdCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, labelId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exampleWeight_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, exampleWeight_); } if (classSpecCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size( 3, (long)((java.lang.Long) classSpec_)); } if (classSpecCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_); } if (labelIdCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (org.tensorflow.metadata.v0.Path) labelId_); } 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 org.tensorflow.metadata.v0.MultiLabelClassification)) { return super.equals(obj); } org.tensorflow.metadata.v0.MultiLabelClassification other = (org.tensorflow.metadata.v0.MultiLabelClassification) obj; if (!getExampleWeight() .equals(other.getExampleWeight())) return false; if (!getLabelIdCase().equals(other.getLabelIdCase())) return false; switch (labelIdCase_) { case 1: if (!getLabel() .equals(other.getLabel())) return false; break; case 5: if (!getLabelPath() .equals(other.getLabelPath())) return false; break; case 0: default: } if (!getClassSpecCase().equals(other.getClassSpecCase())) return false; switch (classSpecCase_) { case 3: if (getNClasses() != other.getNClasses()) return false; break; case 4: if (!getDynamicClassSpec() .equals(other.getDynamicClassSpec())) 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(); hash = (37 * hash) + EXAMPLE_WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getExampleWeight().hashCode(); switch (labelIdCase_) { case 1: hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); break; case 5: hash = (37 * hash) + LABEL_PATH_FIELD_NUMBER; hash = (53 * hash) + getLabelPath().hashCode(); break; case 0: default: } switch (classSpecCase_) { case 3: hash = (37 * hash) + N_CLASSES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getNClasses()); break; case 4: hash = (37 * hash) + DYNAMIC_CLASS_SPEC_FIELD_NUMBER; hash = (53 * hash) + getDynamicClassSpec().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.MultiLabelClassification parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.MultiLabelClassification 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 org.tensorflow.metadata.v0.MultiLabelClassification parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.MultiLabelClassification 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 org.tensorflow.metadata.v0.MultiLabelClassification parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.MultiLabelClassification 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(org.tensorflow.metadata.v0.MultiLabelClassification 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; } /** *
   * Configuration for a multi-label classification task.
   * In this problem type there are n_classes unique possible label values
   * overall. There can be from zero up to n_classes unique labels per example.
   * The output, which is of type real number, is class probabilities associated
   * with each class. It will be of n_classes dimension for each example, if
   * n_classes is specified. Otherwise, the dimension will be set to the number
   * of unique class labels that are dynamically inferred from the data based on
   * dynamic_class_spec.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.MultiLabelClassification} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.MultiLabelClassification) org.tensorflow.metadata.v0.MultiLabelClassificationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MultiLabelClassification_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MultiLabelClassification_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.MultiLabelClassification.class, org.tensorflow.metadata.v0.MultiLabelClassification.Builder.class); } // Construct using org.tensorflow.metadata.v0.MultiLabelClassification.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (labelPathBuilder_ != null) { labelPathBuilder_.clear(); } exampleWeight_ = ""; if (dynamicClassSpecBuilder_ != null) { dynamicClassSpecBuilder_.clear(); } labelIdCase_ = 0; labelId_ = null; classSpecCase_ = 0; classSpec_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_MultiLabelClassification_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.MultiLabelClassification getDefaultInstanceForType() { return org.tensorflow.metadata.v0.MultiLabelClassification.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.MultiLabelClassification build() { org.tensorflow.metadata.v0.MultiLabelClassification result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.MultiLabelClassification buildPartial() { org.tensorflow.metadata.v0.MultiLabelClassification result = new org.tensorflow.metadata.v0.MultiLabelClassification(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(org.tensorflow.metadata.v0.MultiLabelClassification result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.exampleWeight_ = exampleWeight_; } } private void buildPartialOneofs(org.tensorflow.metadata.v0.MultiLabelClassification result) { result.labelIdCase_ = labelIdCase_; result.labelId_ = this.labelId_; if (labelIdCase_ == 5 && labelPathBuilder_ != null) { result.labelId_ = labelPathBuilder_.build(); } result.classSpecCase_ = classSpecCase_; result.classSpec_ = this.classSpec_; if (classSpecCase_ == 4 && dynamicClassSpecBuilder_ != null) { result.classSpec_ = dynamicClassSpecBuilder_.build(); } } @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 org.tensorflow.metadata.v0.MultiLabelClassification) { return mergeFrom((org.tensorflow.metadata.v0.MultiLabelClassification)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.MultiLabelClassification other) { if (other == org.tensorflow.metadata.v0.MultiLabelClassification.getDefaultInstance()) return this; if (!other.getExampleWeight().isEmpty()) { exampleWeight_ = other.exampleWeight_; bitField0_ |= 0x00000004; onChanged(); } switch (other.getLabelIdCase()) { case LABEL: { labelIdCase_ = 1; labelId_ = other.labelId_; onChanged(); break; } case LABEL_PATH: { mergeLabelPath(other.getLabelPath()); break; } case LABELID_NOT_SET: { break; } } switch (other.getClassSpecCase()) { case N_CLASSES: { setNClasses(other.getNClasses()); break; } case DYNAMIC_CLASS_SPEC: { mergeDynamicClassSpec(other.getDynamicClassSpec()); break; } case CLASSSPEC_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 10: { java.lang.String s = input.readStringRequireUtf8(); labelIdCase_ = 1; labelId_ = s; break; } // case 10 case 18: { exampleWeight_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 18 case 24: { classSpec_ = input.readUInt64(); classSpecCase_ = 3; break; } // case 24 case 34: { input.readMessage( getDynamicClassSpecFieldBuilder().getBuilder(), extensionRegistry); classSpecCase_ = 4; break; } // case 34 case 42: { input.readMessage( getLabelPathFieldBuilder().getBuilder(), extensionRegistry); labelIdCase_ = 5; break; } // case 42 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 labelIdCase_ = 0; private java.lang.Object labelId_; public LabelIdCase getLabelIdCase() { return LabelIdCase.forNumber( labelIdCase_); } public Builder clearLabelId() { labelIdCase_ = 0; labelId_ = null; onChanged(); return this; } private int classSpecCase_ = 0; private java.lang.Object classSpec_; public ClassSpecCase getClassSpecCase() { return ClassSpecCase.forNumber( classSpecCase_); } public Builder clearClassSpec() { classSpecCase_ = 0; classSpec_ = null; onChanged(); return this; } private int bitField0_; /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @return Whether the label field is set. */ @java.lang.Override public boolean hasLabel() { return labelIdCase_ == 1; } /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @return The label. */ @java.lang.Override public java.lang.String getLabel() { java.lang.Object ref = ""; if (labelIdCase_ == 1) { ref = labelId_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (labelIdCase_ == 1) { labelId_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @return The bytes for label. */ @java.lang.Override public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = ""; if (labelIdCase_ == 1) { ref = labelId_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (labelIdCase_ == 1) { labelId_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @param value The label to set. * @return This builder for chaining. */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } labelIdCase_ = 1; labelId_ = value; onChanged(); return this; } /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @return This builder for chaining. */ public Builder clearLabel() { if (labelIdCase_ == 1) { labelIdCase_ = 0; labelId_ = null; onChanged(); } return this; } /** *
     * The name of the label. Assumes the label is a flat, top-level field.
     * 
* * string label = 1; * @param value The bytes for label to set. * @return This builder for chaining. */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); labelIdCase_ = 1; labelId_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder> labelPathBuilder_; /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; * @return Whether the labelPath field is set. */ @java.lang.Override public boolean hasLabelPath() { return labelIdCase_ == 5; } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; * @return The labelPath. */ @java.lang.Override public org.tensorflow.metadata.v0.Path getLabelPath() { if (labelPathBuilder_ == null) { if (labelIdCase_ == 5) { return (org.tensorflow.metadata.v0.Path) labelId_; } return org.tensorflow.metadata.v0.Path.getDefaultInstance(); } else { if (labelIdCase_ == 5) { return labelPathBuilder_.getMessage(); } return org.tensorflow.metadata.v0.Path.getDefaultInstance(); } } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ public Builder setLabelPath(org.tensorflow.metadata.v0.Path value) { if (labelPathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } labelId_ = value; onChanged(); } else { labelPathBuilder_.setMessage(value); } labelIdCase_ = 5; return this; } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ public Builder setLabelPath( org.tensorflow.metadata.v0.Path.Builder builderForValue) { if (labelPathBuilder_ == null) { labelId_ = builderForValue.build(); onChanged(); } else { labelPathBuilder_.setMessage(builderForValue.build()); } labelIdCase_ = 5; return this; } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ public Builder mergeLabelPath(org.tensorflow.metadata.v0.Path value) { if (labelPathBuilder_ == null) { if (labelIdCase_ == 5 && labelId_ != org.tensorflow.metadata.v0.Path.getDefaultInstance()) { labelId_ = org.tensorflow.metadata.v0.Path.newBuilder((org.tensorflow.metadata.v0.Path) labelId_) .mergeFrom(value).buildPartial(); } else { labelId_ = value; } onChanged(); } else { if (labelIdCase_ == 5) { labelPathBuilder_.mergeFrom(value); } else { labelPathBuilder_.setMessage(value); } } labelIdCase_ = 5; return this; } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ public Builder clearLabelPath() { if (labelPathBuilder_ == null) { if (labelIdCase_ == 5) { labelIdCase_ = 0; labelId_ = null; onChanged(); } } else { if (labelIdCase_ == 5) { labelIdCase_ = 0; labelId_ = null; } labelPathBuilder_.clear(); } return this; } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ public org.tensorflow.metadata.v0.Path.Builder getLabelPathBuilder() { return getLabelPathFieldBuilder().getBuilder(); } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ @java.lang.Override public org.tensorflow.metadata.v0.PathOrBuilder getLabelPathOrBuilder() { if ((labelIdCase_ == 5) && (labelPathBuilder_ != null)) { return labelPathBuilder_.getMessageOrBuilder(); } else { if (labelIdCase_ == 5) { return (org.tensorflow.metadata.v0.Path) labelId_; } return org.tensorflow.metadata.v0.Path.getDefaultInstance(); } } /** *
     * A path can be used instead of a flat string if the label is nested.
     * 
* * .tensorflow.metadata.v0.Path label_path = 5; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder> getLabelPathFieldBuilder() { if (labelPathBuilder_ == null) { if (!(labelIdCase_ == 5)) { labelId_ = org.tensorflow.metadata.v0.Path.getDefaultInstance(); } labelPathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder>( (org.tensorflow.metadata.v0.Path) labelId_, getParentForChildren(), isClean()); labelId_ = null; } labelIdCase_ = 5; onChanged(); return labelPathBuilder_; } private java.lang.Object exampleWeight_ = ""; /** *
     * The weight column.
     * 
* * string example_weight = 2; * @return The exampleWeight. */ public java.lang.String getExampleWeight() { java.lang.Object ref = exampleWeight_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); exampleWeight_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The weight column.
     * 
* * string example_weight = 2; * @return The bytes for exampleWeight. */ public com.google.protobuf.ByteString getExampleWeightBytes() { java.lang.Object ref = exampleWeight_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); exampleWeight_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The weight column.
     * 
* * string example_weight = 2; * @param value The exampleWeight to set. * @return This builder for chaining. */ public Builder setExampleWeight( java.lang.String value) { if (value == null) { throw new NullPointerException(); } exampleWeight_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The weight column.
     * 
* * string example_weight = 2; * @return This builder for chaining. */ public Builder clearExampleWeight() { exampleWeight_ = getDefaultInstance().getExampleWeight(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * The weight column.
     * 
* * string example_weight = 2; * @param value The bytes for exampleWeight to set. * @return This builder for chaining. */ public Builder setExampleWeightBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); exampleWeight_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The exact number of unique class labels.
     * 
* * uint64 n_classes = 3; * @return Whether the nClasses field is set. */ public boolean hasNClasses() { return classSpecCase_ == 3; } /** *
     * The exact number of unique class labels.
     * 
* * uint64 n_classes = 3; * @return The nClasses. */ public long getNClasses() { if (classSpecCase_ == 3) { return (java.lang.Long) classSpec_; } return 0L; } /** *
     * The exact number of unique class labels.
     * 
* * uint64 n_classes = 3; * @param value The nClasses to set. * @return This builder for chaining. */ public Builder setNClasses(long value) { classSpecCase_ = 3; classSpec_ = value; onChanged(); return this; } /** *
     * The exact number of unique class labels.
     * 
* * uint64 n_classes = 3; * @return This builder for chaining. */ public Builder clearNClasses() { if (classSpecCase_ == 3) { classSpecCase_ = 0; classSpec_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder> dynamicClassSpecBuilder_; /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; * @return Whether the dynamicClassSpec field is set. */ @java.lang.Override public boolean hasDynamicClassSpec() { return classSpecCase_ == 4; } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; * @return The dynamicClassSpec. */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec getDynamicClassSpec() { if (dynamicClassSpecBuilder_ == null) { if (classSpecCase_ == 4) { return (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_; } return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } else { if (classSpecCase_ == 4) { return dynamicClassSpecBuilder_.getMessage(); } return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ public Builder setDynamicClassSpec(org.tensorflow.metadata.v0.DynamicClassSpec value) { if (dynamicClassSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } classSpec_ = value; onChanged(); } else { dynamicClassSpecBuilder_.setMessage(value); } classSpecCase_ = 4; return this; } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ public Builder setDynamicClassSpec( org.tensorflow.metadata.v0.DynamicClassSpec.Builder builderForValue) { if (dynamicClassSpecBuilder_ == null) { classSpec_ = builderForValue.build(); onChanged(); } else { dynamicClassSpecBuilder_.setMessage(builderForValue.build()); } classSpecCase_ = 4; return this; } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ public Builder mergeDynamicClassSpec(org.tensorflow.metadata.v0.DynamicClassSpec value) { if (dynamicClassSpecBuilder_ == null) { if (classSpecCase_ == 4 && classSpec_ != org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance()) { classSpec_ = org.tensorflow.metadata.v0.DynamicClassSpec.newBuilder((org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_) .mergeFrom(value).buildPartial(); } else { classSpec_ = value; } onChanged(); } else { if (classSpecCase_ == 4) { dynamicClassSpecBuilder_.mergeFrom(value); } else { dynamicClassSpecBuilder_.setMessage(value); } } classSpecCase_ = 4; return this; } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ public Builder clearDynamicClassSpec() { if (dynamicClassSpecBuilder_ == null) { if (classSpecCase_ == 4) { classSpecCase_ = 0; classSpec_ = null; onChanged(); } } else { if (classSpecCase_ == 4) { classSpecCase_ = 0; classSpec_ = null; } dynamicClassSpecBuilder_.clear(); } return this; } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ public org.tensorflow.metadata.v0.DynamicClassSpec.Builder getDynamicClassSpecBuilder() { return getDynamicClassSpecFieldBuilder().getBuilder(); } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder getDynamicClassSpecOrBuilder() { if ((classSpecCase_ == 4) && (dynamicClassSpecBuilder_ != null)) { return dynamicClassSpecBuilder_.getMessageOrBuilder(); } else { if (classSpecCase_ == 4) { return (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_; } return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } } /** *
     * The maximal number of label classes that should be inferred dynamically
     * from the data.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec dynamic_class_spec = 4; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder> getDynamicClassSpecFieldBuilder() { if (dynamicClassSpecBuilder_ == null) { if (!(classSpecCase_ == 4)) { classSpec_ = org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } dynamicClassSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder>( (org.tensorflow.metadata.v0.DynamicClassSpec) classSpec_, getParentForChildren(), isClean()); classSpec_ = null; } classSpecCase_ = 4; onChanged(); return dynamicClassSpecBuilder_; } @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:tensorflow.metadata.v0.MultiLabelClassification) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.MultiLabelClassification) private static final org.tensorflow.metadata.v0.MultiLabelClassification DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.MultiLabelClassification(); } public static org.tensorflow.metadata.v0.MultiLabelClassification getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MultiLabelClassification 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 org.tensorflow.metadata.v0.MultiLabelClassification getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy