Class QAResult.Highlight.Builder (0.42.0)

public static final class QAResult.Highlight.Builder extends GeneratedMessageV3.Builder<QAResult.Highlight.Builder> implements QAResult.HighlightOrBuilder

A text span in the search text snippet that represents a highlighted section (answer context, highly relevant sentence, etc.).

Protobuf type google.cloud.contentwarehouse.v1.QAResult.Highlight

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public QAResult.Highlight.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
QAResult.Highlight.Builder
Overrides

build()

public QAResult.Highlight build()
Returns
Type Description
QAResult.Highlight

buildPartial()

public QAResult.Highlight buildPartial()
Returns
Type Description
QAResult.Highlight

clear()

public QAResult.Highlight.Builder clear()
Returns
Type Description
QAResult.Highlight.Builder
Overrides

clearEndIndex()

public QAResult.Highlight.Builder clearEndIndex()

End index of the highlight, exclusive.

int32 end_index = 2;

Returns
Type Description
QAResult.Highlight.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public QAResult.Highlight.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
QAResult.Highlight.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public QAResult.Highlight.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
QAResult.Highlight.Builder
Overrides

clearStartIndex()

public QAResult.Highlight.Builder clearStartIndex()

Start index of the highlight.

int32 start_index = 1;

Returns
Type Description
QAResult.Highlight.Builder

This builder for chaining.

clone()

public QAResult.Highlight.Builder clone()
Returns
Type Description
QAResult.Highlight.Builder
Overrides

getDefaultInstanceForType()

public QAResult.Highlight getDefaultInstanceForType()
Returns
Type Description
QAResult.Highlight

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndIndex()

public int getEndIndex()

End index of the highlight, exclusive.

int32 end_index = 2;

Returns
Type Description
int

The endIndex.

getStartIndex()

public int getStartIndex()

Start index of the highlight.

int32 start_index = 1;

Returns
Type Description
int

The startIndex.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(QAResult.Highlight other)

public QAResult.Highlight.Builder mergeFrom(QAResult.Highlight other)
Parameter
Name Description
other QAResult.Highlight
Returns
Type Description
QAResult.Highlight.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public QAResult.Highlight.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QAResult.Highlight.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public QAResult.Highlight.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
QAResult.Highlight.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final QAResult.Highlight.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QAResult.Highlight.Builder
Overrides

setEndIndex(int value)

public QAResult.Highlight.Builder setEndIndex(int value)

End index of the highlight, exclusive.

int32 end_index = 2;

Parameter
Name Description
value int

The endIndex to set.

Returns
Type Description
QAResult.Highlight.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public QAResult.Highlight.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
QAResult.Highlight.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public QAResult.Highlight.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
QAResult.Highlight.Builder
Overrides

setStartIndex(int value)

public QAResult.Highlight.Builder setStartIndex(int value)

Start index of the highlight.

int32 start_index = 1;

Parameter
Name Description
value int

The startIndex to set.

Returns
Type Description
QAResult.Highlight.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final QAResult.Highlight.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QAResult.Highlight.Builder
Overrides