Class QAResult.Highlight.Builder (0.17.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public QAResult.Highlight.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

build()

public QAResult.Highlight build()
Returns
TypeDescription
QAResult.Highlight

buildPartial()

public QAResult.Highlight buildPartial()
Returns
TypeDescription
QAResult.Highlight

clear()

public QAResult.Highlight.Builder clear()
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

clearEndIndex()

public QAResult.Highlight.Builder clearEndIndex()

End index of the highlight, exclusive.

int32 end_index = 2;

Returns
TypeDescription
QAResult.Highlight.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public QAResult.Highlight.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public QAResult.Highlight.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

clearStartIndex()

public QAResult.Highlight.Builder clearStartIndex()

Start index of the highlight.

int32 start_index = 1;

Returns
TypeDescription
QAResult.Highlight.Builder

This builder for chaining.

clone()

public QAResult.Highlight.Builder clone()
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

getDefaultInstanceForType()

public QAResult.Highlight getDefaultInstanceForType()
Returns
TypeDescription
QAResult.Highlight

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEndIndex()

public int getEndIndex()

End index of the highlight, exclusive.

int32 end_index = 2;

Returns
TypeDescription
int

The endIndex.

getStartIndex()

public int getStartIndex()

Start index of the highlight.

int32 start_index = 1;

Returns
TypeDescription
int

The startIndex.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(QAResult.Highlight other)

public QAResult.Highlight.Builder mergeFrom(QAResult.Highlight other)
Parameter
NameDescription
otherQAResult.Highlight
Returns
TypeDescription
QAResult.Highlight.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public QAResult.Highlight.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public QAResult.Highlight.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final QAResult.Highlight.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The endIndex to set.

Returns
TypeDescription
QAResult.Highlight.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public QAResult.Highlight.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides

setStartIndex(int value)

public QAResult.Highlight.Builder setStartIndex(int value)

Start index of the highlight.

int32 start_index = 1;

Parameter
NameDescription
valueint

The startIndex to set.

Returns
TypeDescription
QAResult.Highlight.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final QAResult.Highlight.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
QAResult.Highlight.Builder
Overrides