Class QAResult.Builder (0.29.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.contentwarehouse.v1.QAResult.Highlight>
Returns
TypeDescription
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
NameDescription
valueQAResult.Highlight
Returns
TypeDescription
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
NameDescription
builderForValueQAResult.Highlight.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueQAResult.Highlight
Returns
TypeDescription
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
NameDescription
indexint
builderForValueQAResult.Highlight.Builder
Returns
TypeDescription
QAResult.Builder

addHighlightsBuilder()

public QAResult.Highlight.Builder addHighlightsBuilder()

Highlighted sections in the snippet.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
QAResult.Highlight.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public QAResult build()
Returns
TypeDescription
QAResult

buildPartial()

public QAResult buildPartial()
Returns
TypeDescription
QAResult

clear()

public QAResult.Builder clear()
Returns
TypeDescription
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
TypeDescription
QAResult.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHighlights()

public QAResult.Builder clearHighlights()

Highlighted sections in the snippet.

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

Returns
TypeDescription
QAResult.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public QAResult.Builder clone()
Returns
TypeDescription
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
TypeDescription
float

The confidenceScore.

getDefaultInstanceForType()

public QAResult getDefaultInstanceForType()
Returns
TypeDescription
QAResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<Builder>

getHighlightsCount()

public int getHighlightsCount()

Highlighted sections in the snippet.

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

Returns
TypeDescription
int

getHighlightsList()

public List<QAResult.Highlight> getHighlightsList()

Highlighted sections in the snippet.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
QAResult.HighlightOrBuilder

getHighlightsOrBuilderList()

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

Highlighted sections in the snippet.

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

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(QAResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The confidenceScore to set.

Returns
TypeDescription
QAResult.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public QAResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
QAResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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