Class QAResult.Builder (0.47.0)

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

Additional result info for the question-answering feature.

Protobuf type google.cloud.contentwarehouse.v1.QAResult

Implements

QAResultOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllHighlights(Iterable<? extends QAResult.Highlight> values)

public QAResult.Builder addAllHighlights(Iterable<? extends QAResult.Highlight> values)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.contentwarehouse.v1.QAResult.Highlight>
Returns
Type Description
QAResult.Builder

addHighlights(QAResult.Highlight value)

public QAResult.Builder addHighlights(QAResult.Highlight value)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
value QAResult.Highlight
Returns
Type Description
QAResult.Builder

addHighlights(QAResult.Highlight.Builder builderForValue)

public QAResult.Builder addHighlights(QAResult.Highlight.Builder builderForValue)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
builderForValue QAResult.Highlight.Builder
Returns
Type Description
QAResult.Builder

addHighlights(int index, QAResult.Highlight value)

public QAResult.Builder addHighlights(int index, QAResult.Highlight value)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameters
Name Description
index int
value QAResult.Highlight
Returns
Type Description
QAResult.Builder

addHighlights(int index, QAResult.Highlight.Builder builderForValue)

public QAResult.Builder addHighlights(int index, QAResult.Highlight.Builder builderForValue)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameters
Name Description
index int
builderForValue QAResult.Highlight.Builder
Returns
Type Description
QAResult.Builder

addHighlightsBuilder()

public QAResult.Highlight.Builder addHighlightsBuilder()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
QAResult.Highlight.Builder

addHighlightsBuilder(int index)

public QAResult.Highlight.Builder addHighlightsBuilder(int index)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
index int
Returns
Type Description
QAResult.Highlight.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public QAResult build()
Returns
Type Description
QAResult

buildPartial()

public QAResult buildPartial()
Returns
Type Description
QAResult

clear()

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

clearConfidenceScore()

public QAResult.Builder clearConfidenceScore()

The calibrated confidence score for this document, in the range [0., 1.]. This represents the confidence level for whether the returned document and snippet answers the user's query.

float confidence_score = 2;

Returns
Type Description
QAResult.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHighlights()

public QAResult.Builder clearHighlights()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
QAResult.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getConfidenceScore()

public float getConfidenceScore()

The calibrated confidence score for this document, in the range [0., 1.]. This represents the confidence level for whether the returned document and snippet answers the user's query.

float confidence_score = 2;

Returns
Type Description
float

The confidenceScore.

getDefaultInstanceForType()

public QAResult getDefaultInstanceForType()
Returns
Type Description
QAResult

getDescriptorForType()

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

getHighlights(int index)

public QAResult.Highlight getHighlights(int index)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
index int
Returns
Type Description
QAResult.Highlight

getHighlightsBuilder(int index)

public QAResult.Highlight.Builder getHighlightsBuilder(int index)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
index int
Returns
Type Description
QAResult.Highlight.Builder

getHighlightsBuilderList()

public List<QAResult.Highlight.Builder> getHighlightsBuilderList()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
List<Builder>

getHighlightsCount()

public int getHighlightsCount()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
int

getHighlightsList()

public List<QAResult.Highlight> getHighlightsList()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
List<Highlight>

getHighlightsOrBuilder(int index)

public QAResult.HighlightOrBuilder getHighlightsOrBuilder(int index)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
index int
Returns
Type Description
QAResult.HighlightOrBuilder

getHighlightsOrBuilderList()

public List<? extends QAResult.HighlightOrBuilder> getHighlightsOrBuilderList()

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Returns
Type Description
List<? extends com.google.cloud.contentwarehouse.v1.QAResult.HighlightOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(QAResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeHighlights(int index)

public QAResult.Builder removeHighlights(int index)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameter
Name Description
index int
Returns
Type Description
QAResult.Builder

setConfidenceScore(float value)

public QAResult.Builder setConfidenceScore(float value)

The calibrated confidence score for this document, in the range [0., 1.]. This represents the confidence level for whether the returned document and snippet answers the user's query.

float confidence_score = 2;

Parameter
Name Description
value float

The confidenceScore to set.

Returns
Type Description
QAResult.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setHighlights(int index, QAResult.Highlight value)

public QAResult.Builder setHighlights(int index, QAResult.Highlight value)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameters
Name Description
index int
value QAResult.Highlight
Returns
Type Description
QAResult.Builder

setHighlights(int index, QAResult.Highlight.Builder builderForValue)

public QAResult.Builder setHighlights(int index, QAResult.Highlight.Builder builderForValue)

Highlighted sections in the snippet.

repeated .google.cloud.contentwarehouse.v1.QAResult.Highlight highlights = 1;

Parameters
Name Description
index int
builderForValue QAResult.Highlight.Builder
Returns
Type Description
QAResult.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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