Class SearchResponse.GuidedSearchResult.Builder (0.31.0)

public static final class SearchResponse.GuidedSearchResult.Builder extends GeneratedMessageV3.Builder<SearchResponse.GuidedSearchResult.Builder> implements SearchResponse.GuidedSearchResultOrBuilder

Guided search result. The guided search helps user to refine the search results and narrow down to the real needs from a broaded search results.

Protobuf type google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult

Static Methods

getDescriptor()

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

Methods

addAllFollowUpQuestions(Iterable<String> values)

public SearchResponse.GuidedSearchResult.Builder addAllFollowUpQuestions(Iterable<String> values)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameter
NameDescription
valuesIterable<String>

The followUpQuestions to add.

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

This builder for chaining.

addAllRefinementAttributes(Iterable<? extends SearchResponse.GuidedSearchResult.RefinementAttribute> values)

public SearchResponse.GuidedSearchResult.Builder addAllRefinementAttributes(Iterable<? extends SearchResponse.GuidedSearchResult.RefinementAttribute> values)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute>
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

addFollowUpQuestions(String value)

public SearchResponse.GuidedSearchResult.Builder addFollowUpQuestions(String value)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameter
NameDescription
valueString

The followUpQuestions to add.

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

This builder for chaining.

addFollowUpQuestionsBytes(ByteString value)

public SearchResponse.GuidedSearchResult.Builder addFollowUpQuestionsBytes(ByteString value)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameter
NameDescription
valueByteString

The bytes of the followUpQuestions to add.

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

This builder for chaining.

addRefinementAttributes(SearchResponse.GuidedSearchResult.RefinementAttribute value)

public SearchResponse.GuidedSearchResult.Builder addRefinementAttributes(SearchResponse.GuidedSearchResult.RefinementAttribute value)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
valueSearchResponse.GuidedSearchResult.RefinementAttribute
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

addRefinementAttributes(SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

public SearchResponse.GuidedSearchResult.Builder addRefinementAttributes(SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
builderForValueSearchResponse.GuidedSearchResult.RefinementAttribute.Builder
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

addRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute value)

public SearchResponse.GuidedSearchResult.Builder addRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute value)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameters
NameDescription
indexint
valueSearchResponse.GuidedSearchResult.RefinementAttribute
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

addRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

public SearchResponse.GuidedSearchResult.Builder addRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameters
NameDescription
indexint
builderForValueSearchResponse.GuidedSearchResult.RefinementAttribute.Builder
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

addRefinementAttributesBuilder()

public SearchResponse.GuidedSearchResult.RefinementAttribute.Builder addRefinementAttributesBuilder()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
SearchResponse.GuidedSearchResult.RefinementAttribute.Builder

addRefinementAttributesBuilder(int index)

public SearchResponse.GuidedSearchResult.RefinementAttribute.Builder addRefinementAttributesBuilder(int index)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SearchResponse.GuidedSearchResult.RefinementAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SearchResponse.GuidedSearchResult build()
Returns
TypeDescription
SearchResponse.GuidedSearchResult

buildPartial()

public SearchResponse.GuidedSearchResult buildPartial()
Returns
TypeDescription
SearchResponse.GuidedSearchResult

clear()

public SearchResponse.GuidedSearchResult.Builder clear()
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearFollowUpQuestions()

public SearchResponse.GuidedSearchResult.Builder clearFollowUpQuestions()

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRefinementAttributes()

public SearchResponse.GuidedSearchResult.Builder clearRefinementAttributes()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

clone()

public SearchResponse.GuidedSearchResult.Builder clone()
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder
Overrides

getDefaultInstanceForType()

public SearchResponse.GuidedSearchResult getDefaultInstanceForType()
Returns
TypeDescription
SearchResponse.GuidedSearchResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFollowUpQuestions(int index)

public String getFollowUpQuestions(int index)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The followUpQuestions at the given index.

getFollowUpQuestionsBytes(int index)

public ByteString getFollowUpQuestionsBytes(int index)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the followUpQuestions at the given index.

getFollowUpQuestionsCount()

public int getFollowUpQuestionsCount()

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Returns
TypeDescription
int

The count of followUpQuestions.

getFollowUpQuestionsList()

public ProtocolStringList getFollowUpQuestionsList()

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the followUpQuestions.

getRefinementAttributes(int index)

public SearchResponse.GuidedSearchResult.RefinementAttribute getRefinementAttributes(int index)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SearchResponse.GuidedSearchResult.RefinementAttribute

getRefinementAttributesBuilder(int index)

public SearchResponse.GuidedSearchResult.RefinementAttribute.Builder getRefinementAttributesBuilder(int index)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SearchResponse.GuidedSearchResult.RefinementAttribute.Builder

getRefinementAttributesBuilderList()

public List<SearchResponse.GuidedSearchResult.RefinementAttribute.Builder> getRefinementAttributesBuilderList()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
List<Builder>

getRefinementAttributesCount()

public int getRefinementAttributesCount()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
int

getRefinementAttributesList()

public List<SearchResponse.GuidedSearchResult.RefinementAttribute> getRefinementAttributesList()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
List<RefinementAttribute>

getRefinementAttributesOrBuilder(int index)

public SearchResponse.GuidedSearchResult.RefinementAttributeOrBuilder getRefinementAttributesOrBuilder(int index)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SearchResponse.GuidedSearchResult.RefinementAttributeOrBuilder

getRefinementAttributesOrBuilderList()

public List<? extends SearchResponse.GuidedSearchResult.RefinementAttributeOrBuilder> getRefinementAttributesOrBuilderList()

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Returns
TypeDescription
List<? extends com.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttributeOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SearchResponse.GuidedSearchResult other)

public SearchResponse.GuidedSearchResult.Builder mergeFrom(SearchResponse.GuidedSearchResult other)
Parameter
NameDescription
otherSearchResponse.GuidedSearchResult
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.GuidedSearchResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder
Overrides

removeRefinementAttributes(int index)

public SearchResponse.GuidedSearchResult.Builder removeRefinementAttributes(int index)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFollowUpQuestions(int index, String value)

public SearchResponse.GuidedSearchResult.Builder setFollowUpQuestions(int index, String value)

Suggested follow-up questions.

repeated string follow_up_questions = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The followUpQuestions to set.

Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

This builder for chaining.

setRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute value)

public SearchResponse.GuidedSearchResult.Builder setRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute value)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameters
NameDescription
indexint
valueSearchResponse.GuidedSearchResult.RefinementAttribute
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

setRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

public SearchResponse.GuidedSearchResult.Builder setRefinementAttributes(int index, SearchResponse.GuidedSearchResult.RefinementAttribute.Builder builderForValue)

A list of ranked refinement attributes.

repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1;

Parameters
NameDescription
indexint
builderForValueSearchResponse.GuidedSearchResult.RefinementAttribute.Builder
Returns
TypeDescription
SearchResponse.GuidedSearchResult.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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