org.tensorflow.metadata.v0.SequenceValueConstraints 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;
/**
*
* Encodes constraints on specific values in sequences.
*
*
* Protobuf type {@code tensorflow.metadata.v0.SequenceValueConstraints}
*/
public final class SequenceValueConstraints extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.SequenceValueConstraints)
SequenceValueConstraintsOrBuilder {
private static final long serialVersionUID = 0L;
// Use SequenceValueConstraints.newBuilder() to construct.
private SequenceValueConstraints(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SequenceValueConstraints() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SequenceValueConstraints();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_SequenceValueConstraints_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_SequenceValueConstraints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.SequenceValueConstraints.class, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder.class);
}
private int bitField0_;
private int valueCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INT_VALUE(1),
STRING_VALUE(2),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(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 ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 1: return INT_VALUE;
case 2: return STRING_VALUE;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int INT_VALUE_FIELD_NUMBER = 1;
/**
* int64 int_value = 1;
* @return Whether the intValue field is set.
*/
@java.lang.Override
public boolean hasIntValue() {
return valueCase_ == 1;
}
/**
* int64 int_value = 1;
* @return The intValue.
*/
@java.lang.Override
public long getIntValue() {
if (valueCase_ == 1) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int STRING_VALUE_FIELD_NUMBER = 2;
/**
* string string_value = 2;
* @return Whether the stringValue field is set.
*/
public boolean hasStringValue() {
return valueCase_ == 2;
}
/**
* string string_value = 2;
* @return The stringValue.
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
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() && (valueCase_ == 2)) {
value_ = s;
}
return s;
}
}
/**
* string string_value = 2;
* @return The bytes for stringValue.
*/
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 2) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MIN_PER_SEQUENCE_FIELD_NUMBER = 3;
private long minPerSequence_ = 0L;
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @return Whether the minPerSequence field is set.
*/
@java.lang.Override
public boolean hasMinPerSequence() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @return The minPerSequence.
*/
@java.lang.Override
public long getMinPerSequence() {
return minPerSequence_;
}
public static final int MAX_PER_SEQUENCE_FIELD_NUMBER = 4;
private long maxPerSequence_ = 0L;
/**
* optional int64 max_per_sequence = 4;
* @return Whether the maxPerSequence field is set.
*/
@java.lang.Override
public boolean hasMaxPerSequence() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional int64 max_per_sequence = 4;
* @return The maxPerSequence.
*/
@java.lang.Override
public long getMaxPerSequence() {
return maxPerSequence_;
}
public static final int MIN_FRACTION_OF_SEQUENCES_FIELD_NUMBER = 5;
private float minFractionOfSequences_ = 0F;
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @return Whether the minFractionOfSequences field is set.
*/
@java.lang.Override
public boolean hasMinFractionOfSequences() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @return The minFractionOfSequences.
*/
@java.lang.Override
public float getMinFractionOfSequences() {
return minFractionOfSequences_;
}
public static final int MAX_FRACTION_OF_SEQUENCES_FIELD_NUMBER = 6;
private float maxFractionOfSequences_ = 0F;
/**
* optional float max_fraction_of_sequences = 6;
* @return Whether the maxFractionOfSequences field is set.
*/
@java.lang.Override
public boolean hasMaxFractionOfSequences() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional float max_fraction_of_sequences = 6;
* @return The maxFractionOfSequences.
*/
@java.lang.Override
public float getMaxFractionOfSequences() {
return maxFractionOfSequences_;
}
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 (valueCase_ == 1) {
output.writeInt64(
1, (long)((java.lang.Long) value_));
}
if (valueCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(3, minPerSequence_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(4, maxPerSequence_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeFloat(5, minFractionOfSequences_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeFloat(6, maxFractionOfSequences_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
1, (long)((java.lang.Long) value_));
}
if (valueCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, minPerSequence_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, maxPerSequence_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, minFractionOfSequences_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(6, maxFractionOfSequences_);
}
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.SequenceValueConstraints)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.SequenceValueConstraints other = (org.tensorflow.metadata.v0.SequenceValueConstraints) obj;
if (hasMinPerSequence() != other.hasMinPerSequence()) return false;
if (hasMinPerSequence()) {
if (getMinPerSequence()
!= other.getMinPerSequence()) return false;
}
if (hasMaxPerSequence() != other.hasMaxPerSequence()) return false;
if (hasMaxPerSequence()) {
if (getMaxPerSequence()
!= other.getMaxPerSequence()) return false;
}
if (hasMinFractionOfSequences() != other.hasMinFractionOfSequences()) return false;
if (hasMinFractionOfSequences()) {
if (java.lang.Float.floatToIntBits(getMinFractionOfSequences())
!= java.lang.Float.floatToIntBits(
other.getMinFractionOfSequences())) return false;
}
if (hasMaxFractionOfSequences() != other.hasMaxFractionOfSequences()) return false;
if (hasMaxFractionOfSequences()) {
if (java.lang.Float.floatToIntBits(getMaxFractionOfSequences())
!= java.lang.Float.floatToIntBits(
other.getMaxFractionOfSequences())) return false;
}
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 1:
if (getIntValue()
!= other.getIntValue()) return false;
break;
case 2:
if (!getStringValue()
.equals(other.getStringValue())) 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();
if (hasMinPerSequence()) {
hash = (37 * hash) + MIN_PER_SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinPerSequence());
}
if (hasMaxPerSequence()) {
hash = (37 * hash) + MAX_PER_SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxPerSequence());
}
if (hasMinFractionOfSequences()) {
hash = (37 * hash) + MIN_FRACTION_OF_SEQUENCES_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMinFractionOfSequences());
}
if (hasMaxFractionOfSequences()) {
hash = (37 * hash) + MAX_FRACTION_OF_SEQUENCES_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMaxFractionOfSequences());
}
switch (valueCase_) {
case 1:
hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIntValue());
break;
case 2:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints 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.SequenceValueConstraints parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints 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.SequenceValueConstraints parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints 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.SequenceValueConstraints parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints 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.SequenceValueConstraints parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints 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.SequenceValueConstraints 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;
}
/**
*
* Encodes constraints on specific values in sequences.
*
*
* Protobuf type {@code tensorflow.metadata.v0.SequenceValueConstraints}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.SequenceValueConstraints)
org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_SequenceValueConstraints_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_SequenceValueConstraints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.SequenceValueConstraints.class, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.SequenceValueConstraints.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
minPerSequence_ = 0L;
maxPerSequence_ = 0L;
minFractionOfSequences_ = 0F;
maxFractionOfSequences_ = 0F;
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_SequenceValueConstraints_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.SequenceValueConstraints getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.SequenceValueConstraints.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.SequenceValueConstraints build() {
org.tensorflow.metadata.v0.SequenceValueConstraints result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.SequenceValueConstraints buildPartial() {
org.tensorflow.metadata.v0.SequenceValueConstraints result = new org.tensorflow.metadata.v0.SequenceValueConstraints(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.SequenceValueConstraints result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.minPerSequence_ = minPerSequence_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.maxPerSequence_ = maxPerSequence_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.minFractionOfSequences_ = minFractionOfSequences_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.maxFractionOfSequences_ = maxFractionOfSequences_;
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(org.tensorflow.metadata.v0.SequenceValueConstraints result) {
result.valueCase_ = valueCase_;
result.value_ = this.value_;
}
@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.SequenceValueConstraints) {
return mergeFrom((org.tensorflow.metadata.v0.SequenceValueConstraints)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.SequenceValueConstraints other) {
if (other == org.tensorflow.metadata.v0.SequenceValueConstraints.getDefaultInstance()) return this;
if (other.hasMinPerSequence()) {
setMinPerSequence(other.getMinPerSequence());
}
if (other.hasMaxPerSequence()) {
setMaxPerSequence(other.getMaxPerSequence());
}
if (other.hasMinFractionOfSequences()) {
setMinFractionOfSequences(other.getMinFractionOfSequences());
}
if (other.hasMaxFractionOfSequences()) {
setMaxFractionOfSequences(other.getMaxFractionOfSequences());
}
switch (other.getValueCase()) {
case INT_VALUE: {
setIntValue(other.getIntValue());
break;
}
case STRING_VALUE: {
valueCase_ = 2;
value_ = other.value_;
onChanged();
break;
}
case VALUE_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 8: {
value_ = input.readInt64();
valueCase_ = 1;
break;
} // case 8
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
valueCase_ = 2;
value_ = bs;
break;
} // case 18
case 24: {
minPerSequence_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
maxPerSequence_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
case 45: {
minFractionOfSequences_ = input.readFloat();
bitField0_ |= 0x00000010;
break;
} // case 45
case 53: {
maxFractionOfSequences_ = input.readFloat();
bitField0_ |= 0x00000020;
break;
} // case 53
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 valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
* int64 int_value = 1;
* @return Whether the intValue field is set.
*/
public boolean hasIntValue() {
return valueCase_ == 1;
}
/**
* int64 int_value = 1;
* @return The intValue.
*/
public long getIntValue() {
if (valueCase_ == 1) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
* int64 int_value = 1;
* @param value The intValue to set.
* @return This builder for chaining.
*/
public Builder setIntValue(long value) {
valueCase_ = 1;
value_ = value;
onChanged();
return this;
}
/**
* int64 int_value = 1;
* @return This builder for chaining.
*/
public Builder clearIntValue() {
if (valueCase_ == 1) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* string string_value = 2;
* @return Whether the stringValue field is set.
*/
@java.lang.Override
public boolean hasStringValue() {
return valueCase_ == 2;
}
/**
* string string_value = 2;
* @return The stringValue.
*/
@java.lang.Override
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 2) {
if (bs.isValidUtf8()) {
value_ = s;
}
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string string_value = 2;
* @return The bytes for stringValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 2) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 2) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string string_value = 2;
* @param value The stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
* string string_value = 2;
* @return This builder for chaining.
*/
public Builder clearStringValue() {
if (valueCase_ == 2) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* string string_value = 2;
* @param value The bytes for stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
private long minPerSequence_ ;
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @return Whether the minPerSequence field is set.
*/
@java.lang.Override
public boolean hasMinPerSequence() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @return The minPerSequence.
*/
@java.lang.Override
public long getMinPerSequence() {
return minPerSequence_;
}
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @param value The minPerSequence to set.
* @return This builder for chaining.
*/
public Builder setMinPerSequence(long value) {
minPerSequence_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Min / max number of times the value can occur in a sequence.
*
*
* optional int64 min_per_sequence = 3;
* @return This builder for chaining.
*/
public Builder clearMinPerSequence() {
bitField0_ = (bitField0_ & ~0x00000004);
minPerSequence_ = 0L;
onChanged();
return this;
}
private long maxPerSequence_ ;
/**
* optional int64 max_per_sequence = 4;
* @return Whether the maxPerSequence field is set.
*/
@java.lang.Override
public boolean hasMaxPerSequence() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional int64 max_per_sequence = 4;
* @return The maxPerSequence.
*/
@java.lang.Override
public long getMaxPerSequence() {
return maxPerSequence_;
}
/**
* optional int64 max_per_sequence = 4;
* @param value The maxPerSequence to set.
* @return This builder for chaining.
*/
public Builder setMaxPerSequence(long value) {
maxPerSequence_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional int64 max_per_sequence = 4;
* @return This builder for chaining.
*/
public Builder clearMaxPerSequence() {
bitField0_ = (bitField0_ & ~0x00000008);
maxPerSequence_ = 0L;
onChanged();
return this;
}
private float minFractionOfSequences_ ;
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @return Whether the minFractionOfSequences field is set.
*/
@java.lang.Override
public boolean hasMinFractionOfSequences() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @return The minFractionOfSequences.
*/
@java.lang.Override
public float getMinFractionOfSequences() {
return minFractionOfSequences_;
}
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @param value The minFractionOfSequences to set.
* @return This builder for chaining.
*/
public Builder setMinFractionOfSequences(float value) {
minFractionOfSequences_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Min / max fraction of sequences that must contain the value.
*
*
* optional float min_fraction_of_sequences = 5;
* @return This builder for chaining.
*/
public Builder clearMinFractionOfSequences() {
bitField0_ = (bitField0_ & ~0x00000010);
minFractionOfSequences_ = 0F;
onChanged();
return this;
}
private float maxFractionOfSequences_ ;
/**
* optional float max_fraction_of_sequences = 6;
* @return Whether the maxFractionOfSequences field is set.
*/
@java.lang.Override
public boolean hasMaxFractionOfSequences() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional float max_fraction_of_sequences = 6;
* @return The maxFractionOfSequences.
*/
@java.lang.Override
public float getMaxFractionOfSequences() {
return maxFractionOfSequences_;
}
/**
* optional float max_fraction_of_sequences = 6;
* @param value The maxFractionOfSequences to set.
* @return This builder for chaining.
*/
public Builder setMaxFractionOfSequences(float value) {
maxFractionOfSequences_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional float max_fraction_of_sequences = 6;
* @return This builder for chaining.
*/
public Builder clearMaxFractionOfSequences() {
bitField0_ = (bitField0_ & ~0x00000020);
maxFractionOfSequences_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.SequenceValueConstraints)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.SequenceValueConstraints)
private static final org.tensorflow.metadata.v0.SequenceValueConstraints DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.SequenceValueConstraints();
}
public static org.tensorflow.metadata.v0.SequenceValueConstraints getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SequenceValueConstraints 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.SequenceValueConstraints getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy