com.yelp.nrtsearch.server.grpc.Highlight Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clientlib Show documentation
Show all versions of clientlib Show documentation
GRPC Clientlib for nrtSearch
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yelp/nrtsearch/search.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* Specify how to highlight matched text in SearchRequest
*
*
* Protobuf type {@code luceneserver.Highlight}
*/
public final class Highlight extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.Highlight)
HighlightOrBuilder {
private static final long serialVersionUID = 0L;
// Use Highlight.newBuilder() to construct.
private Highlight(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Highlight() {
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Highlight();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetFieldSettings();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Highlight.class, com.yelp.nrtsearch.server.grpc.Highlight.Builder.class);
}
/**
* Protobuf enum {@code luceneserver.Highlight.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* When DEFAULT is set in global setting, use fast vector highlighter; when set for field setting, use the type from the global setting.
*
*
* DEFAULT = 0;
*/
DEFAULT(0),
/**
* FAST_VECTOR = 1;
*/
FAST_VECTOR(1),
/**
*
* not supported yet
*
*
* PLAIN = 2;
*/
PLAIN(2),
/**
* CUSTOM = 3;
*/
CUSTOM(3),
UNRECOGNIZED(-1),
;
/**
*
* When DEFAULT is set in global setting, use fast vector highlighter; when set for field setting, use the type from the global setting.
*
*
* DEFAULT = 0;
*/
public static final int DEFAULT_VALUE = 0;
/**
* FAST_VECTOR = 1;
*/
public static final int FAST_VECTOR_VALUE = 1;
/**
*
* not supported yet
*
*
* PLAIN = 2;
*/
public static final int PLAIN_VALUE = 2;
/**
* CUSTOM = 3;
*/
public static final int CUSTOM_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Type forNumber(int value) {
switch (value) {
case 0: return DEFAULT;
case 1: return FAST_VECTOR;
case 2: return PLAIN;
case 3: return CUSTOM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.Highlight.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:luceneserver.Highlight.Type)
}
public interface SettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:luceneserver.Highlight.Settings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The enum numeric value on the wire for highlighterType.
*/
int getHighlighterTypeValue();
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The highlighterType.
*/
com.yelp.nrtsearch.server.grpc.Highlight.Type getHighlighterType();
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return A list containing the preTags.
*/
java.util.List
getPreTagsList();
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return The count of preTags.
*/
int getPreTagsCount();
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the element to return.
* @return The preTags at the given index.
*/
java.lang.String getPreTags(int index);
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the value to return.
* @return The bytes of the preTags at the given index.
*/
com.google.protobuf.ByteString
getPreTagsBytes(int index);
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return A list containing the postTags.
*/
java.util.List
getPostTagsList();
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return The count of postTags.
*/
int getPostTagsCount();
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the element to return.
* @return The postTags at the given index.
*/
java.lang.String getPostTags(int index);
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the value to return.
* @return The bytes of the postTags at the given index.
*/
com.google.protobuf.ByteString
getPostTagsBytes(int index);
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return Whether the fragmentSize field is set.
*/
boolean hasFragmentSize();
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return The fragmentSize.
*/
com.google.protobuf.UInt32Value getFragmentSize();
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getFragmentSizeOrBuilder();
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return Whether the maxNumberOfFragments field is set.
*/
boolean hasMaxNumberOfFragments();
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return The maxNumberOfFragments.
*/
com.google.protobuf.UInt32Value getMaxNumberOfFragments();
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
com.google.protobuf.UInt32ValueOrBuilder getMaxNumberOfFragmentsOrBuilder();
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return Whether the highlightQuery field is set.
*/
boolean hasHighlightQuery();
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return The highlightQuery.
*/
com.yelp.nrtsearch.server.grpc.Query getHighlightQuery();
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
com.yelp.nrtsearch.server.grpc.QueryOrBuilder getHighlightQueryOrBuilder();
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return Whether the fieldMatch field is set.
*/
boolean hasFieldMatch();
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return The fieldMatch.
*/
com.google.protobuf.BoolValue getFieldMatch();
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
com.google.protobuf.BoolValueOrBuilder getFieldMatchOrBuilder();
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return Whether the scoreOrdered field is set.
*/
boolean hasScoreOrdered();
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return The scoreOrdered.
*/
com.google.protobuf.BoolValue getScoreOrdered();
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
com.google.protobuf.BoolValueOrBuilder getScoreOrderedOrBuilder();
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return Whether the fragmenter field is set.
*/
boolean hasFragmenter();
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return The fragmenter.
*/
com.google.protobuf.StringValue getFragmenter();
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
com.google.protobuf.StringValueOrBuilder getFragmenterOrBuilder();
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return Whether the discreteMultivalue field is set.
*/
boolean hasDiscreteMultivalue();
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return The discreteMultivalue.
*/
com.google.protobuf.BoolValue getDiscreteMultivalue();
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
com.google.protobuf.BoolValueOrBuilder getDiscreteMultivalueOrBuilder();
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The customHighlighterName.
*/
java.lang.String getCustomHighlighterName();
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The bytes for customHighlighterName.
*/
com.google.protobuf.ByteString
getCustomHighlighterNameBytes();
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return Whether the customHighlighterParams field is set.
*/
boolean hasCustomHighlighterParams();
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return The customHighlighterParams.
*/
com.google.protobuf.Struct getCustomHighlighterParams();
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
com.google.protobuf.StructOrBuilder getCustomHighlighterParamsOrBuilder();
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return Whether the boundaryScanner field is set.
*/
boolean hasBoundaryScanner();
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return The boundaryScanner.
*/
com.google.protobuf.StringValue getBoundaryScanner();
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
com.google.protobuf.StringValueOrBuilder getBoundaryScannerOrBuilder();
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return Whether the boundaryChars field is set.
*/
boolean hasBoundaryChars();
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return The boundaryChars.
*/
com.google.protobuf.StringValue getBoundaryChars();
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
com.google.protobuf.StringValueOrBuilder getBoundaryCharsOrBuilder();
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return Whether the boundaryMaxScan field is set.
*/
boolean hasBoundaryMaxScan();
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return The boundaryMaxScan.
*/
com.google.protobuf.UInt32Value getBoundaryMaxScan();
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
com.google.protobuf.UInt32ValueOrBuilder getBoundaryMaxScanOrBuilder();
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return Whether the boundaryScannerLocale field is set.
*/
boolean hasBoundaryScannerLocale();
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return The boundaryScannerLocale.
*/
com.google.protobuf.StringValue getBoundaryScannerLocale();
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
com.google.protobuf.StringValueOrBuilder getBoundaryScannerLocaleOrBuilder();
}
/**
* Protobuf type {@code luceneserver.Highlight.Settings}
*/
public static final class Settings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.Highlight.Settings)
SettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Settings.newBuilder() to construct.
private Settings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Settings() {
highlighterType_ = 0;
preTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
postTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
customHighlighterName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Settings();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_Settings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_Settings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Highlight.Settings.class, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder.class);
}
private int bitField0_;
public static final int HIGHLIGHTER_TYPE_FIELD_NUMBER = 1;
private int highlighterType_ = 0;
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The enum numeric value on the wire for highlighterType.
*/
@java.lang.Override public int getHighlighterTypeValue() {
return highlighterType_;
}
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The highlighterType.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.Highlight.Type getHighlighterType() {
com.yelp.nrtsearch.server.grpc.Highlight.Type result = com.yelp.nrtsearch.server.grpc.Highlight.Type.forNumber(highlighterType_);
return result == null ? com.yelp.nrtsearch.server.grpc.Highlight.Type.UNRECOGNIZED : result;
}
public static final int PRE_TAGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList preTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return A list containing the preTags.
*/
public com.google.protobuf.ProtocolStringList
getPreTagsList() {
return preTags_;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return The count of preTags.
*/
public int getPreTagsCount() {
return preTags_.size();
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the element to return.
* @return The preTags at the given index.
*/
public java.lang.String getPreTags(int index) {
return preTags_.get(index);
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the value to return.
* @return The bytes of the preTags at the given index.
*/
public com.google.protobuf.ByteString
getPreTagsBytes(int index) {
return preTags_.getByteString(index);
}
public static final int POST_TAGS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList postTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return A list containing the postTags.
*/
public com.google.protobuf.ProtocolStringList
getPostTagsList() {
return postTags_;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return The count of postTags.
*/
public int getPostTagsCount() {
return postTags_.size();
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the element to return.
* @return The postTags at the given index.
*/
public java.lang.String getPostTags(int index) {
return postTags_.get(index);
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the value to return.
* @return The bytes of the postTags at the given index.
*/
public com.google.protobuf.ByteString
getPostTagsBytes(int index) {
return postTags_.getByteString(index);
}
public static final int FRAGMENT_SIZE_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value fragmentSize_;
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return Whether the fragmentSize field is set.
*/
@java.lang.Override
public boolean hasFragmentSize() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return The fragmentSize.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getFragmentSize() {
return fragmentSize_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : fragmentSize_;
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getFragmentSizeOrBuilder() {
return fragmentSize_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : fragmentSize_;
}
public static final int MAX_NUMBER_OF_FRAGMENTS_FIELD_NUMBER = 5;
private com.google.protobuf.UInt32Value maxNumberOfFragments_;
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return Whether the maxNumberOfFragments field is set.
*/
@java.lang.Override
public boolean hasMaxNumberOfFragments() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return The maxNumberOfFragments.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getMaxNumberOfFragments() {
return maxNumberOfFragments_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxNumberOfFragments_;
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxNumberOfFragmentsOrBuilder() {
return maxNumberOfFragments_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxNumberOfFragments_;
}
public static final int HIGHLIGHT_QUERY_FIELD_NUMBER = 6;
private com.yelp.nrtsearch.server.grpc.Query highlightQuery_;
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return Whether the highlightQuery field is set.
*/
@java.lang.Override
public boolean hasHighlightQuery() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return The highlightQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Query getHighlightQuery() {
return highlightQuery_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : highlightQuery_;
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getHighlightQueryOrBuilder() {
return highlightQuery_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : highlightQuery_;
}
public static final int FIELD_MATCH_FIELD_NUMBER = 7;
private com.google.protobuf.BoolValue fieldMatch_;
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return Whether the fieldMatch field is set.
*/
@java.lang.Override
public boolean hasFieldMatch() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return The fieldMatch.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getFieldMatch() {
return fieldMatch_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : fieldMatch_;
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getFieldMatchOrBuilder() {
return fieldMatch_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : fieldMatch_;
}
public static final int SCORE_ORDERED_FIELD_NUMBER = 8;
private com.google.protobuf.BoolValue scoreOrdered_;
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return Whether the scoreOrdered field is set.
*/
@java.lang.Override
public boolean hasScoreOrdered() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return The scoreOrdered.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getScoreOrdered() {
return scoreOrdered_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : scoreOrdered_;
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getScoreOrderedOrBuilder() {
return scoreOrdered_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : scoreOrdered_;
}
public static final int FRAGMENTER_FIELD_NUMBER = 9;
private com.google.protobuf.StringValue fragmenter_;
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return Whether the fragmenter field is set.
*/
@java.lang.Override
public boolean hasFragmenter() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return The fragmenter.
*/
@java.lang.Override
public com.google.protobuf.StringValue getFragmenter() {
return fragmenter_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : fragmenter_;
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getFragmenterOrBuilder() {
return fragmenter_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : fragmenter_;
}
public static final int DISCRETE_MULTIVALUE_FIELD_NUMBER = 10;
private com.google.protobuf.BoolValue discreteMultivalue_;
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return Whether the discreteMultivalue field is set.
*/
@java.lang.Override
public boolean hasDiscreteMultivalue() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return The discreteMultivalue.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getDiscreteMultivalue() {
return discreteMultivalue_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : discreteMultivalue_;
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getDiscreteMultivalueOrBuilder() {
return discreteMultivalue_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : discreteMultivalue_;
}
public static final int CUSTOM_HIGHLIGHTER_NAME_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object customHighlighterName_ = "";
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The customHighlighterName.
*/
@java.lang.Override
public java.lang.String getCustomHighlighterName() {
java.lang.Object ref = customHighlighterName_;
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();
customHighlighterName_ = s;
return s;
}
}
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The bytes for customHighlighterName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCustomHighlighterNameBytes() {
java.lang.Object ref = customHighlighterName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customHighlighterName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CUSTOM_HIGHLIGHTER_PARAMS_FIELD_NUMBER = 12;
private com.google.protobuf.Struct customHighlighterParams_;
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return Whether the customHighlighterParams field is set.
*/
@java.lang.Override
public boolean hasCustomHighlighterParams() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return The customHighlighterParams.
*/
@java.lang.Override
public com.google.protobuf.Struct getCustomHighlighterParams() {
return customHighlighterParams_ == null ? com.google.protobuf.Struct.getDefaultInstance() : customHighlighterParams_;
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getCustomHighlighterParamsOrBuilder() {
return customHighlighterParams_ == null ? com.google.protobuf.Struct.getDefaultInstance() : customHighlighterParams_;
}
public static final int BOUNDARY_SCANNER_FIELD_NUMBER = 13;
private com.google.protobuf.StringValue boundaryScanner_;
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return Whether the boundaryScanner field is set.
*/
@java.lang.Override
public boolean hasBoundaryScanner() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return The boundaryScanner.
*/
@java.lang.Override
public com.google.protobuf.StringValue getBoundaryScanner() {
return boundaryScanner_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScanner_;
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getBoundaryScannerOrBuilder() {
return boundaryScanner_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScanner_;
}
public static final int BOUNDARY_CHARS_FIELD_NUMBER = 14;
private com.google.protobuf.StringValue boundaryChars_;
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return Whether the boundaryChars field is set.
*/
@java.lang.Override
public boolean hasBoundaryChars() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return The boundaryChars.
*/
@java.lang.Override
public com.google.protobuf.StringValue getBoundaryChars() {
return boundaryChars_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryChars_;
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getBoundaryCharsOrBuilder() {
return boundaryChars_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryChars_;
}
public static final int BOUNDARY_MAX_SCAN_FIELD_NUMBER = 15;
private com.google.protobuf.UInt32Value boundaryMaxScan_;
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return Whether the boundaryMaxScan field is set.
*/
@java.lang.Override
public boolean hasBoundaryMaxScan() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return The boundaryMaxScan.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getBoundaryMaxScan() {
return boundaryMaxScan_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : boundaryMaxScan_;
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getBoundaryMaxScanOrBuilder() {
return boundaryMaxScan_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : boundaryMaxScan_;
}
public static final int BOUNDARY_SCANNER_LOCALE_FIELD_NUMBER = 16;
private com.google.protobuf.StringValue boundaryScannerLocale_;
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return Whether the boundaryScannerLocale field is set.
*/
@java.lang.Override
public boolean hasBoundaryScannerLocale() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return The boundaryScannerLocale.
*/
@java.lang.Override
public com.google.protobuf.StringValue getBoundaryScannerLocale() {
return boundaryScannerLocale_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScannerLocale_;
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getBoundaryScannerLocaleOrBuilder() {
return boundaryScannerLocale_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScannerLocale_;
}
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 (highlighterType_ != com.yelp.nrtsearch.server.grpc.Highlight.Type.DEFAULT.getNumber()) {
output.writeEnum(1, highlighterType_);
}
for (int i = 0; i < preTags_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preTags_.getRaw(i));
}
for (int i = 0; i < postTags_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, postTags_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getFragmentSize());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getMaxNumberOfFragments());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getHighlightQuery());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(7, getFieldMatch());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(8, getScoreOrdered());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(9, getFragmenter());
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(10, getDiscreteMultivalue());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customHighlighterName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, customHighlighterName_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(12, getCustomHighlighterParams());
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeMessage(13, getBoundaryScanner());
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeMessage(14, getBoundaryChars());
}
if (((bitField0_ & 0x00000400) != 0)) {
output.writeMessage(15, getBoundaryMaxScan());
}
if (((bitField0_ & 0x00000800) != 0)) {
output.writeMessage(16, getBoundaryScannerLocale());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (highlighterType_ != com.yelp.nrtsearch.server.grpc.Highlight.Type.DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, highlighterType_);
}
{
int dataSize = 0;
for (int i = 0; i < preTags_.size(); i++) {
dataSize += computeStringSizeNoTag(preTags_.getRaw(i));
}
size += dataSize;
size += 1 * getPreTagsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < postTags_.size(); i++) {
dataSize += computeStringSizeNoTag(postTags_.getRaw(i));
}
size += dataSize;
size += 1 * getPostTagsList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getFragmentSize());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getMaxNumberOfFragments());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getHighlightQuery());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getFieldMatch());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getScoreOrdered());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getFragmenter());
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getDiscreteMultivalue());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customHighlighterName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, customHighlighterName_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getCustomHighlighterParams());
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getBoundaryScanner());
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getBoundaryChars());
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getBoundaryMaxScan());
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getBoundaryScannerLocale());
}
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 com.yelp.nrtsearch.server.grpc.Highlight.Settings)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.Highlight.Settings other = (com.yelp.nrtsearch.server.grpc.Highlight.Settings) obj;
if (highlighterType_ != other.highlighterType_) return false;
if (!getPreTagsList()
.equals(other.getPreTagsList())) return false;
if (!getPostTagsList()
.equals(other.getPostTagsList())) return false;
if (hasFragmentSize() != other.hasFragmentSize()) return false;
if (hasFragmentSize()) {
if (!getFragmentSize()
.equals(other.getFragmentSize())) return false;
}
if (hasMaxNumberOfFragments() != other.hasMaxNumberOfFragments()) return false;
if (hasMaxNumberOfFragments()) {
if (!getMaxNumberOfFragments()
.equals(other.getMaxNumberOfFragments())) return false;
}
if (hasHighlightQuery() != other.hasHighlightQuery()) return false;
if (hasHighlightQuery()) {
if (!getHighlightQuery()
.equals(other.getHighlightQuery())) return false;
}
if (hasFieldMatch() != other.hasFieldMatch()) return false;
if (hasFieldMatch()) {
if (!getFieldMatch()
.equals(other.getFieldMatch())) return false;
}
if (hasScoreOrdered() != other.hasScoreOrdered()) return false;
if (hasScoreOrdered()) {
if (!getScoreOrdered()
.equals(other.getScoreOrdered())) return false;
}
if (hasFragmenter() != other.hasFragmenter()) return false;
if (hasFragmenter()) {
if (!getFragmenter()
.equals(other.getFragmenter())) return false;
}
if (hasDiscreteMultivalue() != other.hasDiscreteMultivalue()) return false;
if (hasDiscreteMultivalue()) {
if (!getDiscreteMultivalue()
.equals(other.getDiscreteMultivalue())) return false;
}
if (!getCustomHighlighterName()
.equals(other.getCustomHighlighterName())) return false;
if (hasCustomHighlighterParams() != other.hasCustomHighlighterParams()) return false;
if (hasCustomHighlighterParams()) {
if (!getCustomHighlighterParams()
.equals(other.getCustomHighlighterParams())) return false;
}
if (hasBoundaryScanner() != other.hasBoundaryScanner()) return false;
if (hasBoundaryScanner()) {
if (!getBoundaryScanner()
.equals(other.getBoundaryScanner())) return false;
}
if (hasBoundaryChars() != other.hasBoundaryChars()) return false;
if (hasBoundaryChars()) {
if (!getBoundaryChars()
.equals(other.getBoundaryChars())) return false;
}
if (hasBoundaryMaxScan() != other.hasBoundaryMaxScan()) return false;
if (hasBoundaryMaxScan()) {
if (!getBoundaryMaxScan()
.equals(other.getBoundaryMaxScan())) return false;
}
if (hasBoundaryScannerLocale() != other.hasBoundaryScannerLocale()) return false;
if (hasBoundaryScannerLocale()) {
if (!getBoundaryScannerLocale()
.equals(other.getBoundaryScannerLocale())) 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();
hash = (37 * hash) + HIGHLIGHTER_TYPE_FIELD_NUMBER;
hash = (53 * hash) + highlighterType_;
if (getPreTagsCount() > 0) {
hash = (37 * hash) + PRE_TAGS_FIELD_NUMBER;
hash = (53 * hash) + getPreTagsList().hashCode();
}
if (getPostTagsCount() > 0) {
hash = (37 * hash) + POST_TAGS_FIELD_NUMBER;
hash = (53 * hash) + getPostTagsList().hashCode();
}
if (hasFragmentSize()) {
hash = (37 * hash) + FRAGMENT_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getFragmentSize().hashCode();
}
if (hasMaxNumberOfFragments()) {
hash = (37 * hash) + MAX_NUMBER_OF_FRAGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getMaxNumberOfFragments().hashCode();
}
if (hasHighlightQuery()) {
hash = (37 * hash) + HIGHLIGHT_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getHighlightQuery().hashCode();
}
if (hasFieldMatch()) {
hash = (37 * hash) + FIELD_MATCH_FIELD_NUMBER;
hash = (53 * hash) + getFieldMatch().hashCode();
}
if (hasScoreOrdered()) {
hash = (37 * hash) + SCORE_ORDERED_FIELD_NUMBER;
hash = (53 * hash) + getScoreOrdered().hashCode();
}
if (hasFragmenter()) {
hash = (37 * hash) + FRAGMENTER_FIELD_NUMBER;
hash = (53 * hash) + getFragmenter().hashCode();
}
if (hasDiscreteMultivalue()) {
hash = (37 * hash) + DISCRETE_MULTIVALUE_FIELD_NUMBER;
hash = (53 * hash) + getDiscreteMultivalue().hashCode();
}
hash = (37 * hash) + CUSTOM_HIGHLIGHTER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getCustomHighlighterName().hashCode();
if (hasCustomHighlighterParams()) {
hash = (37 * hash) + CUSTOM_HIGHLIGHTER_PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getCustomHighlighterParams().hashCode();
}
if (hasBoundaryScanner()) {
hash = (37 * hash) + BOUNDARY_SCANNER_FIELD_NUMBER;
hash = (53 * hash) + getBoundaryScanner().hashCode();
}
if (hasBoundaryChars()) {
hash = (37 * hash) + BOUNDARY_CHARS_FIELD_NUMBER;
hash = (53 * hash) + getBoundaryChars().hashCode();
}
if (hasBoundaryMaxScan()) {
hash = (37 * hash) + BOUNDARY_MAX_SCAN_FIELD_NUMBER;
hash = (53 * hash) + getBoundaryMaxScan().hashCode();
}
if (hasBoundaryScannerLocale()) {
hash = (37 * hash) + BOUNDARY_SCANNER_LOCALE_FIELD_NUMBER;
hash = (53 * hash) + getBoundaryScannerLocale().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings 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 com.yelp.nrtsearch.server.grpc.Highlight.Settings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings 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 com.yelp.nrtsearch.server.grpc.Highlight.Settings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings 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(com.yelp.nrtsearch.server.grpc.Highlight.Settings 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;
}
/**
* Protobuf type {@code luceneserver.Highlight.Settings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.Highlight.Settings)
com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_Settings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_Settings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Highlight.Settings.class, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.Highlight.Settings.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFragmentSizeFieldBuilder();
getMaxNumberOfFragmentsFieldBuilder();
getHighlightQueryFieldBuilder();
getFieldMatchFieldBuilder();
getScoreOrderedFieldBuilder();
getFragmenterFieldBuilder();
getDiscreteMultivalueFieldBuilder();
getCustomHighlighterParamsFieldBuilder();
getBoundaryScannerFieldBuilder();
getBoundaryCharsFieldBuilder();
getBoundaryMaxScanFieldBuilder();
getBoundaryScannerLocaleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
highlighterType_ = 0;
preTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
postTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
fragmentSize_ = null;
if (fragmentSizeBuilder_ != null) {
fragmentSizeBuilder_.dispose();
fragmentSizeBuilder_ = null;
}
maxNumberOfFragments_ = null;
if (maxNumberOfFragmentsBuilder_ != null) {
maxNumberOfFragmentsBuilder_.dispose();
maxNumberOfFragmentsBuilder_ = null;
}
highlightQuery_ = null;
if (highlightQueryBuilder_ != null) {
highlightQueryBuilder_.dispose();
highlightQueryBuilder_ = null;
}
fieldMatch_ = null;
if (fieldMatchBuilder_ != null) {
fieldMatchBuilder_.dispose();
fieldMatchBuilder_ = null;
}
scoreOrdered_ = null;
if (scoreOrderedBuilder_ != null) {
scoreOrderedBuilder_.dispose();
scoreOrderedBuilder_ = null;
}
fragmenter_ = null;
if (fragmenterBuilder_ != null) {
fragmenterBuilder_.dispose();
fragmenterBuilder_ = null;
}
discreteMultivalue_ = null;
if (discreteMultivalueBuilder_ != null) {
discreteMultivalueBuilder_.dispose();
discreteMultivalueBuilder_ = null;
}
customHighlighterName_ = "";
customHighlighterParams_ = null;
if (customHighlighterParamsBuilder_ != null) {
customHighlighterParamsBuilder_.dispose();
customHighlighterParamsBuilder_ = null;
}
boundaryScanner_ = null;
if (boundaryScannerBuilder_ != null) {
boundaryScannerBuilder_.dispose();
boundaryScannerBuilder_ = null;
}
boundaryChars_ = null;
if (boundaryCharsBuilder_ != null) {
boundaryCharsBuilder_.dispose();
boundaryCharsBuilder_ = null;
}
boundaryMaxScan_ = null;
if (boundaryMaxScanBuilder_ != null) {
boundaryMaxScanBuilder_.dispose();
boundaryMaxScanBuilder_ = null;
}
boundaryScannerLocale_ = null;
if (boundaryScannerLocaleBuilder_ != null) {
boundaryScannerLocaleBuilder_.dispose();
boundaryScannerLocaleBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_Settings_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings build() {
com.yelp.nrtsearch.server.grpc.Highlight.Settings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings buildPartial() {
com.yelp.nrtsearch.server.grpc.Highlight.Settings result = new com.yelp.nrtsearch.server.grpc.Highlight.Settings(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.Highlight.Settings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.highlighterType_ = highlighterType_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
preTags_.makeImmutable();
result.preTags_ = preTags_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
postTags_.makeImmutable();
result.postTags_ = postTags_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.fragmentSize_ = fragmentSizeBuilder_ == null
? fragmentSize_
: fragmentSizeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.maxNumberOfFragments_ = maxNumberOfFragmentsBuilder_ == null
? maxNumberOfFragments_
: maxNumberOfFragmentsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.highlightQuery_ = highlightQueryBuilder_ == null
? highlightQuery_
: highlightQueryBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.fieldMatch_ = fieldMatchBuilder_ == null
? fieldMatch_
: fieldMatchBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.scoreOrdered_ = scoreOrderedBuilder_ == null
? scoreOrdered_
: scoreOrderedBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.fragmenter_ = fragmenterBuilder_ == null
? fragmenter_
: fragmenterBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.discreteMultivalue_ = discreteMultivalueBuilder_ == null
? discreteMultivalue_
: discreteMultivalueBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.customHighlighterName_ = customHighlighterName_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.customHighlighterParams_ = customHighlighterParamsBuilder_ == null
? customHighlighterParams_
: customHighlighterParamsBuilder_.build();
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.boundaryScanner_ = boundaryScannerBuilder_ == null
? boundaryScanner_
: boundaryScannerBuilder_.build();
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.boundaryChars_ = boundaryCharsBuilder_ == null
? boundaryChars_
: boundaryCharsBuilder_.build();
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.boundaryMaxScan_ = boundaryMaxScanBuilder_ == null
? boundaryMaxScan_
: boundaryMaxScanBuilder_.build();
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.boundaryScannerLocale_ = boundaryScannerLocaleBuilder_ == null
? boundaryScannerLocale_
: boundaryScannerLocaleBuilder_.build();
to_bitField0_ |= 0x00000800;
}
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 com.yelp.nrtsearch.server.grpc.Highlight.Settings) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.Highlight.Settings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.Highlight.Settings other) {
if (other == com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance()) return this;
if (other.highlighterType_ != 0) {
setHighlighterTypeValue(other.getHighlighterTypeValue());
}
if (!other.preTags_.isEmpty()) {
if (preTags_.isEmpty()) {
preTags_ = other.preTags_;
bitField0_ |= 0x00000002;
} else {
ensurePreTagsIsMutable();
preTags_.addAll(other.preTags_);
}
onChanged();
}
if (!other.postTags_.isEmpty()) {
if (postTags_.isEmpty()) {
postTags_ = other.postTags_;
bitField0_ |= 0x00000004;
} else {
ensurePostTagsIsMutable();
postTags_.addAll(other.postTags_);
}
onChanged();
}
if (other.hasFragmentSize()) {
mergeFragmentSize(other.getFragmentSize());
}
if (other.hasMaxNumberOfFragments()) {
mergeMaxNumberOfFragments(other.getMaxNumberOfFragments());
}
if (other.hasHighlightQuery()) {
mergeHighlightQuery(other.getHighlightQuery());
}
if (other.hasFieldMatch()) {
mergeFieldMatch(other.getFieldMatch());
}
if (other.hasScoreOrdered()) {
mergeScoreOrdered(other.getScoreOrdered());
}
if (other.hasFragmenter()) {
mergeFragmenter(other.getFragmenter());
}
if (other.hasDiscreteMultivalue()) {
mergeDiscreteMultivalue(other.getDiscreteMultivalue());
}
if (!other.getCustomHighlighterName().isEmpty()) {
customHighlighterName_ = other.customHighlighterName_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.hasCustomHighlighterParams()) {
mergeCustomHighlighterParams(other.getCustomHighlighterParams());
}
if (other.hasBoundaryScanner()) {
mergeBoundaryScanner(other.getBoundaryScanner());
}
if (other.hasBoundaryChars()) {
mergeBoundaryChars(other.getBoundaryChars());
}
if (other.hasBoundaryMaxScan()) {
mergeBoundaryMaxScan(other.getBoundaryMaxScan());
}
if (other.hasBoundaryScannerLocale()) {
mergeBoundaryScannerLocale(other.getBoundaryScannerLocale());
}
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: {
highlighterType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensurePreTagsIsMutable();
preTags_.add(s);
break;
} // case 18
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ensurePostTagsIsMutable();
postTags_.add(s);
break;
} // case 26
case 34: {
input.readMessage(
getFragmentSizeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getMaxNumberOfFragmentsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getHighlightQueryFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
input.readMessage(
getFieldMatchFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
input.readMessage(
getScoreOrderedFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 74: {
input.readMessage(
getFragmenterFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 82: {
input.readMessage(
getDiscreteMultivalueFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 82
case 90: {
customHighlighterName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 90
case 98: {
input.readMessage(
getCustomHighlighterParamsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000800;
break;
} // case 98
case 106: {
input.readMessage(
getBoundaryScannerFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 106
case 114: {
input.readMessage(
getBoundaryCharsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00002000;
break;
} // case 114
case 122: {
input.readMessage(
getBoundaryMaxScanFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00004000;
break;
} // case 122
case 130: {
input.readMessage(
getBoundaryScannerLocaleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00008000;
break;
} // case 130
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 int highlighterType_ = 0;
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The enum numeric value on the wire for highlighterType.
*/
@java.lang.Override public int getHighlighterTypeValue() {
return highlighterType_;
}
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @param value The enum numeric value on the wire for highlighterType to set.
* @return This builder for chaining.
*/
public Builder setHighlighterTypeValue(int value) {
highlighterType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return The highlighterType.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Type getHighlighterType() {
com.yelp.nrtsearch.server.grpc.Highlight.Type result = com.yelp.nrtsearch.server.grpc.Highlight.Type.forNumber(highlighterType_);
return result == null ? com.yelp.nrtsearch.server.grpc.Highlight.Type.UNRECOGNIZED : result;
}
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @param value The highlighterType to set.
* @return This builder for chaining.
*/
public Builder setHighlighterType(com.yelp.nrtsearch.server.grpc.Highlight.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
highlighterType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specify type of highlighter to use. Ignored right now in nrtsearch.
*
*
* .luceneserver.Highlight.Type highlighter_type = 1;
* @return This builder for chaining.
*/
public Builder clearHighlighterType() {
bitField0_ = (bitField0_ & ~0x00000001);
highlighterType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList preTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePreTagsIsMutable() {
if (!preTags_.isModifiable()) {
preTags_ = new com.google.protobuf.LazyStringArrayList(preTags_);
}
bitField0_ |= 0x00000002;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return A list containing the preTags.
*/
public com.google.protobuf.ProtocolStringList
getPreTagsList() {
preTags_.makeImmutable();
return preTags_;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return The count of preTags.
*/
public int getPreTagsCount() {
return preTags_.size();
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the element to return.
* @return The preTags at the given index.
*/
public java.lang.String getPreTags(int index) {
return preTags_.get(index);
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index of the value to return.
* @return The bytes of the preTags at the given index.
*/
public com.google.protobuf.ByteString
getPreTagsBytes(int index) {
return preTags_.getByteString(index);
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param index The index to set the value at.
* @param value The preTags to set.
* @return This builder for chaining.
*/
public Builder setPreTags(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePreTagsIsMutable();
preTags_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param value The preTags to add.
* @return This builder for chaining.
*/
public Builder addPreTags(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePreTagsIsMutable();
preTags_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param values The preTags to add.
* @return This builder for chaining.
*/
public Builder addAllPreTags(
java.lang.Iterable values) {
ensurePreTagsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, preTags_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @return This builder for chaining.
*/
public Builder clearPreTags() {
preTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* Used along with post_tags to specify how to wrap the highlighted text.
*
*
* repeated string pre_tags = 2;
* @param value The bytes of the preTags to add.
* @return This builder for chaining.
*/
public Builder addPreTagsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensurePreTagsIsMutable();
preTags_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList postTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePostTagsIsMutable() {
if (!postTags_.isModifiable()) {
postTags_ = new com.google.protobuf.LazyStringArrayList(postTags_);
}
bitField0_ |= 0x00000004;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return A list containing the postTags.
*/
public com.google.protobuf.ProtocolStringList
getPostTagsList() {
postTags_.makeImmutable();
return postTags_;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return The count of postTags.
*/
public int getPostTagsCount() {
return postTags_.size();
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the element to return.
* @return The postTags at the given index.
*/
public java.lang.String getPostTags(int index) {
return postTags_.get(index);
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index of the value to return.
* @return The bytes of the postTags at the given index.
*/
public com.google.protobuf.ByteString
getPostTagsBytes(int index) {
return postTags_.getByteString(index);
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param index The index to set the value at.
* @param value The postTags to set.
* @return This builder for chaining.
*/
public Builder setPostTags(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePostTagsIsMutable();
postTags_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param value The postTags to add.
* @return This builder for chaining.
*/
public Builder addPostTags(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePostTagsIsMutable();
postTags_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param values The postTags to add.
* @return This builder for chaining.
*/
public Builder addAllPostTags(
java.lang.Iterable values) {
ensurePostTagsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, postTags_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @return This builder for chaining.
*/
public Builder clearPostTags() {
postTags_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
*
* Used along with pre_tags to specify how to wrap the highlighted text.
*
*
* repeated string post_tags = 3;
* @param value The bytes of the postTags to add.
* @return This builder for chaining.
*/
public Builder addPostTagsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensurePostTagsIsMutable();
postTags_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value fragmentSize_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> fragmentSizeBuilder_;
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return Whether the fragmentSize field is set.
*/
public boolean hasFragmentSize() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
* @return The fragmentSize.
*/
public com.google.protobuf.UInt32Value getFragmentSize() {
if (fragmentSizeBuilder_ == null) {
return fragmentSize_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : fragmentSize_;
} else {
return fragmentSizeBuilder_.getMessage();
}
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public Builder setFragmentSize(com.google.protobuf.UInt32Value value) {
if (fragmentSizeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fragmentSize_ = value;
} else {
fragmentSizeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public Builder setFragmentSize(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (fragmentSizeBuilder_ == null) {
fragmentSize_ = builderForValue.build();
} else {
fragmentSizeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public Builder mergeFragmentSize(com.google.protobuf.UInt32Value value) {
if (fragmentSizeBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
fragmentSize_ != null &&
fragmentSize_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getFragmentSizeBuilder().mergeFrom(value);
} else {
fragmentSize_ = value;
}
} else {
fragmentSizeBuilder_.mergeFrom(value);
}
if (fragmentSize_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public Builder clearFragmentSize() {
bitField0_ = (bitField0_ & ~0x00000008);
fragmentSize_ = null;
if (fragmentSizeBuilder_ != null) {
fragmentSizeBuilder_.dispose();
fragmentSizeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public com.google.protobuf.UInt32Value.Builder getFragmentSizeBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getFragmentSizeFieldBuilder().getBuilder();
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getFragmentSizeOrBuilder() {
if (fragmentSizeBuilder_ != null) {
return fragmentSizeBuilder_.getMessageOrBuilder();
} else {
return fragmentSize_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : fragmentSize_;
}
}
/**
*
* Number of characters in highlighted fragment, 100 by default. Set it to be 0 to fetch the entire field.
*
*
* .google.protobuf.UInt32Value fragment_size = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getFragmentSizeFieldBuilder() {
if (fragmentSizeBuilder_ == null) {
fragmentSizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getFragmentSize(),
getParentForChildren(),
isClean());
fragmentSize_ = null;
}
return fragmentSizeBuilder_;
}
private com.google.protobuf.UInt32Value maxNumberOfFragments_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxNumberOfFragmentsBuilder_;
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return Whether the maxNumberOfFragments field is set.
*/
public boolean hasMaxNumberOfFragments() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
* @return The maxNumberOfFragments.
*/
public com.google.protobuf.UInt32Value getMaxNumberOfFragments() {
if (maxNumberOfFragmentsBuilder_ == null) {
return maxNumberOfFragments_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxNumberOfFragments_;
} else {
return maxNumberOfFragmentsBuilder_.getMessage();
}
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public Builder setMaxNumberOfFragments(com.google.protobuf.UInt32Value value) {
if (maxNumberOfFragmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxNumberOfFragments_ = value;
} else {
maxNumberOfFragmentsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public Builder setMaxNumberOfFragments(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (maxNumberOfFragmentsBuilder_ == null) {
maxNumberOfFragments_ = builderForValue.build();
} else {
maxNumberOfFragmentsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public Builder mergeMaxNumberOfFragments(com.google.protobuf.UInt32Value value) {
if (maxNumberOfFragmentsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
maxNumberOfFragments_ != null &&
maxNumberOfFragments_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getMaxNumberOfFragmentsBuilder().mergeFrom(value);
} else {
maxNumberOfFragments_ = value;
}
} else {
maxNumberOfFragmentsBuilder_.mergeFrom(value);
}
if (maxNumberOfFragments_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public Builder clearMaxNumberOfFragments() {
bitField0_ = (bitField0_ & ~0x00000010);
maxNumberOfFragments_ = null;
if (maxNumberOfFragmentsBuilder_ != null) {
maxNumberOfFragmentsBuilder_.dispose();
maxNumberOfFragmentsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public com.google.protobuf.UInt32Value.Builder getMaxNumberOfFragmentsBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getMaxNumberOfFragmentsFieldBuilder().getBuilder();
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxNumberOfFragmentsOrBuilder() {
if (maxNumberOfFragmentsBuilder_ != null) {
return maxNumberOfFragmentsBuilder_.getMessageOrBuilder();
} else {
return maxNumberOfFragments_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : maxNumberOfFragments_;
}
}
/**
*
* Maximum number of highlight fragments to return, 5 by default. If set to 0 returns entire text as a single fragment ignoring fragment_size.
*
*
* .google.protobuf.UInt32Value max_number_of_fragments = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxNumberOfFragmentsFieldBuilder() {
if (maxNumberOfFragmentsBuilder_ == null) {
maxNumberOfFragmentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxNumberOfFragments(),
getParentForChildren(),
isClean());
maxNumberOfFragments_ = null;
}
return maxNumberOfFragmentsBuilder_;
}
private com.yelp.nrtsearch.server.grpc.Query highlightQuery_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder> highlightQueryBuilder_;
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return Whether the highlightQuery field is set.
*/
public boolean hasHighlightQuery() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
* @return The highlightQuery.
*/
public com.yelp.nrtsearch.server.grpc.Query getHighlightQuery() {
if (highlightQueryBuilder_ == null) {
return highlightQuery_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : highlightQuery_;
} else {
return highlightQueryBuilder_.getMessage();
}
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public Builder setHighlightQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (highlightQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
highlightQuery_ = value;
} else {
highlightQueryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public Builder setHighlightQuery(
com.yelp.nrtsearch.server.grpc.Query.Builder builderForValue) {
if (highlightQueryBuilder_ == null) {
highlightQuery_ = builderForValue.build();
} else {
highlightQueryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public Builder mergeHighlightQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (highlightQueryBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
highlightQuery_ != null &&
highlightQuery_ != com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance()) {
getHighlightQueryBuilder().mergeFrom(value);
} else {
highlightQuery_ = value;
}
} else {
highlightQueryBuilder_.mergeFrom(value);
}
if (highlightQuery_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public Builder clearHighlightQuery() {
bitField0_ = (bitField0_ & ~0x00000020);
highlightQuery_ = null;
if (highlightQueryBuilder_ != null) {
highlightQueryBuilder_.dispose();
highlightQueryBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public com.yelp.nrtsearch.server.grpc.Query.Builder getHighlightQueryBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getHighlightQueryFieldBuilder().getBuilder();
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getHighlightQueryOrBuilder() {
if (highlightQueryBuilder_ != null) {
return highlightQueryBuilder_.getMessageOrBuilder();
} else {
return highlightQuery_ == null ?
com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : highlightQuery_;
}
}
/**
*
* Specify a query here if highlighting is desired against a different query than the search query.
*
*
* .luceneserver.Query highlight_query = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>
getHighlightQueryFieldBuilder() {
if (highlightQueryBuilder_ == null) {
highlightQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>(
getHighlightQuery(),
getParentForChildren(),
isClean());
highlightQuery_ = null;
}
return highlightQueryBuilder_;
}
private com.google.protobuf.BoolValue fieldMatch_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> fieldMatchBuilder_;
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return Whether the fieldMatch field is set.
*/
public boolean hasFieldMatch() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
* @return The fieldMatch.
*/
public com.google.protobuf.BoolValue getFieldMatch() {
if (fieldMatchBuilder_ == null) {
return fieldMatch_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : fieldMatch_;
} else {
return fieldMatchBuilder_.getMessage();
}
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public Builder setFieldMatch(com.google.protobuf.BoolValue value) {
if (fieldMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fieldMatch_ = value;
} else {
fieldMatchBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public Builder setFieldMatch(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (fieldMatchBuilder_ == null) {
fieldMatch_ = builderForValue.build();
} else {
fieldMatchBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public Builder mergeFieldMatch(com.google.protobuf.BoolValue value) {
if (fieldMatchBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
fieldMatch_ != null &&
fieldMatch_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
getFieldMatchBuilder().mergeFrom(value);
} else {
fieldMatch_ = value;
}
} else {
fieldMatchBuilder_.mergeFrom(value);
}
if (fieldMatch_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public Builder clearFieldMatch() {
bitField0_ = (bitField0_ & ~0x00000040);
fieldMatch_ = null;
if (fieldMatchBuilder_ != null) {
fieldMatchBuilder_.dispose();
fieldMatchBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public com.google.protobuf.BoolValue.Builder getFieldMatchBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getFieldMatchFieldBuilder().getBuilder();
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
public com.google.protobuf.BoolValueOrBuilder getFieldMatchOrBuilder() {
if (fieldMatchBuilder_ != null) {
return fieldMatchBuilder_.getMessageOrBuilder();
} else {
return fieldMatch_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : fieldMatch_;
}
}
/**
*
* Set to true to highlight fields only if specified in the search query.
*
*
* .google.protobuf.BoolValue field_match = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getFieldMatchFieldBuilder() {
if (fieldMatchBuilder_ == null) {
fieldMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getFieldMatch(),
getParentForChildren(),
isClean());
fieldMatch_ = null;
}
return fieldMatchBuilder_;
}
private com.google.protobuf.BoolValue scoreOrdered_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> scoreOrderedBuilder_;
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return Whether the scoreOrdered field is set.
*/
public boolean hasScoreOrdered() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
* @return The scoreOrdered.
*/
public com.google.protobuf.BoolValue getScoreOrdered() {
if (scoreOrderedBuilder_ == null) {
return scoreOrdered_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : scoreOrdered_;
} else {
return scoreOrderedBuilder_.getMessage();
}
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public Builder setScoreOrdered(com.google.protobuf.BoolValue value) {
if (scoreOrderedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scoreOrdered_ = value;
} else {
scoreOrderedBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public Builder setScoreOrdered(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (scoreOrderedBuilder_ == null) {
scoreOrdered_ = builderForValue.build();
} else {
scoreOrderedBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public Builder mergeScoreOrdered(com.google.protobuf.BoolValue value) {
if (scoreOrderedBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
scoreOrdered_ != null &&
scoreOrdered_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
getScoreOrderedBuilder().mergeFrom(value);
} else {
scoreOrdered_ = value;
}
} else {
scoreOrderedBuilder_.mergeFrom(value);
}
if (scoreOrdered_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public Builder clearScoreOrdered() {
bitField0_ = (bitField0_ & ~0x00000080);
scoreOrdered_ = null;
if (scoreOrderedBuilder_ != null) {
scoreOrderedBuilder_.dispose();
scoreOrderedBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public com.google.protobuf.BoolValue.Builder getScoreOrderedBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getScoreOrderedFieldBuilder().getBuilder();
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
public com.google.protobuf.BoolValueOrBuilder getScoreOrderedOrBuilder() {
if (scoreOrderedBuilder_ != null) {
return scoreOrderedBuilder_.getMessageOrBuilder();
} else {
return scoreOrdered_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : scoreOrdered_;
}
}
/**
*
* Sorts highlighted fragments by score when set to true. By default, fragments will be output in the order they appear in the field. (Default is true)
*
*
* .google.protobuf.BoolValue score_ordered = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getScoreOrderedFieldBuilder() {
if (scoreOrderedBuilder_ == null) {
scoreOrderedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getScoreOrdered(),
getParentForChildren(),
isClean());
scoreOrdered_ = null;
}
return scoreOrderedBuilder_;
}
private com.google.protobuf.StringValue fragmenter_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> fragmenterBuilder_;
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return Whether the fragmenter field is set.
*/
public boolean hasFragmenter() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
* @return The fragmenter.
*/
public com.google.protobuf.StringValue getFragmenter() {
if (fragmenterBuilder_ == null) {
return fragmenter_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : fragmenter_;
} else {
return fragmenterBuilder_.getMessage();
}
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public Builder setFragmenter(com.google.protobuf.StringValue value) {
if (fragmenterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fragmenter_ = value;
} else {
fragmenterBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public Builder setFragmenter(
com.google.protobuf.StringValue.Builder builderForValue) {
if (fragmenterBuilder_ == null) {
fragmenter_ = builderForValue.build();
} else {
fragmenterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public Builder mergeFragmenter(com.google.protobuf.StringValue value) {
if (fragmenterBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0) &&
fragmenter_ != null &&
fragmenter_ != com.google.protobuf.StringValue.getDefaultInstance()) {
getFragmenterBuilder().mergeFrom(value);
} else {
fragmenter_ = value;
}
} else {
fragmenterBuilder_.mergeFrom(value);
}
if (fragmenter_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public Builder clearFragmenter() {
bitField0_ = (bitField0_ & ~0x00000100);
fragmenter_ = null;
if (fragmenterBuilder_ != null) {
fragmenterBuilder_.dispose();
fragmenterBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public com.google.protobuf.StringValue.Builder getFragmenterBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getFragmenterFieldBuilder().getBuilder();
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
public com.google.protobuf.StringValueOrBuilder getFragmenterOrBuilder() {
if (fragmenterBuilder_ != null) {
return fragmenterBuilder_.getMessageOrBuilder();
} else {
return fragmenter_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : fragmenter_;
}
}
/**
*
* Select Fragmenter between span (default) and simple. This is only applicable for plain highlighters.
*
*
* .google.protobuf.StringValue fragmenter = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getFragmenterFieldBuilder() {
if (fragmenterBuilder_ == null) {
fragmenterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getFragmenter(),
getParentForChildren(),
isClean());
fragmenter_ = null;
}
return fragmenterBuilder_;
}
private com.google.protobuf.BoolValue discreteMultivalue_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> discreteMultivalueBuilder_;
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return Whether the discreteMultivalue field is set.
*/
public boolean hasDiscreteMultivalue() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
* @return The discreteMultivalue.
*/
public com.google.protobuf.BoolValue getDiscreteMultivalue() {
if (discreteMultivalueBuilder_ == null) {
return discreteMultivalue_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : discreteMultivalue_;
} else {
return discreteMultivalueBuilder_.getMessage();
}
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public Builder setDiscreteMultivalue(com.google.protobuf.BoolValue value) {
if (discreteMultivalueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
discreteMultivalue_ = value;
} else {
discreteMultivalueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public Builder setDiscreteMultivalue(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (discreteMultivalueBuilder_ == null) {
discreteMultivalue_ = builderForValue.build();
} else {
discreteMultivalueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public Builder mergeDiscreteMultivalue(com.google.protobuf.BoolValue value) {
if (discreteMultivalueBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0) &&
discreteMultivalue_ != null &&
discreteMultivalue_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
getDiscreteMultivalueBuilder().mergeFrom(value);
} else {
discreteMultivalue_ = value;
}
} else {
discreteMultivalueBuilder_.mergeFrom(value);
}
if (discreteMultivalue_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public Builder clearDiscreteMultivalue() {
bitField0_ = (bitField0_ & ~0x00000200);
discreteMultivalue_ = null;
if (discreteMultivalueBuilder_ != null) {
discreteMultivalueBuilder_.dispose();
discreteMultivalueBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public com.google.protobuf.BoolValue.Builder getDiscreteMultivalueBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getDiscreteMultivalueFieldBuilder().getBuilder();
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
public com.google.protobuf.BoolValueOrBuilder getDiscreteMultivalueOrBuilder() {
if (discreteMultivalueBuilder_ != null) {
return discreteMultivalueBuilder_.getMessageOrBuilder();
} else {
return discreteMultivalue_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : discreteMultivalue_;
}
}
/**
*
* Let the fragment builder respect the multivalue fields. Each fragment won't cross multiple value fields if set true. (Default is false)
*
*
* .google.protobuf.BoolValue discrete_multivalue = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getDiscreteMultivalueFieldBuilder() {
if (discreteMultivalueBuilder_ == null) {
discreteMultivalueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getDiscreteMultivalue(),
getParentForChildren(),
isClean());
discreteMultivalue_ = null;
}
return discreteMultivalueBuilder_;
}
private java.lang.Object customHighlighterName_ = "";
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The customHighlighterName.
*/
public java.lang.String getCustomHighlighterName() {
java.lang.Object ref = customHighlighterName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customHighlighterName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return The bytes for customHighlighterName.
*/
public com.google.protobuf.ByteString
getCustomHighlighterNameBytes() {
java.lang.Object ref = customHighlighterName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customHighlighterName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @param value The customHighlighterName to set.
* @return This builder for chaining.
*/
public Builder setCustomHighlighterName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
customHighlighterName_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @return This builder for chaining.
*/
public Builder clearCustomHighlighterName() {
customHighlighterName_ = getDefaultInstance().getCustomHighlighterName();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
* When highlighter_type is CUSTOM, use this string identifier to specify the highlighter. It is ignored for any other highlighter_types.
*
*
* string custom_highlighter_name = 11;
* @param value The bytes for customHighlighterName to set.
* @return This builder for chaining.
*/
public Builder setCustomHighlighterNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
customHighlighterName_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private com.google.protobuf.Struct customHighlighterParams_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> customHighlighterParamsBuilder_;
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return Whether the customHighlighterParams field is set.
*/
public boolean hasCustomHighlighterParams() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
* @return The customHighlighterParams.
*/
public com.google.protobuf.Struct getCustomHighlighterParams() {
if (customHighlighterParamsBuilder_ == null) {
return customHighlighterParams_ == null ? com.google.protobuf.Struct.getDefaultInstance() : customHighlighterParams_;
} else {
return customHighlighterParamsBuilder_.getMessage();
}
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public Builder setCustomHighlighterParams(com.google.protobuf.Struct value) {
if (customHighlighterParamsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
customHighlighterParams_ = value;
} else {
customHighlighterParamsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public Builder setCustomHighlighterParams(
com.google.protobuf.Struct.Builder builderForValue) {
if (customHighlighterParamsBuilder_ == null) {
customHighlighterParams_ = builderForValue.build();
} else {
customHighlighterParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public Builder mergeCustomHighlighterParams(com.google.protobuf.Struct value) {
if (customHighlighterParamsBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0) &&
customHighlighterParams_ != null &&
customHighlighterParams_ != com.google.protobuf.Struct.getDefaultInstance()) {
getCustomHighlighterParamsBuilder().mergeFrom(value);
} else {
customHighlighterParams_ = value;
}
} else {
customHighlighterParamsBuilder_.mergeFrom(value);
}
if (customHighlighterParams_ != null) {
bitField0_ |= 0x00000800;
onChanged();
}
return this;
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public Builder clearCustomHighlighterParams() {
bitField0_ = (bitField0_ & ~0x00000800);
customHighlighterParams_ = null;
if (customHighlighterParamsBuilder_ != null) {
customHighlighterParamsBuilder_.dispose();
customHighlighterParamsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public com.google.protobuf.Struct.Builder getCustomHighlighterParamsBuilder() {
bitField0_ |= 0x00000800;
onChanged();
return getCustomHighlighterParamsFieldBuilder().getBuilder();
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
public com.google.protobuf.StructOrBuilder getCustomHighlighterParamsOrBuilder() {
if (customHighlighterParamsBuilder_ != null) {
return customHighlighterParamsBuilder_.getMessageOrBuilder();
} else {
return customHighlighterParams_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : customHighlighterParams_;
}
}
/**
*
* Optional Custom parameters for custom highlighters. If a field overriding is present, the global setting will be omitted for this field, and no merge will happen.
*
*
* .google.protobuf.Struct custom_highlighter_params = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getCustomHighlighterParamsFieldBuilder() {
if (customHighlighterParamsBuilder_ == null) {
customHighlighterParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getCustomHighlighterParams(),
getParentForChildren(),
isClean());
customHighlighterParams_ = null;
}
return customHighlighterParamsBuilder_;
}
private com.google.protobuf.StringValue boundaryScanner_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> boundaryScannerBuilder_;
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return Whether the boundaryScanner field is set.
*/
public boolean hasBoundaryScanner() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
* @return The boundaryScanner.
*/
public com.google.protobuf.StringValue getBoundaryScanner() {
if (boundaryScannerBuilder_ == null) {
return boundaryScanner_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScanner_;
} else {
return boundaryScannerBuilder_.getMessage();
}
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public Builder setBoundaryScanner(com.google.protobuf.StringValue value) {
if (boundaryScannerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundaryScanner_ = value;
} else {
boundaryScannerBuilder_.setMessage(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public Builder setBoundaryScanner(
com.google.protobuf.StringValue.Builder builderForValue) {
if (boundaryScannerBuilder_ == null) {
boundaryScanner_ = builderForValue.build();
} else {
boundaryScannerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public Builder mergeBoundaryScanner(com.google.protobuf.StringValue value) {
if (boundaryScannerBuilder_ == null) {
if (((bitField0_ & 0x00001000) != 0) &&
boundaryScanner_ != null &&
boundaryScanner_ != com.google.protobuf.StringValue.getDefaultInstance()) {
getBoundaryScannerBuilder().mergeFrom(value);
} else {
boundaryScanner_ = value;
}
} else {
boundaryScannerBuilder_.mergeFrom(value);
}
if (boundaryScanner_ != null) {
bitField0_ |= 0x00001000;
onChanged();
}
return this;
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public Builder clearBoundaryScanner() {
bitField0_ = (bitField0_ & ~0x00001000);
boundaryScanner_ = null;
if (boundaryScannerBuilder_ != null) {
boundaryScannerBuilder_.dispose();
boundaryScannerBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public com.google.protobuf.StringValue.Builder getBoundaryScannerBuilder() {
bitField0_ |= 0x00001000;
onChanged();
return getBoundaryScannerFieldBuilder().getBuilder();
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
public com.google.protobuf.StringValueOrBuilder getBoundaryScannerOrBuilder() {
if (boundaryScannerBuilder_ != null) {
return boundaryScannerBuilder_.getMessageOrBuilder();
} else {
return boundaryScanner_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : boundaryScanner_;
}
}
/**
*
* Define the boundary decision when creating fragments. Options are "simple" (default in fast vector highlighter), "word" or "sentence".
*
*
* .google.protobuf.StringValue boundary_scanner = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getBoundaryScannerFieldBuilder() {
if (boundaryScannerBuilder_ == null) {
boundaryScannerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getBoundaryScanner(),
getParentForChildren(),
isClean());
boundaryScanner_ = null;
}
return boundaryScannerBuilder_;
}
private com.google.protobuf.StringValue boundaryChars_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> boundaryCharsBuilder_;
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return Whether the boundaryChars field is set.
*/
public boolean hasBoundaryChars() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
* @return The boundaryChars.
*/
public com.google.protobuf.StringValue getBoundaryChars() {
if (boundaryCharsBuilder_ == null) {
return boundaryChars_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryChars_;
} else {
return boundaryCharsBuilder_.getMessage();
}
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public Builder setBoundaryChars(com.google.protobuf.StringValue value) {
if (boundaryCharsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundaryChars_ = value;
} else {
boundaryCharsBuilder_.setMessage(value);
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public Builder setBoundaryChars(
com.google.protobuf.StringValue.Builder builderForValue) {
if (boundaryCharsBuilder_ == null) {
boundaryChars_ = builderForValue.build();
} else {
boundaryCharsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public Builder mergeBoundaryChars(com.google.protobuf.StringValue value) {
if (boundaryCharsBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0) &&
boundaryChars_ != null &&
boundaryChars_ != com.google.protobuf.StringValue.getDefaultInstance()) {
getBoundaryCharsBuilder().mergeFrom(value);
} else {
boundaryChars_ = value;
}
} else {
boundaryCharsBuilder_.mergeFrom(value);
}
if (boundaryChars_ != null) {
bitField0_ |= 0x00002000;
onChanged();
}
return this;
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public Builder clearBoundaryChars() {
bitField0_ = (bitField0_ & ~0x00002000);
boundaryChars_ = null;
if (boundaryCharsBuilder_ != null) {
boundaryCharsBuilder_.dispose();
boundaryCharsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public com.google.protobuf.StringValue.Builder getBoundaryCharsBuilder() {
bitField0_ |= 0x00002000;
onChanged();
return getBoundaryCharsFieldBuilder().getBuilder();
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
public com.google.protobuf.StringValueOrBuilder getBoundaryCharsOrBuilder() {
if (boundaryCharsBuilder_ != null) {
return boundaryCharsBuilder_.getMessageOrBuilder();
} else {
return boundaryChars_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : boundaryChars_;
}
}
/**
*
* Terminating chars when using "simple" boundary_scanner. The default is ".,!? \t\n".
*
*
* .google.protobuf.StringValue boundary_chars = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getBoundaryCharsFieldBuilder() {
if (boundaryCharsBuilder_ == null) {
boundaryCharsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getBoundaryChars(),
getParentForChildren(),
isClean());
boundaryChars_ = null;
}
return boundaryCharsBuilder_;
}
private com.google.protobuf.UInt32Value boundaryMaxScan_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> boundaryMaxScanBuilder_;
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return Whether the boundaryMaxScan field is set.
*/
public boolean hasBoundaryMaxScan() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
* @return The boundaryMaxScan.
*/
public com.google.protobuf.UInt32Value getBoundaryMaxScan() {
if (boundaryMaxScanBuilder_ == null) {
return boundaryMaxScan_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : boundaryMaxScan_;
} else {
return boundaryMaxScanBuilder_.getMessage();
}
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public Builder setBoundaryMaxScan(com.google.protobuf.UInt32Value value) {
if (boundaryMaxScanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundaryMaxScan_ = value;
} else {
boundaryMaxScanBuilder_.setMessage(value);
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public Builder setBoundaryMaxScan(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (boundaryMaxScanBuilder_ == null) {
boundaryMaxScan_ = builderForValue.build();
} else {
boundaryMaxScanBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public Builder mergeBoundaryMaxScan(com.google.protobuf.UInt32Value value) {
if (boundaryMaxScanBuilder_ == null) {
if (((bitField0_ & 0x00004000) != 0) &&
boundaryMaxScan_ != null &&
boundaryMaxScan_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getBoundaryMaxScanBuilder().mergeFrom(value);
} else {
boundaryMaxScan_ = value;
}
} else {
boundaryMaxScanBuilder_.mergeFrom(value);
}
if (boundaryMaxScan_ != null) {
bitField0_ |= 0x00004000;
onChanged();
}
return this;
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public Builder clearBoundaryMaxScan() {
bitField0_ = (bitField0_ & ~0x00004000);
boundaryMaxScan_ = null;
if (boundaryMaxScanBuilder_ != null) {
boundaryMaxScanBuilder_.dispose();
boundaryMaxScanBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public com.google.protobuf.UInt32Value.Builder getBoundaryMaxScanBuilder() {
bitField0_ |= 0x00004000;
onChanged();
return getBoundaryMaxScanFieldBuilder().getBuilder();
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
public com.google.protobuf.UInt32ValueOrBuilder getBoundaryMaxScanOrBuilder() {
if (boundaryMaxScanBuilder_ != null) {
return boundaryMaxScanBuilder_.getMessageOrBuilder();
} else {
return boundaryMaxScan_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : boundaryMaxScan_;
}
}
/**
*
* Number of chars to scan before finding the boundary_chars if using "simple" boundary scanner; If "boundary_chars" is not found after max scan, fragments will start/end at the original place. Default is 20.
*
*
* .google.protobuf.UInt32Value boundary_max_scan = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getBoundaryMaxScanFieldBuilder() {
if (boundaryMaxScanBuilder_ == null) {
boundaryMaxScanBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getBoundaryMaxScan(),
getParentForChildren(),
isClean());
boundaryMaxScan_ = null;
}
return boundaryMaxScanBuilder_;
}
private com.google.protobuf.StringValue boundaryScannerLocale_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> boundaryScannerLocaleBuilder_;
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return Whether the boundaryScannerLocale field is set.
*/
public boolean hasBoundaryScannerLocale() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
* @return The boundaryScannerLocale.
*/
public com.google.protobuf.StringValue getBoundaryScannerLocale() {
if (boundaryScannerLocaleBuilder_ == null) {
return boundaryScannerLocale_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : boundaryScannerLocale_;
} else {
return boundaryScannerLocaleBuilder_.getMessage();
}
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public Builder setBoundaryScannerLocale(com.google.protobuf.StringValue value) {
if (boundaryScannerLocaleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundaryScannerLocale_ = value;
} else {
boundaryScannerLocaleBuilder_.setMessage(value);
}
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public Builder setBoundaryScannerLocale(
com.google.protobuf.StringValue.Builder builderForValue) {
if (boundaryScannerLocaleBuilder_ == null) {
boundaryScannerLocale_ = builderForValue.build();
} else {
boundaryScannerLocaleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public Builder mergeBoundaryScannerLocale(com.google.protobuf.StringValue value) {
if (boundaryScannerLocaleBuilder_ == null) {
if (((bitField0_ & 0x00008000) != 0) &&
boundaryScannerLocale_ != null &&
boundaryScannerLocale_ != com.google.protobuf.StringValue.getDefaultInstance()) {
getBoundaryScannerLocaleBuilder().mergeFrom(value);
} else {
boundaryScannerLocale_ = value;
}
} else {
boundaryScannerLocaleBuilder_.mergeFrom(value);
}
if (boundaryScannerLocale_ != null) {
bitField0_ |= 0x00008000;
onChanged();
}
return this;
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public Builder clearBoundaryScannerLocale() {
bitField0_ = (bitField0_ & ~0x00008000);
boundaryScannerLocale_ = null;
if (boundaryScannerLocaleBuilder_ != null) {
boundaryScannerLocaleBuilder_.dispose();
boundaryScannerLocaleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public com.google.protobuf.StringValue.Builder getBoundaryScannerLocaleBuilder() {
bitField0_ |= 0x00008000;
onChanged();
return getBoundaryScannerLocaleFieldBuilder().getBuilder();
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
public com.google.protobuf.StringValueOrBuilder getBoundaryScannerLocaleOrBuilder() {
if (boundaryScannerLocaleBuilder_ != null) {
return boundaryScannerLocaleBuilder_.getMessageOrBuilder();
} else {
return boundaryScannerLocale_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : boundaryScannerLocale_;
}
}
/**
*
* Locale used in boundary scanner when using "word" or "sentence" boundary_scanner. Examples: "en-US", "ch-ZH".
*
*
* .google.protobuf.StringValue boundary_scanner_locale = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getBoundaryScannerLocaleFieldBuilder() {
if (boundaryScannerLocaleBuilder_ == null) {
boundaryScannerLocaleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getBoundaryScannerLocale(),
getParentForChildren(),
isClean());
boundaryScannerLocale_ = null;
}
return boundaryScannerLocaleBuilder_;
}
@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:luceneserver.Highlight.Settings)
}
// @@protoc_insertion_point(class_scope:luceneserver.Highlight.Settings)
private static final com.yelp.nrtsearch.server.grpc.Highlight.Settings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.Highlight.Settings();
}
public static com.yelp.nrtsearch.server.grpc.Highlight.Settings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Settings 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 com.yelp.nrtsearch.server.grpc.Highlight.Settings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int SETTINGS_FIELD_NUMBER = 1;
private com.yelp.nrtsearch.server.grpc.Highlight.Settings settings_;
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
* @return Whether the settings field is set.
*/
@java.lang.Override
public boolean hasSettings() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
* @return The settings.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings getSettings() {
return settings_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance() : settings_;
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder getSettingsOrBuilder() {
return settings_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance() : settings_;
}
public static final int FIELDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @return A list containing the fields.
*/
public com.google.protobuf.ProtocolStringList
getFieldsList() {
return fields_;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @return The count of fields.
*/
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param index The index of the element to return.
* @return The fields at the given index.
*/
public java.lang.String getFields(int index) {
return fields_.get(index);
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param index The index of the value to return.
* @return The bytes of the fields at the given index.
*/
public com.google.protobuf.ByteString
getFieldsBytes(int index) {
return fields_.getByteString(index);
}
public static final int FIELD_SETTINGS_FIELD_NUMBER = 3;
private static final class FieldSettingsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.yelp.nrtsearch.server.grpc.Highlight.Settings> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_FieldSettingsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, com.yelp.nrtsearch.server.grpc.Highlight.Settings> fieldSettings_;
private com.google.protobuf.MapField
internalGetFieldSettings() {
if (fieldSettings_ == null) {
return com.google.protobuf.MapField.emptyMapField(
FieldSettingsDefaultEntryHolder.defaultEntry);
}
return fieldSettings_;
}
public int getFieldSettingsCount() {
return internalGetFieldSettings().getMap().size();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public boolean containsFieldSettings(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetFieldSettings().getMap().containsKey(key);
}
/**
* Use {@link #getFieldSettingsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getFieldSettings() {
return getFieldSettingsMap();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public java.util.Map getFieldSettingsMap() {
return internalGetFieldSettings().getMap();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.Highlight.Settings getFieldSettingsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.Highlight.Settings defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldSettings().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings getFieldSettingsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldSettings().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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)) {
output.writeMessage(1, getSettings());
}
for (int i = 0; i < fields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fields_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetFieldSettings(),
FieldSettingsDefaultEntryHolder.defaultEntry,
3);
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.CodedOutputStream
.computeMessageSize(1, getSettings());
}
{
int dataSize = 0;
for (int i = 0; i < fields_.size(); i++) {
dataSize += computeStringSizeNoTag(fields_.getRaw(i));
}
size += dataSize;
size += 1 * getFieldsList().size();
}
for (java.util.Map.Entry entry
: internalGetFieldSettings().getMap().entrySet()) {
com.google.protobuf.MapEntry
fieldSettings__ = FieldSettingsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, fieldSettings__);
}
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 com.yelp.nrtsearch.server.grpc.Highlight)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.Highlight other = (com.yelp.nrtsearch.server.grpc.Highlight) obj;
if (hasSettings() != other.hasSettings()) return false;
if (hasSettings()) {
if (!getSettings()
.equals(other.getSettings())) return false;
}
if (!getFieldsList()
.equals(other.getFieldsList())) return false;
if (!internalGetFieldSettings().equals(
other.internalGetFieldSettings())) 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 (hasSettings()) {
hash = (37 * hash) + SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getSettings().hashCode();
}
if (getFieldsCount() > 0) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getFieldsList().hashCode();
}
if (!internalGetFieldSettings().getMap().isEmpty()) {
hash = (37 * hash) + FIELD_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + internalGetFieldSettings().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.Highlight parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight 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 com.yelp.nrtsearch.server.grpc.Highlight parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight 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 com.yelp.nrtsearch.server.grpc.Highlight parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Highlight 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(com.yelp.nrtsearch.server.grpc.Highlight 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;
}
/**
*
* Specify how to highlight matched text in SearchRequest
*
*
* Protobuf type {@code luceneserver.Highlight}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.Highlight)
com.yelp.nrtsearch.server.grpc.HighlightOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetFieldSettings();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetMutableFieldSettings();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Highlight.class, com.yelp.nrtsearch.server.grpc.Highlight.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.Highlight.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSettingsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
settings_ = null;
if (settingsBuilder_ != null) {
settingsBuilder_.dispose();
settingsBuilder_ = null;
}
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
internalGetMutableFieldSettings().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Highlight_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight build() {
com.yelp.nrtsearch.server.grpc.Highlight result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight buildPartial() {
com.yelp.nrtsearch.server.grpc.Highlight result = new com.yelp.nrtsearch.server.grpc.Highlight(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.Highlight result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.settings_ = settingsBuilder_ == null
? settings_
: settingsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
fields_.makeImmutable();
result.fields_ = fields_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.fieldSettings_ = internalGetFieldSettings().build(FieldSettingsDefaultEntryHolder.defaultEntry);
}
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 com.yelp.nrtsearch.server.grpc.Highlight) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.Highlight)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.Highlight other) {
if (other == com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance()) return this;
if (other.hasSettings()) {
mergeSettings(other.getSettings());
}
if (!other.fields_.isEmpty()) {
if (fields_.isEmpty()) {
fields_ = other.fields_;
bitField0_ |= 0x00000002;
} else {
ensureFieldsIsMutable();
fields_.addAll(other.fields_);
}
onChanged();
}
internalGetMutableFieldSettings().mergeFrom(
other.internalGetFieldSettings());
bitField0_ |= 0x00000004;
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: {
input.readMessage(
getSettingsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureFieldsIsMutable();
fields_.add(s);
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
fieldSettings__ = input.readMessage(
FieldSettingsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableFieldSettings().ensureBuilderMap().put(
fieldSettings__.getKey(), fieldSettings__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 26
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 com.yelp.nrtsearch.server.grpc.Highlight.Settings settings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight.Settings, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder, com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder> settingsBuilder_;
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
* @return Whether the settings field is set.
*/
public boolean hasSettings() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
* @return The settings.
*/
public com.yelp.nrtsearch.server.grpc.Highlight.Settings getSettings() {
if (settingsBuilder_ == null) {
return settings_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance() : settings_;
} else {
return settingsBuilder_.getMessage();
}
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public Builder setSettings(com.yelp.nrtsearch.server.grpc.Highlight.Settings value) {
if (settingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
settings_ = value;
} else {
settingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public Builder setSettings(
com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder builderForValue) {
if (settingsBuilder_ == null) {
settings_ = builderForValue.build();
} else {
settingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public Builder mergeSettings(com.yelp.nrtsearch.server.grpc.Highlight.Settings value) {
if (settingsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
settings_ != null &&
settings_ != com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance()) {
getSettingsBuilder().mergeFrom(value);
} else {
settings_ = value;
}
} else {
settingsBuilder_.mergeFrom(value);
}
if (settings_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public Builder clearSettings() {
bitField0_ = (bitField0_ & ~0x00000001);
settings_ = null;
if (settingsBuilder_ != null) {
settingsBuilder_.dispose();
settingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder getSettingsBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getSettingsFieldBuilder().getBuilder();
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
public com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder getSettingsOrBuilder() {
if (settingsBuilder_ != null) {
return settingsBuilder_.getMessageOrBuilder();
} else {
return settings_ == null ?
com.yelp.nrtsearch.server.grpc.Highlight.Settings.getDefaultInstance() : settings_;
}
}
/**
*
* Highlight settings
*
*
* .luceneserver.Highlight.Settings settings = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight.Settings, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder, com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder>
getSettingsFieldBuilder() {
if (settingsBuilder_ == null) {
settingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight.Settings, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder, com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder>(
getSettings(),
getParentForChildren(),
isClean());
settings_ = null;
}
return settingsBuilder_;
}
private com.google.protobuf.LazyStringArrayList fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFieldsIsMutable() {
if (!fields_.isModifiable()) {
fields_ = new com.google.protobuf.LazyStringArrayList(fields_);
}
bitField0_ |= 0x00000002;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @return A list containing the fields.
*/
public com.google.protobuf.ProtocolStringList
getFieldsList() {
fields_.makeImmutable();
return fields_;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @return The count of fields.
*/
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param index The index of the element to return.
* @return The fields at the given index.
*/
public java.lang.String getFields(int index) {
return fields_.get(index);
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param index The index of the value to return.
* @return The bytes of the fields at the given index.
*/
public com.google.protobuf.ByteString
getFieldsBytes(int index) {
return fields_.getByteString(index);
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param index The index to set the value at.
* @param value The fields to set.
* @return This builder for chaining.
*/
public Builder setFields(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFieldsIsMutable();
fields_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param value The fields to add.
* @return This builder for chaining.
*/
public Builder addFields(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFieldsIsMutable();
fields_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param values The fields to add.
* @return This builder for chaining.
*/
public Builder addAllFields(
java.lang.Iterable values) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @return This builder for chaining.
*/
public Builder clearFields() {
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* Fields to highlight
*
*
* repeated string fields = 2;
* @param value The bytes of the fields to add.
* @return This builder for chaining.
*/
public Builder addFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureFieldsIsMutable();
fields_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private static final class FieldSettingsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings build(com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder val) {
if (val instanceof com.yelp.nrtsearch.server.grpc.Highlight.Settings) { return (com.yelp.nrtsearch.server.grpc.Highlight.Settings) val; }
return ((com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return FieldSettingsDefaultEntryHolder.defaultEntry;
}
};
private static final FieldSettingsConverter fieldSettingsConverter = new FieldSettingsConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder, com.yelp.nrtsearch.server.grpc.Highlight.Settings, com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder> fieldSettings_;
private com.google.protobuf.MapFieldBuilder
internalGetFieldSettings() {
if (fieldSettings_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(fieldSettingsConverter);
}
return fieldSettings_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableFieldSettings() {
if (fieldSettings_ == null) {
fieldSettings_ = new com.google.protobuf.MapFieldBuilder<>(fieldSettingsConverter);
}
bitField0_ |= 0x00000004;
onChanged();
return fieldSettings_;
}
public int getFieldSettingsCount() {
return internalGetFieldSettings().ensureBuilderMap().size();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public boolean containsFieldSettings(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetFieldSettings().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getFieldSettingsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getFieldSettings() {
return getFieldSettingsMap();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public java.util.Map getFieldSettingsMap() {
return internalGetFieldSettings().getImmutableMap();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.Highlight.Settings getFieldSettingsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.Highlight.Settings defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableFieldSettings().ensureBuilderMap();
return map.containsKey(key) ? fieldSettingsConverter.build(map.get(key)) : defaultValue;
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight.Settings getFieldSettingsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableFieldSettings().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return fieldSettingsConverter.build(map.get(key));
}
public Builder clearFieldSettings() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableFieldSettings().clear();
return this;
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
public Builder removeFieldSettings(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableFieldSettings().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableFieldSettings() {
bitField0_ |= 0x00000004;
return internalGetMutableFieldSettings().ensureMessageMap();
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
public Builder putFieldSettings(
java.lang.String key,
com.yelp.nrtsearch.server.grpc.Highlight.Settings value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableFieldSettings().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
public Builder putAllFieldSettings(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableFieldSettings().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Map of field name to highlight settings for field, overrides request level highlight settings
*
*
* map<string, .luceneserver.Highlight.Settings> field_settings = 3;
*/
public com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder putFieldSettingsBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableFieldSettings().ensureBuilderMap();
com.yelp.nrtsearch.server.grpc.Highlight.SettingsOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = com.yelp.nrtsearch.server.grpc.Highlight.Settings.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof com.yelp.nrtsearch.server.grpc.Highlight.Settings) {
entry = ((com.yelp.nrtsearch.server.grpc.Highlight.Settings) entry).toBuilder();
builderMap.put(key, entry);
}
return (com.yelp.nrtsearch.server.grpc.Highlight.Settings.Builder) entry;
}
@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:luceneserver.Highlight)
}
// @@protoc_insertion_point(class_scope:luceneserver.Highlight)
private static final com.yelp.nrtsearch.server.grpc.Highlight DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.Highlight();
}
public static com.yelp.nrtsearch.server.grpc.Highlight getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Highlight 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 com.yelp.nrtsearch.server.grpc.Highlight getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}