org.tensorflow.metadata.v0.CustomStatistic Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/statistics.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* Stores the name and value of any custom statistic. The value can be a string,
* double, or histogram.
*
*
* Protobuf type {@code tensorflow.metadata.v0.CustomStatistic}
*/
public final class CustomStatistic extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.CustomStatistic)
CustomStatisticOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomStatistic.newBuilder() to construct.
private CustomStatistic(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CustomStatistic() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CustomStatistic();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_CustomStatistic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_CustomStatistic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.CustomStatistic.class, org.tensorflow.metadata.v0.CustomStatistic.Builder.class);
}
private int valCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object val_;
public enum ValCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NUM(2),
STR(3),
HISTOGRAM(4),
RANK_HISTOGRAM(5),
ANY(6),
VAL_NOT_SET(0);
private final int value;
private ValCase(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 ValCase valueOf(int value) {
return forNumber(value);
}
public static ValCase forNumber(int value) {
switch (value) {
case 2: return NUM;
case 3: return STR;
case 4: return HISTOGRAM;
case 5: return RANK_HISTOGRAM;
case 6: return ANY;
case 0: return VAL_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValCase
getValCase() {
return ValCase.forNumber(
valCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* 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();
name_ = s;
return s;
}
}
/**
* 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 NUM_FIELD_NUMBER = 2;
/**
* double num = 2;
* @return Whether the num field is set.
*/
@java.lang.Override
public boolean hasNum() {
return valCase_ == 2;
}
/**
* double num = 2;
* @return The num.
*/
@java.lang.Override
public double getNum() {
if (valCase_ == 2) {
return (java.lang.Double) val_;
}
return 0D;
}
public static final int STR_FIELD_NUMBER = 3;
/**
* string str = 3;
* @return Whether the str field is set.
*/
public boolean hasStr() {
return valCase_ == 3;
}
/**
* string str = 3;
* @return The str.
*/
public java.lang.String getStr() {
java.lang.Object ref = "";
if (valCase_ == 3) {
ref = val_;
}
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 (valCase_ == 3) {
val_ = s;
}
return s;
}
}
/**
* string str = 3;
* @return The bytes for str.
*/
public com.google.protobuf.ByteString
getStrBytes() {
java.lang.Object ref = "";
if (valCase_ == 3) {
ref = val_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valCase_ == 3) {
val_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HISTOGRAM_FIELD_NUMBER = 4;
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
* @return Whether the histogram field is set.
*/
@java.lang.Override
public boolean hasHistogram() {
return valCase_ == 4;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
* @return The histogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Histogram getHistogram() {
if (valCase_ == 4) {
return (org.tensorflow.metadata.v0.Histogram) val_;
}
return org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.HistogramOrBuilder getHistogramOrBuilder() {
if (valCase_ == 4) {
return (org.tensorflow.metadata.v0.Histogram) val_;
}
return org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
}
public static final int RANK_HISTOGRAM_FIELD_NUMBER = 5;
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return Whether the rankHistogram field is set.
*/
@java.lang.Override
public boolean hasRankHistogram() {
return valCase_ == 5;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return The rankHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
if (valCase_ == 5) {
return (org.tensorflow.metadata.v0.RankHistogram) val_;
}
return org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
if (valCase_ == 5) {
return (org.tensorflow.metadata.v0.RankHistogram) val_;
}
return org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
}
public static final int ANY_FIELD_NUMBER = 6;
/**
* .google.protobuf.Any any = 6;
* @return Whether the any field is set.
*/
@java.lang.Override
public boolean hasAny() {
return valCase_ == 6;
}
/**
* .google.protobuf.Any any = 6;
* @return The any.
*/
@java.lang.Override
public com.google.protobuf.Any getAny() {
if (valCase_ == 6) {
return (com.google.protobuf.Any) val_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
/**
* .google.protobuf.Any any = 6;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getAnyOrBuilder() {
if (valCase_ == 6) {
return (com.google.protobuf.Any) val_;
}
return com.google.protobuf.Any.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (valCase_ == 2) {
output.writeDouble(
2, (double)((java.lang.Double) val_));
}
if (valCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, val_);
}
if (valCase_ == 4) {
output.writeMessage(4, (org.tensorflow.metadata.v0.Histogram) val_);
}
if (valCase_ == 5) {
output.writeMessage(5, (org.tensorflow.metadata.v0.RankHistogram) val_);
}
if (valCase_ == 6) {
output.writeMessage(6, (com.google.protobuf.Any) val_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (valCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
2, (double)((java.lang.Double) val_));
}
if (valCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, val_);
}
if (valCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.tensorflow.metadata.v0.Histogram) val_);
}
if (valCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (org.tensorflow.metadata.v0.RankHistogram) val_);
}
if (valCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (com.google.protobuf.Any) val_);
}
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.CustomStatistic)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.CustomStatistic other = (org.tensorflow.metadata.v0.CustomStatistic) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getValCase().equals(other.getValCase())) return false;
switch (valCase_) {
case 2:
if (java.lang.Double.doubleToLongBits(getNum())
!= java.lang.Double.doubleToLongBits(
other.getNum())) return false;
break;
case 3:
if (!getStr()
.equals(other.getStr())) return false;
break;
case 4:
if (!getHistogram()
.equals(other.getHistogram())) return false;
break;
case 5:
if (!getRankHistogram()
.equals(other.getRankHistogram())) return false;
break;
case 6:
if (!getAny()
.equals(other.getAny())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
switch (valCase_) {
case 2:
hash = (37 * hash) + NUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getNum()));
break;
case 3:
hash = (37 * hash) + STR_FIELD_NUMBER;
hash = (53 * hash) + getStr().hashCode();
break;
case 4:
hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getHistogram().hashCode();
break;
case 5:
hash = (37 * hash) + RANK_HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getRankHistogram().hashCode();
break;
case 6:
hash = (37 * hash) + ANY_FIELD_NUMBER;
hash = (53 * hash) + getAny().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.CustomStatistic parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.CustomStatistic 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.CustomStatistic parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.CustomStatistic 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.CustomStatistic parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.CustomStatistic parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.CustomStatistic parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.CustomStatistic 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.CustomStatistic parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.CustomStatistic 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.CustomStatistic parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.CustomStatistic 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.CustomStatistic 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;
}
/**
*
* Stores the name and value of any custom statistic. The value can be a string,
* double, or histogram.
*
*
* Protobuf type {@code tensorflow.metadata.v0.CustomStatistic}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.CustomStatistic)
org.tensorflow.metadata.v0.CustomStatisticOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_CustomStatistic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_CustomStatistic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.CustomStatistic.class, org.tensorflow.metadata.v0.CustomStatistic.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.CustomStatistic.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
if (histogramBuilder_ != null) {
histogramBuilder_.clear();
}
if (rankHistogramBuilder_ != null) {
rankHistogramBuilder_.clear();
}
if (anyBuilder_ != null) {
anyBuilder_.clear();
}
valCase_ = 0;
val_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_CustomStatistic_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.CustomStatistic getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.CustomStatistic.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.CustomStatistic build() {
org.tensorflow.metadata.v0.CustomStatistic result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.CustomStatistic buildPartial() {
org.tensorflow.metadata.v0.CustomStatistic result = new org.tensorflow.metadata.v0.CustomStatistic(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.CustomStatistic result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
}
private void buildPartialOneofs(org.tensorflow.metadata.v0.CustomStatistic result) {
result.valCase_ = valCase_;
result.val_ = this.val_;
if (valCase_ == 4 &&
histogramBuilder_ != null) {
result.val_ = histogramBuilder_.build();
}
if (valCase_ == 5 &&
rankHistogramBuilder_ != null) {
result.val_ = rankHistogramBuilder_.build();
}
if (valCase_ == 6 &&
anyBuilder_ != null) {
result.val_ = anyBuilder_.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.CustomStatistic) {
return mergeFrom((org.tensorflow.metadata.v0.CustomStatistic)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.CustomStatistic other) {
if (other == org.tensorflow.metadata.v0.CustomStatistic.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
switch (other.getValCase()) {
case NUM: {
setNum(other.getNum());
break;
}
case STR: {
valCase_ = 3;
val_ = other.val_;
onChanged();
break;
}
case HISTOGRAM: {
mergeHistogram(other.getHistogram());
break;
}
case RANK_HISTOGRAM: {
mergeRankHistogram(other.getRankHistogram());
break;
}
case ANY: {
mergeAny(other.getAny());
break;
}
case VAL_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: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 17: {
val_ = input.readDouble();
valCase_ = 2;
break;
} // case 17
case 26: {
java.lang.String s = input.readStringRequireUtf8();
valCase_ = 3;
val_ = s;
break;
} // case 26
case 34: {
input.readMessage(
getHistogramFieldBuilder().getBuilder(),
extensionRegistry);
valCase_ = 4;
break;
} // case 34
case 42: {
input.readMessage(
getRankHistogramFieldBuilder().getBuilder(),
extensionRegistry);
valCase_ = 5;
break;
} // case 42
case 50: {
input.readMessage(
getAnyFieldBuilder().getBuilder(),
extensionRegistry);
valCase_ = 6;
break;
} // case 50
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 valCase_ = 0;
private java.lang.Object val_;
public ValCase
getValCase() {
return ValCase.forNumber(
valCase_);
}
public Builder clearVal() {
valCase_ = 0;
val_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* 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();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* 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;
}
}
/**
* 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;
}
/**
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* 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(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* double num = 2;
* @return Whether the num field is set.
*/
public boolean hasNum() {
return valCase_ == 2;
}
/**
* double num = 2;
* @return The num.
*/
public double getNum() {
if (valCase_ == 2) {
return (java.lang.Double) val_;
}
return 0D;
}
/**
* double num = 2;
* @param value The num to set.
* @return This builder for chaining.
*/
public Builder setNum(double value) {
valCase_ = 2;
val_ = value;
onChanged();
return this;
}
/**
* double num = 2;
* @return This builder for chaining.
*/
public Builder clearNum() {
if (valCase_ == 2) {
valCase_ = 0;
val_ = null;
onChanged();
}
return this;
}
/**
* string str = 3;
* @return Whether the str field is set.
*/
@java.lang.Override
public boolean hasStr() {
return valCase_ == 3;
}
/**
* string str = 3;
* @return The str.
*/
@java.lang.Override
public java.lang.String getStr() {
java.lang.Object ref = "";
if (valCase_ == 3) {
ref = val_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valCase_ == 3) {
val_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string str = 3;
* @return The bytes for str.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStrBytes() {
java.lang.Object ref = "";
if (valCase_ == 3) {
ref = val_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valCase_ == 3) {
val_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string str = 3;
* @param value The str to set.
* @return This builder for chaining.
*/
public Builder setStr(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
valCase_ = 3;
val_ = value;
onChanged();
return this;
}
/**
* string str = 3;
* @return This builder for chaining.
*/
public Builder clearStr() {
if (valCase_ == 3) {
valCase_ = 0;
val_ = null;
onChanged();
}
return this;
}
/**
* string str = 3;
* @param value The bytes for str to set.
* @return This builder for chaining.
*/
public Builder setStrBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
valCase_ = 3;
val_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder> histogramBuilder_;
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
* @return Whether the histogram field is set.
*/
@java.lang.Override
public boolean hasHistogram() {
return valCase_ == 4;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
* @return The histogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Histogram getHistogram() {
if (histogramBuilder_ == null) {
if (valCase_ == 4) {
return (org.tensorflow.metadata.v0.Histogram) val_;
}
return org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
} else {
if (valCase_ == 4) {
return histogramBuilder_.getMessage();
}
return org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
}
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
public Builder setHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (histogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
val_ = value;
onChanged();
} else {
histogramBuilder_.setMessage(value);
}
valCase_ = 4;
return this;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
public Builder setHistogram(
org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (histogramBuilder_ == null) {
val_ = builderForValue.build();
onChanged();
} else {
histogramBuilder_.setMessage(builderForValue.build());
}
valCase_ = 4;
return this;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
public Builder mergeHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (histogramBuilder_ == null) {
if (valCase_ == 4 &&
val_ != org.tensorflow.metadata.v0.Histogram.getDefaultInstance()) {
val_ = org.tensorflow.metadata.v0.Histogram.newBuilder((org.tensorflow.metadata.v0.Histogram) val_)
.mergeFrom(value).buildPartial();
} else {
val_ = value;
}
onChanged();
} else {
if (valCase_ == 4) {
histogramBuilder_.mergeFrom(value);
} else {
histogramBuilder_.setMessage(value);
}
}
valCase_ = 4;
return this;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
public Builder clearHistogram() {
if (histogramBuilder_ == null) {
if (valCase_ == 4) {
valCase_ = 0;
val_ = null;
onChanged();
}
} else {
if (valCase_ == 4) {
valCase_ = 0;
val_ = null;
}
histogramBuilder_.clear();
}
return this;
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
public org.tensorflow.metadata.v0.Histogram.Builder getHistogramBuilder() {
return getHistogramFieldBuilder().getBuilder();
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.HistogramOrBuilder getHistogramOrBuilder() {
if ((valCase_ == 4) && (histogramBuilder_ != null)) {
return histogramBuilder_.getMessageOrBuilder();
} else {
if (valCase_ == 4) {
return (org.tensorflow.metadata.v0.Histogram) val_;
}
return org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
}
}
/**
* .tensorflow.metadata.v0.Histogram histogram = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>
getHistogramFieldBuilder() {
if (histogramBuilder_ == null) {
if (!(valCase_ == 4)) {
val_ = org.tensorflow.metadata.v0.Histogram.getDefaultInstance();
}
histogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>(
(org.tensorflow.metadata.v0.Histogram) val_,
getParentForChildren(),
isClean());
val_ = null;
}
valCase_ = 4;
onChanged();
return histogramBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder> rankHistogramBuilder_;
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return Whether the rankHistogram field is set.
*/
@java.lang.Override
public boolean hasRankHistogram() {
return valCase_ == 5;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return The rankHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
if (rankHistogramBuilder_ == null) {
if (valCase_ == 5) {
return (org.tensorflow.metadata.v0.RankHistogram) val_;
}
return org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
} else {
if (valCase_ == 5) {
return rankHistogramBuilder_.getMessage();
}
return org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
}
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder setRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
val_ = value;
onChanged();
} else {
rankHistogramBuilder_.setMessage(value);
}
valCase_ = 5;
return this;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder setRankHistogram(
org.tensorflow.metadata.v0.RankHistogram.Builder builderForValue) {
if (rankHistogramBuilder_ == null) {
val_ = builderForValue.build();
onChanged();
} else {
rankHistogramBuilder_.setMessage(builderForValue.build());
}
valCase_ = 5;
return this;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder mergeRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (valCase_ == 5 &&
val_ != org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance()) {
val_ = org.tensorflow.metadata.v0.RankHistogram.newBuilder((org.tensorflow.metadata.v0.RankHistogram) val_)
.mergeFrom(value).buildPartial();
} else {
val_ = value;
}
onChanged();
} else {
if (valCase_ == 5) {
rankHistogramBuilder_.mergeFrom(value);
} else {
rankHistogramBuilder_.setMessage(value);
}
}
valCase_ = 5;
return this;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder clearRankHistogram() {
if (rankHistogramBuilder_ == null) {
if (valCase_ == 5) {
valCase_ = 0;
val_ = null;
onChanged();
}
} else {
if (valCase_ == 5) {
valCase_ = 0;
val_ = null;
}
rankHistogramBuilder_.clear();
}
return this;
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public org.tensorflow.metadata.v0.RankHistogram.Builder getRankHistogramBuilder() {
return getRankHistogramFieldBuilder().getBuilder();
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
if ((valCase_ == 5) && (rankHistogramBuilder_ != null)) {
return rankHistogramBuilder_.getMessageOrBuilder();
} else {
if (valCase_ == 5) {
return (org.tensorflow.metadata.v0.RankHistogram) val_;
}
return org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
}
}
/**
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>
getRankHistogramFieldBuilder() {
if (rankHistogramBuilder_ == null) {
if (!(valCase_ == 5)) {
val_ = org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance();
}
rankHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>(
(org.tensorflow.metadata.v0.RankHistogram) val_,
getParentForChildren(),
isClean());
val_ = null;
}
valCase_ = 5;
onChanged();
return rankHistogramBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> anyBuilder_;
/**
* .google.protobuf.Any any = 6;
* @return Whether the any field is set.
*/
@java.lang.Override
public boolean hasAny() {
return valCase_ == 6;
}
/**
* .google.protobuf.Any any = 6;
* @return The any.
*/
@java.lang.Override
public com.google.protobuf.Any getAny() {
if (anyBuilder_ == null) {
if (valCase_ == 6) {
return (com.google.protobuf.Any) val_;
}
return com.google.protobuf.Any.getDefaultInstance();
} else {
if (valCase_ == 6) {
return anyBuilder_.getMessage();
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
* .google.protobuf.Any any = 6;
*/
public Builder setAny(com.google.protobuf.Any value) {
if (anyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
val_ = value;
onChanged();
} else {
anyBuilder_.setMessage(value);
}
valCase_ = 6;
return this;
}
/**
* .google.protobuf.Any any = 6;
*/
public Builder setAny(
com.google.protobuf.Any.Builder builderForValue) {
if (anyBuilder_ == null) {
val_ = builderForValue.build();
onChanged();
} else {
anyBuilder_.setMessage(builderForValue.build());
}
valCase_ = 6;
return this;
}
/**
* .google.protobuf.Any any = 6;
*/
public Builder mergeAny(com.google.protobuf.Any value) {
if (anyBuilder_ == null) {
if (valCase_ == 6 &&
val_ != com.google.protobuf.Any.getDefaultInstance()) {
val_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) val_)
.mergeFrom(value).buildPartial();
} else {
val_ = value;
}
onChanged();
} else {
if (valCase_ == 6) {
anyBuilder_.mergeFrom(value);
} else {
anyBuilder_.setMessage(value);
}
}
valCase_ = 6;
return this;
}
/**
* .google.protobuf.Any any = 6;
*/
public Builder clearAny() {
if (anyBuilder_ == null) {
if (valCase_ == 6) {
valCase_ = 0;
val_ = null;
onChanged();
}
} else {
if (valCase_ == 6) {
valCase_ = 0;
val_ = null;
}
anyBuilder_.clear();
}
return this;
}
/**
* .google.protobuf.Any any = 6;
*/
public com.google.protobuf.Any.Builder getAnyBuilder() {
return getAnyFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Any any = 6;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getAnyOrBuilder() {
if ((valCase_ == 6) && (anyBuilder_ != null)) {
return anyBuilder_.getMessageOrBuilder();
} else {
if (valCase_ == 6) {
return (com.google.protobuf.Any) val_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
* .google.protobuf.Any any = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getAnyFieldBuilder() {
if (anyBuilder_ == null) {
if (!(valCase_ == 6)) {
val_ = com.google.protobuf.Any.getDefaultInstance();
}
anyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
(com.google.protobuf.Any) val_,
getParentForChildren(),
isClean());
val_ = null;
}
valCase_ = 6;
onChanged();
return anyBuilder_;
}
@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.CustomStatistic)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.CustomStatistic)
private static final org.tensorflow.metadata.v0.CustomStatistic DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.CustomStatistic();
}
public static org.tensorflow.metadata.v0.CustomStatistic getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CustomStatistic 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.CustomStatistic getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy