Class SearchResponse.OneBoxResult.Builder (0.48.0)

public static final class SearchResponse.OneBoxResult.Builder extends GeneratedMessageV3.Builder<SearchResponse.OneBoxResult.Builder> implements SearchResponse.OneBoxResultOrBuilder

OneBoxResult is a holder for all results of specific type that we want to display in UI differently.

Protobuf type google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult

Static Methods

getDescriptor()

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

Methods

addAllSearchResults(Iterable<? extends SearchResponse.SearchResult> values)

public SearchResponse.OneBoxResult.Builder addAllSearchResults(Iterable<? extends SearchResponse.SearchResult> values)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult>
Returns
Type Description
SearchResponse.OneBoxResult.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSearchResults(SearchResponse.SearchResult value)

public SearchResponse.OneBoxResult.Builder addSearchResults(SearchResponse.SearchResult value)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
value SearchResponse.SearchResult
Returns
Type Description
SearchResponse.OneBoxResult.Builder

addSearchResults(SearchResponse.SearchResult.Builder builderForValue)

public SearchResponse.OneBoxResult.Builder addSearchResults(SearchResponse.SearchResult.Builder builderForValue)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
builderForValue SearchResponse.SearchResult.Builder
Returns
Type Description
SearchResponse.OneBoxResult.Builder

addSearchResults(int index, SearchResponse.SearchResult value)

public SearchResponse.OneBoxResult.Builder addSearchResults(int index, SearchResponse.SearchResult value)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameters
Name Description
index int
value SearchResponse.SearchResult
Returns
Type Description
SearchResponse.OneBoxResult.Builder

addSearchResults(int index, SearchResponse.SearchResult.Builder builderForValue)

public SearchResponse.OneBoxResult.Builder addSearchResults(int index, SearchResponse.SearchResult.Builder builderForValue)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameters
Name Description
index int
builderForValue SearchResponse.SearchResult.Builder
Returns
Type Description
SearchResponse.OneBoxResult.Builder

addSearchResultsBuilder()

public SearchResponse.SearchResult.Builder addSearchResultsBuilder()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
SearchResponse.SearchResult.Builder

addSearchResultsBuilder(int index)

public SearchResponse.SearchResult.Builder addSearchResultsBuilder(int index)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.SearchResult.Builder

build()

public SearchResponse.OneBoxResult build()
Returns
Type Description
SearchResponse.OneBoxResult

buildPartial()

public SearchResponse.OneBoxResult buildPartial()
Returns
Type Description
SearchResponse.OneBoxResult

clear()

public SearchResponse.OneBoxResult.Builder clear()
Returns
Type Description
SearchResponse.OneBoxResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearOneBoxType()

public SearchResponse.OneBoxResult.Builder clearOneBoxType()

The type of One Box result.

.google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult.OneBoxType one_box_type = 1;

Returns
Type Description
SearchResponse.OneBoxResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSearchResults()

public SearchResponse.OneBoxResult.Builder clearSearchResults()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
SearchResponse.OneBoxResult.Builder

clone()

public SearchResponse.OneBoxResult.Builder clone()
Returns
Type Description
SearchResponse.OneBoxResult.Builder
Overrides

getDefaultInstanceForType()

public SearchResponse.OneBoxResult getDefaultInstanceForType()
Returns
Type Description
SearchResponse.OneBoxResult

getDescriptorForType()

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

getOneBoxType()

public SearchResponse.OneBoxResult.OneBoxType getOneBoxType()

The type of One Box result.

.google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult.OneBoxType one_box_type = 1;

Returns
Type Description
SearchResponse.OneBoxResult.OneBoxType

The oneBoxType.

getOneBoxTypeValue()

public int getOneBoxTypeValue()

The type of One Box result.

.google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult.OneBoxType one_box_type = 1;

Returns
Type Description
int

The enum numeric value on the wire for oneBoxType.

getSearchResults(int index)

public SearchResponse.SearchResult getSearchResults(int index)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.SearchResult

getSearchResultsBuilder(int index)

public SearchResponse.SearchResult.Builder getSearchResultsBuilder(int index)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.SearchResult.Builder

getSearchResultsBuilderList()

public List<SearchResponse.SearchResult.Builder> getSearchResultsBuilderList()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
List<Builder>

getSearchResultsCount()

public int getSearchResultsCount()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
int

getSearchResultsList()

public List<SearchResponse.SearchResult> getSearchResultsList()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
List<SearchResult>

getSearchResultsOrBuilder(int index)

public SearchResponse.SearchResultOrBuilder getSearchResultsOrBuilder(int index)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.SearchResultOrBuilder

getSearchResultsOrBuilderList()

public List<? extends SearchResponse.SearchResultOrBuilder> getSearchResultsOrBuilderList()

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchResponse.OneBoxResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeSearchResults(int index)

public SearchResponse.OneBoxResult.Builder removeSearchResults(int index)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.OneBoxResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setOneBoxType(SearchResponse.OneBoxResult.OneBoxType value)

public SearchResponse.OneBoxResult.Builder setOneBoxType(SearchResponse.OneBoxResult.OneBoxType value)

The type of One Box result.

.google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult.OneBoxType one_box_type = 1;

Parameter
Name Description
value SearchResponse.OneBoxResult.OneBoxType

The oneBoxType to set.

Returns
Type Description
SearchResponse.OneBoxResult.Builder

This builder for chaining.

setOneBoxTypeValue(int value)

public SearchResponse.OneBoxResult.Builder setOneBoxTypeValue(int value)

The type of One Box result.

.google.cloud.discoveryengine.v1alpha.SearchResponse.OneBoxResult.OneBoxType one_box_type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for oneBoxType to set.

Returns
Type Description
SearchResponse.OneBoxResult.Builder

This builder for chaining.

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

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

setSearchResults(int index, SearchResponse.SearchResult value)

public SearchResponse.OneBoxResult.Builder setSearchResults(int index, SearchResponse.SearchResult value)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameters
Name Description
index int
value SearchResponse.SearchResult
Returns
Type Description
SearchResponse.OneBoxResult.Builder

setSearchResults(int index, SearchResponse.SearchResult.Builder builderForValue)

public SearchResponse.OneBoxResult.Builder setSearchResults(int index, SearchResponse.SearchResult.Builder builderForValue)

The search results for this One Box.

repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 2;

Parameters
Name Description
index int
builderForValue SearchResponse.SearchResult.Builder
Returns
Type Description
SearchResponse.OneBoxResult.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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