Class QAResult.Highlight.Builder (0.79.0)

public static final class QAResult.Highlight.Builder extends GeneratedMessage.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

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.

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.

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 GeneratedMessage.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

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.

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.