Class CompleteQueryResponse.Builder (0.42.0)

public static final class CompleteQueryResponse.Builder extends GeneratedMessageV3.Builder<CompleteQueryResponse.Builder> implements CompleteQueryResponseOrBuilder

Response message for CompletionService.CompleteQuery method.

Protobuf type google.cloud.discoveryengine.v1beta.CompleteQueryResponse

Static Methods

getDescriptor()

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

Methods

addAllQuerySuggestions(Iterable<? extends CompleteQueryResponse.QuerySuggestion> values)

public CompleteQueryResponse.Builder addAllQuerySuggestions(Iterable<? extends CompleteQueryResponse.QuerySuggestion> values)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion>
Returns
Type Description
CompleteQueryResponse.Builder

addQuerySuggestions(CompleteQueryResponse.QuerySuggestion value)

public CompleteQueryResponse.Builder addQuerySuggestions(CompleteQueryResponse.QuerySuggestion value)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
value CompleteQueryResponse.QuerySuggestion
Returns
Type Description
CompleteQueryResponse.Builder

addQuerySuggestions(CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

public CompleteQueryResponse.Builder addQuerySuggestions(CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
builderForValue CompleteQueryResponse.QuerySuggestion.Builder
Returns
Type Description
CompleteQueryResponse.Builder

addQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion value)

public CompleteQueryResponse.Builder addQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion value)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameters
Name Description
index int
value CompleteQueryResponse.QuerySuggestion
Returns
Type Description
CompleteQueryResponse.Builder

addQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

public CompleteQueryResponse.Builder addQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameters
Name Description
index int
builderForValue CompleteQueryResponse.QuerySuggestion.Builder
Returns
Type Description
CompleteQueryResponse.Builder

addQuerySuggestionsBuilder()

public CompleteQueryResponse.QuerySuggestion.Builder addQuerySuggestionsBuilder()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
CompleteQueryResponse.QuerySuggestion.Builder

addQuerySuggestionsBuilder(int index)

public CompleteQueryResponse.QuerySuggestion.Builder addQuerySuggestionsBuilder(int index)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
index int
Returns
Type Description
CompleteQueryResponse.QuerySuggestion.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CompleteQueryResponse build()
Returns
Type Description
CompleteQueryResponse

buildPartial()

public CompleteQueryResponse buildPartial()
Returns
Type Description
CompleteQueryResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQuerySuggestions()

public CompleteQueryResponse.Builder clearQuerySuggestions()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
CompleteQueryResponse.Builder

clearTailMatchTriggered()

public CompleteQueryResponse.Builder clearTailMatchTriggered()

True if the returned suggestions are all tail suggestions.

For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.

bool tail_match_triggered = 2;

Returns
Type Description
CompleteQueryResponse.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CompleteQueryResponse getDefaultInstanceForType()
Returns
Type Description
CompleteQueryResponse

getDescriptorForType()

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

getQuerySuggestions(int index)

public CompleteQueryResponse.QuerySuggestion getQuerySuggestions(int index)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
index int
Returns
Type Description
CompleteQueryResponse.QuerySuggestion

getQuerySuggestionsBuilder(int index)

public CompleteQueryResponse.QuerySuggestion.Builder getQuerySuggestionsBuilder(int index)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
index int
Returns
Type Description
CompleteQueryResponse.QuerySuggestion.Builder

getQuerySuggestionsBuilderList()

public List<CompleteQueryResponse.QuerySuggestion.Builder> getQuerySuggestionsBuilderList()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
List<Builder>

getQuerySuggestionsCount()

public int getQuerySuggestionsCount()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
int

getQuerySuggestionsList()

public List<CompleteQueryResponse.QuerySuggestion> getQuerySuggestionsList()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
List<QuerySuggestion>

getQuerySuggestionsOrBuilder(int index)

public CompleteQueryResponse.QuerySuggestionOrBuilder getQuerySuggestionsOrBuilder(int index)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
index int
Returns
Type Description
CompleteQueryResponse.QuerySuggestionOrBuilder

getQuerySuggestionsOrBuilderList()

public List<? extends CompleteQueryResponse.QuerySuggestionOrBuilder> getQuerySuggestionsOrBuilderList()

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestionOrBuilder>

getTailMatchTriggered()

public boolean getTailMatchTriggered()

True if the returned suggestions are all tail suggestions.

For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.

bool tail_match_triggered = 2;

Returns
Type Description
boolean

The tailMatchTriggered.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CompleteQueryResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeQuerySuggestions(int index)

public CompleteQueryResponse.Builder removeQuerySuggestions(int index)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameter
Name Description
index int
Returns
Type Description
CompleteQueryResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion value)

public CompleteQueryResponse.Builder setQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion value)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameters
Name Description
index int
value CompleteQueryResponse.QuerySuggestion
Returns
Type Description
CompleteQueryResponse.Builder

setQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

public CompleteQueryResponse.Builder setQuerySuggestions(int index, CompleteQueryResponse.QuerySuggestion.Builder builderForValue)

Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.

repeated .google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion query_suggestions = 1;

Parameters
Name Description
index int
builderForValue CompleteQueryResponse.QuerySuggestion.Builder
Returns
Type Description
CompleteQueryResponse.Builder

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

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

setTailMatchTriggered(boolean value)

public CompleteQueryResponse.Builder setTailMatchTriggered(boolean value)

True if the returned suggestions are all tail suggestions.

For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.

bool tail_match_triggered = 2;

Parameter
Name Description
value boolean

The tailMatchTriggered to set.

Returns
Type Description
CompleteQueryResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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