Class QAResult (0.19.0)

public final class QAResult extends GeneratedMessageV3 implements QAResultOrBuilder

Additional result info for the question-answering feature.

Protobuf type google.cloud.contentwarehouse.v1.QAResult

Implements

QAResultOrBuilder

Static Fields

CONFIDENCE_SCORE_FIELD_NUMBER

public static final int CONFIDENCE_SCORE_FIELD_NUMBER
Field Value
TypeDescription
int

HIGHLIGHTS_FIELD_NUMBER

public static final int HIGHLIGHTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static QAResult getDefaultInstance()
Returns
TypeDescription
QAResult

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static QAResult.Builder newBuilder()
Returns
TypeDescription
QAResult.Builder

newBuilder(QAResult prototype)

public static QAResult.Builder newBuilder(QAResult prototype)
Parameter
NameDescription
prototypeQAResult
Returns
TypeDescription
QAResult.Builder

parseDelimitedFrom(InputStream input)

public static QAResult parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static QAResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static QAResult parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static QAResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static QAResult parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static QAResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static QAResult parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static QAResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static QAResult parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static QAResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static QAResult parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static QAResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
QAResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<QAResult> parser()
Returns
TypeDescription
Parser<QAResult>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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

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>

getParserForType()

public Parser<QAResult> getParserForType()
Returns
TypeDescription
Parser<QAResult>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public QAResult.Builder newBuilderForType()
Returns
TypeDescription
QAResult.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected QAResult.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
QAResult.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public QAResult.Builder toBuilder()
Returns
TypeDescription
QAResult.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException