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

org.tensorflow.metadata.v0.NaturalLanguageDomain 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;

/**
 * 
 * Natural language text.
 * 
* * Protobuf type {@code tensorflow.metadata.v0.NaturalLanguageDomain} */ public final class NaturalLanguageDomain extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.NaturalLanguageDomain) NaturalLanguageDomainOrBuilder { private static final long serialVersionUID = 0L; // Use NaturalLanguageDomain.newBuilder() to construct. private NaturalLanguageDomain(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NaturalLanguageDomain() { vocabulary_ = ""; tokenConstraints_ = java.util.Collections.emptyList(); locationConstraintRegex_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new NaturalLanguageDomain(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_NaturalLanguageDomain_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_NaturalLanguageDomain_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.NaturalLanguageDomain.class, org.tensorflow.metadata.v0.NaturalLanguageDomain.Builder.class); } private int bitField0_; public static final int VOCABULARY_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object vocabulary_ = ""; /** *
   * Name of the vocabulary associated with the NaturalLanguageDomain.
   * When computing and validating stats using TFDV,
   * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
   * 
* * optional string vocabulary = 1; * @return Whether the vocabulary field is set. */ @java.lang.Override public boolean hasVocabulary() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Name of the vocabulary associated with the NaturalLanguageDomain.
   * When computing and validating stats using TFDV,
   * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
   * 
* * optional string vocabulary = 1; * @return The vocabulary. */ @java.lang.Override public java.lang.String getVocabulary() { java.lang.Object ref = vocabulary_; 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()) { vocabulary_ = s; } return s; } } /** *
   * Name of the vocabulary associated with the NaturalLanguageDomain.
   * When computing and validating stats using TFDV,
   * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
   * 
* * optional string vocabulary = 1; * @return The bytes for vocabulary. */ @java.lang.Override public com.google.protobuf.ByteString getVocabularyBytes() { java.lang.Object ref = vocabulary_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); vocabulary_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COVERAGE_FIELD_NUMBER = 2; private org.tensorflow.metadata.v0.FeatureCoverageConstraints coverage_; /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; * @return Whether the coverage field is set. */ @java.lang.Override public boolean hasCoverage() { return ((bitField0_ & 0x00000002) != 0); } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; * @return The coverage. */ @java.lang.Override public org.tensorflow.metadata.v0.FeatureCoverageConstraints getCoverage() { return coverage_ == null ? org.tensorflow.metadata.v0.FeatureCoverageConstraints.getDefaultInstance() : coverage_; } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ @java.lang.Override public org.tensorflow.metadata.v0.FeatureCoverageConstraintsOrBuilder getCoverageOrBuilder() { return coverage_ == null ? org.tensorflow.metadata.v0.FeatureCoverageConstraints.getDefaultInstance() : coverage_; } public static final int TOKEN_CONSTRAINTS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List tokenConstraints_; /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ @java.lang.Override public java.util.List getTokenConstraintsList() { return tokenConstraints_; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ @java.lang.Override public java.util.List getTokenConstraintsOrBuilderList() { return tokenConstraints_; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ @java.lang.Override public int getTokenConstraintsCount() { return tokenConstraints_.size(); } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ @java.lang.Override public org.tensorflow.metadata.v0.SequenceValueConstraints getTokenConstraints(int index) { return tokenConstraints_.get(index); } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ @java.lang.Override public org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder getTokenConstraintsOrBuilder( int index) { return tokenConstraints_.get(index); } public static final int SEQUENCE_LENGTH_CONSTRAINTS_FIELD_NUMBER = 5; private org.tensorflow.metadata.v0.SequenceLengthConstraints sequenceLengthConstraints_; /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; * @return Whether the sequenceLengthConstraints field is set. */ @java.lang.Override public boolean hasSequenceLengthConstraints() { return ((bitField0_ & 0x00000004) != 0); } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; * @return The sequenceLengthConstraints. */ @java.lang.Override public org.tensorflow.metadata.v0.SequenceLengthConstraints getSequenceLengthConstraints() { return sequenceLengthConstraints_ == null ? org.tensorflow.metadata.v0.SequenceLengthConstraints.getDefaultInstance() : sequenceLengthConstraints_; } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ @java.lang.Override public org.tensorflow.metadata.v0.SequenceLengthConstraintsOrBuilder getSequenceLengthConstraintsOrBuilder() { return sequenceLengthConstraints_ == null ? org.tensorflow.metadata.v0.SequenceLengthConstraints.getDefaultInstance() : sequenceLengthConstraints_; } public static final int LOCATION_CONSTRAINT_REGEX_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object locationConstraintRegex_ = ""; /** *
   * Specifies the location constraints as a function of the tokens specified
   * in token_constraints.
   *
   * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
   * tokens will be specified as I_#_ (e.g. I_123_).
   * A_T_ will match any token that has not been specified in token_constraints.
   * Parenthesis, +, and * are supported.
   * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
   *
   * For example, a two-sequence BERT model may look as follows:
   * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
   *
   * Note: Support for this field is not yet implemented. Please do not use.
   * TODO(b/188095987): Remove warning once field is implemented.
   * 
* * optional string location_constraint_regex = 4; * @return Whether the locationConstraintRegex field is set. */ @java.lang.Override public boolean hasLocationConstraintRegex() { return ((bitField0_ & 0x00000008) != 0); } /** *
   * Specifies the location constraints as a function of the tokens specified
   * in token_constraints.
   *
   * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
   * tokens will be specified as I_#_ (e.g. I_123_).
   * A_T_ will match any token that has not been specified in token_constraints.
   * Parenthesis, +, and * are supported.
   * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
   *
   * For example, a two-sequence BERT model may look as follows:
   * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
   *
   * Note: Support for this field is not yet implemented. Please do not use.
   * TODO(b/188095987): Remove warning once field is implemented.
   * 
* * optional string location_constraint_regex = 4; * @return The locationConstraintRegex. */ @java.lang.Override public java.lang.String getLocationConstraintRegex() { java.lang.Object ref = locationConstraintRegex_; 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()) { locationConstraintRegex_ = s; } return s; } } /** *
   * Specifies the location constraints as a function of the tokens specified
   * in token_constraints.
   *
   * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
   * tokens will be specified as I_#_ (e.g. I_123_).
   * A_T_ will match any token that has not been specified in token_constraints.
   * Parenthesis, +, and * are supported.
   * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
   *
   * For example, a two-sequence BERT model may look as follows:
   * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
   *
   * Note: Support for this field is not yet implemented. Please do not use.
   * TODO(b/188095987): Remove warning once field is implemented.
   * 
* * optional string location_constraint_regex = 4; * @return The bytes for locationConstraintRegex. */ @java.lang.Override public com.google.protobuf.ByteString getLocationConstraintRegexBytes() { java.lang.Object ref = locationConstraintRegex_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); locationConstraintRegex_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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, vocabulary_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getCoverage()); } for (int i = 0; i < tokenConstraints_.size(); i++) { output.writeMessage(3, tokenConstraints_.get(i)); } if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationConstraintRegex_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getSequenceLengthConstraints()); } 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, vocabulary_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCoverage()); } for (int i = 0; i < tokenConstraints_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, tokenConstraints_.get(i)); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationConstraintRegex_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getSequenceLengthConstraints()); } 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.NaturalLanguageDomain)) { return super.equals(obj); } org.tensorflow.metadata.v0.NaturalLanguageDomain other = (org.tensorflow.metadata.v0.NaturalLanguageDomain) obj; if (hasVocabulary() != other.hasVocabulary()) return false; if (hasVocabulary()) { if (!getVocabulary() .equals(other.getVocabulary())) return false; } if (hasCoverage() != other.hasCoverage()) return false; if (hasCoverage()) { if (!getCoverage() .equals(other.getCoverage())) return false; } if (!getTokenConstraintsList() .equals(other.getTokenConstraintsList())) return false; if (hasSequenceLengthConstraints() != other.hasSequenceLengthConstraints()) return false; if (hasSequenceLengthConstraints()) { if (!getSequenceLengthConstraints() .equals(other.getSequenceLengthConstraints())) return false; } if (hasLocationConstraintRegex() != other.hasLocationConstraintRegex()) return false; if (hasLocationConstraintRegex()) { if (!getLocationConstraintRegex() .equals(other.getLocationConstraintRegex())) 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 (hasVocabulary()) { hash = (37 * hash) + VOCABULARY_FIELD_NUMBER; hash = (53 * hash) + getVocabulary().hashCode(); } if (hasCoverage()) { hash = (37 * hash) + COVERAGE_FIELD_NUMBER; hash = (53 * hash) + getCoverage().hashCode(); } if (getTokenConstraintsCount() > 0) { hash = (37 * hash) + TOKEN_CONSTRAINTS_FIELD_NUMBER; hash = (53 * hash) + getTokenConstraintsList().hashCode(); } if (hasSequenceLengthConstraints()) { hash = (37 * hash) + SEQUENCE_LENGTH_CONSTRAINTS_FIELD_NUMBER; hash = (53 * hash) + getSequenceLengthConstraints().hashCode(); } if (hasLocationConstraintRegex()) { hash = (37 * hash) + LOCATION_CONSTRAINT_REGEX_FIELD_NUMBER; hash = (53 * hash) + getLocationConstraintRegex().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.NaturalLanguageDomain parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain 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.NaturalLanguageDomain parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain 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.NaturalLanguageDomain parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain 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.NaturalLanguageDomain parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain 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.NaturalLanguageDomain parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain 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.NaturalLanguageDomain 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; } /** *
   * Natural language text.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.NaturalLanguageDomain} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.NaturalLanguageDomain) org.tensorflow.metadata.v0.NaturalLanguageDomainOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_NaturalLanguageDomain_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_NaturalLanguageDomain_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.NaturalLanguageDomain.class, org.tensorflow.metadata.v0.NaturalLanguageDomain.Builder.class); } // Construct using org.tensorflow.metadata.v0.NaturalLanguageDomain.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getCoverageFieldBuilder(); getTokenConstraintsFieldBuilder(); getSequenceLengthConstraintsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; vocabulary_ = ""; coverage_ = null; if (coverageBuilder_ != null) { coverageBuilder_.dispose(); coverageBuilder_ = null; } if (tokenConstraintsBuilder_ == null) { tokenConstraints_ = java.util.Collections.emptyList(); } else { tokenConstraints_ = null; tokenConstraintsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); sequenceLengthConstraints_ = null; if (sequenceLengthConstraintsBuilder_ != null) { sequenceLengthConstraintsBuilder_.dispose(); sequenceLengthConstraintsBuilder_ = null; } locationConstraintRegex_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_NaturalLanguageDomain_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.NaturalLanguageDomain getDefaultInstanceForType() { return org.tensorflow.metadata.v0.NaturalLanguageDomain.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.NaturalLanguageDomain build() { org.tensorflow.metadata.v0.NaturalLanguageDomain result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.NaturalLanguageDomain buildPartial() { org.tensorflow.metadata.v0.NaturalLanguageDomain result = new org.tensorflow.metadata.v0.NaturalLanguageDomain(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.NaturalLanguageDomain result) { if (tokenConstraintsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { tokenConstraints_ = java.util.Collections.unmodifiableList(tokenConstraints_); bitField0_ = (bitField0_ & ~0x00000004); } result.tokenConstraints_ = tokenConstraints_; } else { result.tokenConstraints_ = tokenConstraintsBuilder_.build(); } } private void buildPartial0(org.tensorflow.metadata.v0.NaturalLanguageDomain result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.vocabulary_ = vocabulary_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.coverage_ = coverageBuilder_ == null ? coverage_ : coverageBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.sequenceLengthConstraints_ = sequenceLengthConstraintsBuilder_ == null ? sequenceLengthConstraints_ : sequenceLengthConstraintsBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.locationConstraintRegex_ = locationConstraintRegex_; 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.NaturalLanguageDomain) { return mergeFrom((org.tensorflow.metadata.v0.NaturalLanguageDomain)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.NaturalLanguageDomain other) { if (other == org.tensorflow.metadata.v0.NaturalLanguageDomain.getDefaultInstance()) return this; if (other.hasVocabulary()) { vocabulary_ = other.vocabulary_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasCoverage()) { mergeCoverage(other.getCoverage()); } if (tokenConstraintsBuilder_ == null) { if (!other.tokenConstraints_.isEmpty()) { if (tokenConstraints_.isEmpty()) { tokenConstraints_ = other.tokenConstraints_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTokenConstraintsIsMutable(); tokenConstraints_.addAll(other.tokenConstraints_); } onChanged(); } } else { if (!other.tokenConstraints_.isEmpty()) { if (tokenConstraintsBuilder_.isEmpty()) { tokenConstraintsBuilder_.dispose(); tokenConstraintsBuilder_ = null; tokenConstraints_ = other.tokenConstraints_; bitField0_ = (bitField0_ & ~0x00000004); tokenConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTokenConstraintsFieldBuilder() : null; } else { tokenConstraintsBuilder_.addAllMessages(other.tokenConstraints_); } } } if (other.hasSequenceLengthConstraints()) { mergeSequenceLengthConstraints(other.getSequenceLengthConstraints()); } if (other.hasLocationConstraintRegex()) { locationConstraintRegex_ = other.locationConstraintRegex_; bitField0_ |= 0x00000010; onChanged(); } 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: { vocabulary_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getCoverageFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { org.tensorflow.metadata.v0.SequenceValueConstraints m = input.readMessage( org.tensorflow.metadata.v0.SequenceValueConstraints.PARSER, extensionRegistry); if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); tokenConstraints_.add(m); } else { tokenConstraintsBuilder_.addMessage(m); } break; } // case 26 case 34: { locationConstraintRegex_ = input.readBytes(); bitField0_ |= 0x00000010; break; } // case 34 case 42: { input.readMessage( getSequenceLengthConstraintsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object vocabulary_ = ""; /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @return Whether the vocabulary field is set. */ public boolean hasVocabulary() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @return The vocabulary. */ public java.lang.String getVocabulary() { java.lang.Object ref = vocabulary_; 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()) { vocabulary_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @return The bytes for vocabulary. */ public com.google.protobuf.ByteString getVocabularyBytes() { java.lang.Object ref = vocabulary_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); vocabulary_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @param value The vocabulary to set. * @return This builder for chaining. */ public Builder setVocabulary( java.lang.String value) { if (value == null) { throw new NullPointerException(); } vocabulary_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @return This builder for chaining. */ public Builder clearVocabulary() { vocabulary_ = getDefaultInstance().getVocabulary(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Name of the vocabulary associated with the NaturalLanguageDomain.
     * When computing and validating stats using TFDV,
     * tfdv.StatsOptions.vocab_paths should map this name to a vocabulary file.
     * 
* * optional string vocabulary = 1; * @param value The bytes for vocabulary to set. * @return This builder for chaining. */ public Builder setVocabularyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } vocabulary_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private org.tensorflow.metadata.v0.FeatureCoverageConstraints coverage_; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.FeatureCoverageConstraints, org.tensorflow.metadata.v0.FeatureCoverageConstraints.Builder, org.tensorflow.metadata.v0.FeatureCoverageConstraintsOrBuilder> coverageBuilder_; /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; * @return Whether the coverage field is set. */ public boolean hasCoverage() { return ((bitField0_ & 0x00000002) != 0); } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; * @return The coverage. */ public org.tensorflow.metadata.v0.FeatureCoverageConstraints getCoverage() { if (coverageBuilder_ == null) { return coverage_ == null ? org.tensorflow.metadata.v0.FeatureCoverageConstraints.getDefaultInstance() : coverage_; } else { return coverageBuilder_.getMessage(); } } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public Builder setCoverage(org.tensorflow.metadata.v0.FeatureCoverageConstraints value) { if (coverageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } coverage_ = value; } else { coverageBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public Builder setCoverage( org.tensorflow.metadata.v0.FeatureCoverageConstraints.Builder builderForValue) { if (coverageBuilder_ == null) { coverage_ = builderForValue.build(); } else { coverageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public Builder mergeCoverage(org.tensorflow.metadata.v0.FeatureCoverageConstraints value) { if (coverageBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && coverage_ != null && coverage_ != org.tensorflow.metadata.v0.FeatureCoverageConstraints.getDefaultInstance()) { getCoverageBuilder().mergeFrom(value); } else { coverage_ = value; } } else { coverageBuilder_.mergeFrom(value); } if (coverage_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public Builder clearCoverage() { bitField0_ = (bitField0_ & ~0x00000002); coverage_ = null; if (coverageBuilder_ != null) { coverageBuilder_.dispose(); coverageBuilder_ = null; } onChanged(); return this; } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public org.tensorflow.metadata.v0.FeatureCoverageConstraints.Builder getCoverageBuilder() { bitField0_ |= 0x00000002; onChanged(); return getCoverageFieldBuilder().getBuilder(); } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ public org.tensorflow.metadata.v0.FeatureCoverageConstraintsOrBuilder getCoverageOrBuilder() { if (coverageBuilder_ != null) { return coverageBuilder_.getMessageOrBuilder(); } else { return coverage_ == null ? org.tensorflow.metadata.v0.FeatureCoverageConstraints.getDefaultInstance() : coverage_; } } /** * optional .tensorflow.metadata.v0.FeatureCoverageConstraints coverage = 2; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.FeatureCoverageConstraints, org.tensorflow.metadata.v0.FeatureCoverageConstraints.Builder, org.tensorflow.metadata.v0.FeatureCoverageConstraintsOrBuilder> getCoverageFieldBuilder() { if (coverageBuilder_ == null) { coverageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.FeatureCoverageConstraints, org.tensorflow.metadata.v0.FeatureCoverageConstraints.Builder, org.tensorflow.metadata.v0.FeatureCoverageConstraintsOrBuilder>( getCoverage(), getParentForChildren(), isClean()); coverage_ = null; } return coverageBuilder_; } private java.util.List tokenConstraints_ = java.util.Collections.emptyList(); private void ensureTokenConstraintsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { tokenConstraints_ = new java.util.ArrayList(tokenConstraints_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.SequenceValueConstraints, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder, org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder> tokenConstraintsBuilder_; /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public java.util.List getTokenConstraintsList() { if (tokenConstraintsBuilder_ == null) { return java.util.Collections.unmodifiableList(tokenConstraints_); } else { return tokenConstraintsBuilder_.getMessageList(); } } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public int getTokenConstraintsCount() { if (tokenConstraintsBuilder_ == null) { return tokenConstraints_.size(); } else { return tokenConstraintsBuilder_.getCount(); } } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public org.tensorflow.metadata.v0.SequenceValueConstraints getTokenConstraints(int index) { if (tokenConstraintsBuilder_ == null) { return tokenConstraints_.get(index); } else { return tokenConstraintsBuilder_.getMessage(index); } } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder setTokenConstraints( int index, org.tensorflow.metadata.v0.SequenceValueConstraints value) { if (tokenConstraintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTokenConstraintsIsMutable(); tokenConstraints_.set(index, value); onChanged(); } else { tokenConstraintsBuilder_.setMessage(index, value); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder setTokenConstraints( int index, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder builderForValue) { if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); tokenConstraints_.set(index, builderForValue.build()); onChanged(); } else { tokenConstraintsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder addTokenConstraints(org.tensorflow.metadata.v0.SequenceValueConstraints value) { if (tokenConstraintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTokenConstraintsIsMutable(); tokenConstraints_.add(value); onChanged(); } else { tokenConstraintsBuilder_.addMessage(value); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder addTokenConstraints( int index, org.tensorflow.metadata.v0.SequenceValueConstraints value) { if (tokenConstraintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTokenConstraintsIsMutable(); tokenConstraints_.add(index, value); onChanged(); } else { tokenConstraintsBuilder_.addMessage(index, value); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder addTokenConstraints( org.tensorflow.metadata.v0.SequenceValueConstraints.Builder builderForValue) { if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); tokenConstraints_.add(builderForValue.build()); onChanged(); } else { tokenConstraintsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder addTokenConstraints( int index, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder builderForValue) { if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); tokenConstraints_.add(index, builderForValue.build()); onChanged(); } else { tokenConstraintsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder addAllTokenConstraints( java.lang.Iterable values) { if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, tokenConstraints_); onChanged(); } else { tokenConstraintsBuilder_.addAllMessages(values); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder clearTokenConstraints() { if (tokenConstraintsBuilder_ == null) { tokenConstraints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { tokenConstraintsBuilder_.clear(); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public Builder removeTokenConstraints(int index) { if (tokenConstraintsBuilder_ == null) { ensureTokenConstraintsIsMutable(); tokenConstraints_.remove(index); onChanged(); } else { tokenConstraintsBuilder_.remove(index); } return this; } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public org.tensorflow.metadata.v0.SequenceValueConstraints.Builder getTokenConstraintsBuilder( int index) { return getTokenConstraintsFieldBuilder().getBuilder(index); } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder getTokenConstraintsOrBuilder( int index) { if (tokenConstraintsBuilder_ == null) { return tokenConstraints_.get(index); } else { return tokenConstraintsBuilder_.getMessageOrBuilder(index); } } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public java.util.List getTokenConstraintsOrBuilderList() { if (tokenConstraintsBuilder_ != null) { return tokenConstraintsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(tokenConstraints_); } } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public org.tensorflow.metadata.v0.SequenceValueConstraints.Builder addTokenConstraintsBuilder() { return getTokenConstraintsFieldBuilder().addBuilder( org.tensorflow.metadata.v0.SequenceValueConstraints.getDefaultInstance()); } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public org.tensorflow.metadata.v0.SequenceValueConstraints.Builder addTokenConstraintsBuilder( int index) { return getTokenConstraintsFieldBuilder().addBuilder( index, org.tensorflow.metadata.v0.SequenceValueConstraints.getDefaultInstance()); } /** * repeated .tensorflow.metadata.v0.SequenceValueConstraints token_constraints = 3; */ public java.util.List getTokenConstraintsBuilderList() { return getTokenConstraintsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.SequenceValueConstraints, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder, org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder> getTokenConstraintsFieldBuilder() { if (tokenConstraintsBuilder_ == null) { tokenConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.metadata.v0.SequenceValueConstraints, org.tensorflow.metadata.v0.SequenceValueConstraints.Builder, org.tensorflow.metadata.v0.SequenceValueConstraintsOrBuilder>( tokenConstraints_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); tokenConstraints_ = null; } return tokenConstraintsBuilder_; } private org.tensorflow.metadata.v0.SequenceLengthConstraints sequenceLengthConstraints_; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.SequenceLengthConstraints, org.tensorflow.metadata.v0.SequenceLengthConstraints.Builder, org.tensorflow.metadata.v0.SequenceLengthConstraintsOrBuilder> sequenceLengthConstraintsBuilder_; /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; * @return Whether the sequenceLengthConstraints field is set. */ public boolean hasSequenceLengthConstraints() { return ((bitField0_ & 0x00000008) != 0); } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; * @return The sequenceLengthConstraints. */ public org.tensorflow.metadata.v0.SequenceLengthConstraints getSequenceLengthConstraints() { if (sequenceLengthConstraintsBuilder_ == null) { return sequenceLengthConstraints_ == null ? org.tensorflow.metadata.v0.SequenceLengthConstraints.getDefaultInstance() : sequenceLengthConstraints_; } else { return sequenceLengthConstraintsBuilder_.getMessage(); } } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public Builder setSequenceLengthConstraints(org.tensorflow.metadata.v0.SequenceLengthConstraints value) { if (sequenceLengthConstraintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sequenceLengthConstraints_ = value; } else { sequenceLengthConstraintsBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public Builder setSequenceLengthConstraints( org.tensorflow.metadata.v0.SequenceLengthConstraints.Builder builderForValue) { if (sequenceLengthConstraintsBuilder_ == null) { sequenceLengthConstraints_ = builderForValue.build(); } else { sequenceLengthConstraintsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public Builder mergeSequenceLengthConstraints(org.tensorflow.metadata.v0.SequenceLengthConstraints value) { if (sequenceLengthConstraintsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && sequenceLengthConstraints_ != null && sequenceLengthConstraints_ != org.tensorflow.metadata.v0.SequenceLengthConstraints.getDefaultInstance()) { getSequenceLengthConstraintsBuilder().mergeFrom(value); } else { sequenceLengthConstraints_ = value; } } else { sequenceLengthConstraintsBuilder_.mergeFrom(value); } if (sequenceLengthConstraints_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public Builder clearSequenceLengthConstraints() { bitField0_ = (bitField0_ & ~0x00000008); sequenceLengthConstraints_ = null; if (sequenceLengthConstraintsBuilder_ != null) { sequenceLengthConstraintsBuilder_.dispose(); sequenceLengthConstraintsBuilder_ = null; } onChanged(); return this; } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public org.tensorflow.metadata.v0.SequenceLengthConstraints.Builder getSequenceLengthConstraintsBuilder() { bitField0_ |= 0x00000008; onChanged(); return getSequenceLengthConstraintsFieldBuilder().getBuilder(); } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ public org.tensorflow.metadata.v0.SequenceLengthConstraintsOrBuilder getSequenceLengthConstraintsOrBuilder() { if (sequenceLengthConstraintsBuilder_ != null) { return sequenceLengthConstraintsBuilder_.getMessageOrBuilder(); } else { return sequenceLengthConstraints_ == null ? org.tensorflow.metadata.v0.SequenceLengthConstraints.getDefaultInstance() : sequenceLengthConstraints_; } } /** * optional .tensorflow.metadata.v0.SequenceLengthConstraints sequence_length_constraints = 5; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.SequenceLengthConstraints, org.tensorflow.metadata.v0.SequenceLengthConstraints.Builder, org.tensorflow.metadata.v0.SequenceLengthConstraintsOrBuilder> getSequenceLengthConstraintsFieldBuilder() { if (sequenceLengthConstraintsBuilder_ == null) { sequenceLengthConstraintsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.SequenceLengthConstraints, org.tensorflow.metadata.v0.SequenceLengthConstraints.Builder, org.tensorflow.metadata.v0.SequenceLengthConstraintsOrBuilder>( getSequenceLengthConstraints(), getParentForChildren(), isClean()); sequenceLengthConstraints_ = null; } return sequenceLengthConstraintsBuilder_; } private java.lang.Object locationConstraintRegex_ = ""; /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @return Whether the locationConstraintRegex field is set. */ public boolean hasLocationConstraintRegex() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @return The locationConstraintRegex. */ public java.lang.String getLocationConstraintRegex() { java.lang.Object ref = locationConstraintRegex_; 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()) { locationConstraintRegex_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @return The bytes for locationConstraintRegex. */ public com.google.protobuf.ByteString getLocationConstraintRegexBytes() { java.lang.Object ref = locationConstraintRegex_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); locationConstraintRegex_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @param value The locationConstraintRegex to set. * @return This builder for chaining. */ public Builder setLocationConstraintRegex( java.lang.String value) { if (value == null) { throw new NullPointerException(); } locationConstraintRegex_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @return This builder for chaining. */ public Builder clearLocationConstraintRegex() { locationConstraintRegex_ = getDefaultInstance().getLocationConstraintRegex(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * Specifies the location constraints as a function of the tokens specified
     * in token_constraints.
     *
     * String tokens will be specified by S_TOKEN_, (e.g. S_(PAD)_) and integer
     * tokens will be specified as I_#_ (e.g. I_123_).
     * A_T_ will match any token that has not been specified in token_constraints.
     * Parenthesis, +, and * are supported.
     * _ will be escapable with a \ for tokens containing it (e.g. FOO\_BAR).
     *
     * For example, a two-sequence BERT model may look as follows:
     * S_(CLS)_ A_T_+ S_(SEP)_ A_T_+ S_(SEP)_ S_(PAD)_*
     *
     * Note: Support for this field is not yet implemented. Please do not use.
     * TODO(b/188095987): Remove warning once field is implemented.
     * 
* * optional string location_constraint_regex = 4; * @param value The bytes for locationConstraintRegex to set. * @return This builder for chaining. */ public Builder setLocationConstraintRegexBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } locationConstraintRegex_ = value; bitField0_ |= 0x00000010; 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.NaturalLanguageDomain) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.NaturalLanguageDomain) private static final org.tensorflow.metadata.v0.NaturalLanguageDomain DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.NaturalLanguageDomain(); } public static org.tensorflow.metadata.v0.NaturalLanguageDomain getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NaturalLanguageDomain 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.NaturalLanguageDomain getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy