org.tensorflow.metadata.v0.WeightedFeature Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/schema.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* Represents a weighted feature that is encoded as a combination of raw base
* features. The `weight_feature` should be a float feature with identical
* shape as the `feature`. This is useful for representing weights associated
* with categorical tokens (e.g. a TFIDF weight associated with each token).
* TODO(b/142122960): Handle WeightedCategorical end to end in TFX (validation,
* TFX Unit Testing, etc)
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedFeature}
*/
public final class WeightedFeature extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.WeightedFeature)
WeightedFeatureOrBuilder {
private static final long serialVersionUID = 0L;
// Use WeightedFeature.newBuilder() to construct.
private WeightedFeature(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WeightedFeature() {
name_ = "";
lifecycleStage_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WeightedFeature();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_WeightedFeature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_WeightedFeature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedFeature.class, org.tensorflow.metadata.v0.WeightedFeature.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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 (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEATURE_FIELD_NUMBER = 2;
private org.tensorflow.metadata.v0.Path feature_;
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
* @return Whether the feature field is set.
*/
@java.lang.Override
public boolean hasFeature() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
* @return The feature.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Path getFeature() {
return feature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : feature_;
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.PathOrBuilder getFeatureOrBuilder() {
return feature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : feature_;
}
public static final int WEIGHT_FEATURE_FIELD_NUMBER = 3;
private org.tensorflow.metadata.v0.Path weightFeature_;
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
* @return Whether the weightFeature field is set.
*/
@java.lang.Override
public boolean hasWeightFeature() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
* @return The weightFeature.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Path getWeightFeature() {
return weightFeature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : weightFeature_;
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.PathOrBuilder getWeightFeatureOrBuilder() {
return weightFeature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : weightFeature_;
}
public static final int LIFECYCLE_STAGE_FIELD_NUMBER = 4;
private int lifecycleStage_ = 0;
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @return Whether the lifecycleStage field is set.
*/
@java.lang.Override public boolean hasLifecycleStage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @return The lifecycleStage.
*/
@java.lang.Override public org.tensorflow.metadata.v0.LifecycleStage getLifecycleStage() {
org.tensorflow.metadata.v0.LifecycleStage result = org.tensorflow.metadata.v0.LifecycleStage.forNumber(lifecycleStage_);
return result == null ? org.tensorflow.metadata.v0.LifecycleStage.UNKNOWN_STAGE : result;
}
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 (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getFeature());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getWeightFeature());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeEnum(4, lifecycleStage_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFeature());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getWeightFeature());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, lifecycleStage_);
}
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.WeightedFeature)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.WeightedFeature other = (org.tensorflow.metadata.v0.WeightedFeature) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasFeature() != other.hasFeature()) return false;
if (hasFeature()) {
if (!getFeature()
.equals(other.getFeature())) return false;
}
if (hasWeightFeature() != other.hasWeightFeature()) return false;
if (hasWeightFeature()) {
if (!getWeightFeature()
.equals(other.getWeightFeature())) return false;
}
if (hasLifecycleStage() != other.hasLifecycleStage()) return false;
if (hasLifecycleStage()) {
if (lifecycleStage_ != other.lifecycleStage_) return false;
}
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();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasFeature()) {
hash = (37 * hash) + FEATURE_FIELD_NUMBER;
hash = (53 * hash) + getFeature().hashCode();
}
if (hasWeightFeature()) {
hash = (37 * hash) + WEIGHT_FEATURE_FIELD_NUMBER;
hash = (53 * hash) + getWeightFeature().hashCode();
}
if (hasLifecycleStage()) {
hash = (37 * hash) + LIFECYCLE_STAGE_FIELD_NUMBER;
hash = (53 * hash) + lifecycleStage_;
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.WeightedFeature parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedFeature 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.WeightedFeature parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedFeature 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.WeightedFeature parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedFeature parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedFeature parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedFeature 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.WeightedFeature parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedFeature 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.WeightedFeature parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedFeature 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.WeightedFeature 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;
}
/**
*
* Represents a weighted feature that is encoded as a combination of raw base
* features. The `weight_feature` should be a float feature with identical
* shape as the `feature`. This is useful for representing weights associated
* with categorical tokens (e.g. a TFIDF weight associated with each token).
* TODO(b/142122960): Handle WeightedCategorical end to end in TFX (validation,
* TFX Unit Testing, etc)
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedFeature}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.WeightedFeature)
org.tensorflow.metadata.v0.WeightedFeatureOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_WeightedFeature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_WeightedFeature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedFeature.class, org.tensorflow.metadata.v0.WeightedFeature.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.WeightedFeature.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFeatureFieldBuilder();
getWeightFeatureFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
feature_ = null;
if (featureBuilder_ != null) {
featureBuilder_.dispose();
featureBuilder_ = null;
}
weightFeature_ = null;
if (weightFeatureBuilder_ != null) {
weightFeatureBuilder_.dispose();
weightFeatureBuilder_ = null;
}
lifecycleStage_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_WeightedFeature_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedFeature getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.WeightedFeature.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedFeature build() {
org.tensorflow.metadata.v0.WeightedFeature result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedFeature buildPartial() {
org.tensorflow.metadata.v0.WeightedFeature result = new org.tensorflow.metadata.v0.WeightedFeature(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.WeightedFeature result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.feature_ = featureBuilder_ == null
? feature_
: featureBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.weightFeature_ = weightFeatureBuilder_ == null
? weightFeature_
: weightFeatureBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.lifecycleStage_ = lifecycleStage_;
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@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.WeightedFeature) {
return mergeFrom((org.tensorflow.metadata.v0.WeightedFeature)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.WeightedFeature other) {
if (other == org.tensorflow.metadata.v0.WeightedFeature.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasFeature()) {
mergeFeature(other.getFeature());
}
if (other.hasWeightFeature()) {
mergeWeightFeature(other.getWeightFeature());
}
if (other.hasLifecycleStage()) {
setLifecycleStage(other.getLifecycleStage());
}
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: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getFeatureFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getWeightFeatureFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
int tmpRaw = input.readEnum();
org.tensorflow.metadata.v0.LifecycleStage tmpValue =
org.tensorflow.metadata.v0.LifecycleStage.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(4, tmpRaw);
} else {
lifecycleStage_ = tmpRaw;
bitField0_ |= 0x00000008;
}
break;
} // case 32
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 bitField0_;
private java.lang.Object name_ = "";
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Name for the weighted feature. This should not clash with other features in
* the same schema.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private org.tensorflow.metadata.v0.Path feature_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder> featureBuilder_;
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
* @return Whether the feature field is set.
*/
public boolean hasFeature() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
* @return The feature.
*/
public org.tensorflow.metadata.v0.Path getFeature() {
if (featureBuilder_ == null) {
return feature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : feature_;
} else {
return featureBuilder_.getMessage();
}
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public Builder setFeature(org.tensorflow.metadata.v0.Path value) {
if (featureBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
feature_ = value;
} else {
featureBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public Builder setFeature(
org.tensorflow.metadata.v0.Path.Builder builderForValue) {
if (featureBuilder_ == null) {
feature_ = builderForValue.build();
} else {
featureBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public Builder mergeFeature(org.tensorflow.metadata.v0.Path value) {
if (featureBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
feature_ != null &&
feature_ != org.tensorflow.metadata.v0.Path.getDefaultInstance()) {
getFeatureBuilder().mergeFrom(value);
} else {
feature_ = value;
}
} else {
featureBuilder_.mergeFrom(value);
}
if (feature_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public Builder clearFeature() {
bitField0_ = (bitField0_ & ~0x00000002);
feature_ = null;
if (featureBuilder_ != null) {
featureBuilder_.dispose();
featureBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public org.tensorflow.metadata.v0.Path.Builder getFeatureBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getFeatureFieldBuilder().getBuilder();
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
public org.tensorflow.metadata.v0.PathOrBuilder getFeatureOrBuilder() {
if (featureBuilder_ != null) {
return featureBuilder_.getMessageOrBuilder();
} else {
return feature_ == null ?
org.tensorflow.metadata.v0.Path.getDefaultInstance() : feature_;
}
}
/**
*
* Path of a base feature to be weighted. Required.
*
*
* optional .tensorflow.metadata.v0.Path feature = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder>
getFeatureFieldBuilder() {
if (featureBuilder_ == null) {
featureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder>(
getFeature(),
getParentForChildren(),
isClean());
feature_ = null;
}
return featureBuilder_;
}
private org.tensorflow.metadata.v0.Path weightFeature_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder> weightFeatureBuilder_;
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
* @return Whether the weightFeature field is set.
*/
public boolean hasWeightFeature() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
* @return The weightFeature.
*/
public org.tensorflow.metadata.v0.Path getWeightFeature() {
if (weightFeatureBuilder_ == null) {
return weightFeature_ == null ? org.tensorflow.metadata.v0.Path.getDefaultInstance() : weightFeature_;
} else {
return weightFeatureBuilder_.getMessage();
}
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public Builder setWeightFeature(org.tensorflow.metadata.v0.Path value) {
if (weightFeatureBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
weightFeature_ = value;
} else {
weightFeatureBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public Builder setWeightFeature(
org.tensorflow.metadata.v0.Path.Builder builderForValue) {
if (weightFeatureBuilder_ == null) {
weightFeature_ = builderForValue.build();
} else {
weightFeatureBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public Builder mergeWeightFeature(org.tensorflow.metadata.v0.Path value) {
if (weightFeatureBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
weightFeature_ != null &&
weightFeature_ != org.tensorflow.metadata.v0.Path.getDefaultInstance()) {
getWeightFeatureBuilder().mergeFrom(value);
} else {
weightFeature_ = value;
}
} else {
weightFeatureBuilder_.mergeFrom(value);
}
if (weightFeature_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public Builder clearWeightFeature() {
bitField0_ = (bitField0_ & ~0x00000004);
weightFeature_ = null;
if (weightFeatureBuilder_ != null) {
weightFeatureBuilder_.dispose();
weightFeatureBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public org.tensorflow.metadata.v0.Path.Builder getWeightFeatureBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getWeightFeatureFieldBuilder().getBuilder();
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
public org.tensorflow.metadata.v0.PathOrBuilder getWeightFeatureOrBuilder() {
if (weightFeatureBuilder_ != null) {
return weightFeatureBuilder_.getMessageOrBuilder();
} else {
return weightFeature_ == null ?
org.tensorflow.metadata.v0.Path.getDefaultInstance() : weightFeature_;
}
}
/**
*
* Path of weight feature to associate with the base feature. Must be same
* shape as feature. Required.
*
*
* optional .tensorflow.metadata.v0.Path weight_feature = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder>
getWeightFeatureFieldBuilder() {
if (weightFeatureBuilder_ == null) {
weightFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Path, org.tensorflow.metadata.v0.Path.Builder, org.tensorflow.metadata.v0.PathOrBuilder>(
getWeightFeature(),
getParentForChildren(),
isClean());
weightFeature_ = null;
}
return weightFeatureBuilder_;
}
private int lifecycleStage_ = 0;
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @return Whether the lifecycleStage field is set.
*/
@java.lang.Override public boolean hasLifecycleStage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @return The lifecycleStage.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.LifecycleStage getLifecycleStage() {
org.tensorflow.metadata.v0.LifecycleStage result = org.tensorflow.metadata.v0.LifecycleStage.forNumber(lifecycleStage_);
return result == null ? org.tensorflow.metadata.v0.LifecycleStage.UNKNOWN_STAGE : result;
}
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @param value The lifecycleStage to set.
* @return This builder for chaining.
*/
public Builder setLifecycleStage(org.tensorflow.metadata.v0.LifecycleStage value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
lifecycleStage_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The lifecycle_stage determines where a feature is expected to be used,
* and therefore how important issues with it are.
*
*
* optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;
* @return This builder for chaining.
*/
public Builder clearLifecycleStage() {
bitField0_ = (bitField0_ & ~0x00000008);
lifecycleStage_ = 0;
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:tensorflow.metadata.v0.WeightedFeature)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.WeightedFeature)
private static final org.tensorflow.metadata.v0.WeightedFeature DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.WeightedFeature();
}
public static org.tensorflow.metadata.v0.WeightedFeature getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WeightedFeature 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.WeightedFeature getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy