Class SearchDocumentsResponse.MatchingDocument.Builder (0.18.0)

public static final class SearchDocumentsResponse.MatchingDocument.Builder extends GeneratedMessageV3.Builder<SearchDocumentsResponse.MatchingDocument.Builder> implements SearchDocumentsResponse.MatchingDocumentOrBuilder

Document entry with metadata inside SearchDocumentsResponse

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse.MatchingDocument

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SearchDocumentsResponse.MatchingDocument build()
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument

buildPartial()

public SearchDocumentsResponse.MatchingDocument buildPartial()
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument

clear()

public SearchDocumentsResponse.MatchingDocument.Builder clear()
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

clearDocument()

public SearchDocumentsResponse.MatchingDocument.Builder clearDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQaResult()

public SearchDocumentsResponse.MatchingDocument.Builder clearQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

clearSearchTextSnippet()

public SearchDocumentsResponse.MatchingDocument.Builder clearSearchTextSnippet()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

clone()

public SearchDocumentsResponse.MatchingDocument.Builder clone()
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

getDefaultInstanceForType()

public SearchDocumentsResponse.MatchingDocument getDefaultInstanceForType()
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocument()

public Document getDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
TypeDescription
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
TypeDescription
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
TypeDescription
DocumentOrBuilder

getQaResult()

public QAResult getQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
TypeDescription
QAResult

The qaResult.

getQaResultBuilder()

public QAResult.Builder getQaResultBuilder()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
TypeDescription
QAResult.Builder

getQaResultOrBuilder()

public QAResultOrBuilder getQaResultOrBuilder()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
TypeDescription
QAResultOrBuilder

getSearchTextSnippet()

public String getSearchTextSnippet()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
TypeDescription
String

The searchTextSnippet.

getSearchTextSnippetBytes()

public ByteString getSearchTextSnippetBytes()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
TypeDescription
ByteString

The bytes for searchTextSnippet.

hasDocument()

public boolean hasDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
TypeDescription
boolean

Whether the document field is set.

hasQaResult()

public boolean hasQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
TypeDescription
boolean

Whether the qaResult field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDocument(Document value)

public SearchDocumentsResponse.MatchingDocument.Builder mergeDocument(Document value)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

mergeFrom(SearchDocumentsResponse.MatchingDocument other)

public SearchDocumentsResponse.MatchingDocument.Builder mergeFrom(SearchDocumentsResponse.MatchingDocument other)
Parameter
NameDescription
otherSearchDocumentsResponse.MatchingDocument
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeQaResult(QAResult value)

public SearchDocumentsResponse.MatchingDocument.Builder mergeQaResult(QAResult value)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
NameDescription
valueQAResult
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchDocumentsResponse.MatchingDocument.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

setDocument(Document value)

public SearchDocumentsResponse.MatchingDocument.Builder setDocument(Document value)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

setDocument(Document.Builder builderForValue)

public SearchDocumentsResponse.MatchingDocument.Builder setDocument(Document.Builder builderForValue)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SearchDocumentsResponse.MatchingDocument.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

setQaResult(QAResult value)

public SearchDocumentsResponse.MatchingDocument.Builder setQaResult(QAResult value)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
NameDescription
valueQAResult
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

setQaResult(QAResult.Builder builderForValue)

public SearchDocumentsResponse.MatchingDocument.Builder setQaResult(QAResult.Builder builderForValue)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
NameDescription
builderForValueQAResult.Builder
Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

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

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

setSearchTextSnippet(String value)

public SearchDocumentsResponse.MatchingDocument.Builder setSearchTextSnippet(String value)

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Parameter
NameDescription
valueString

The searchTextSnippet to set.

Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

setSearchTextSnippetBytes(ByteString value)

public SearchDocumentsResponse.MatchingDocument.Builder setSearchTextSnippetBytes(ByteString value)

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Parameter
NameDescription
valueByteString

The bytes for searchTextSnippet to set.

Returns
TypeDescription
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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