Class SearchResponse.Facet.Builder (2.45.0)

public static final class SearchResponse.Facet.Builder extends GeneratedMessageV3.Builder<SearchResponse.Facet.Builder> implements SearchResponse.FacetOrBuilder

A facet result.

Protobuf type google.cloud.retail.v2alpha.SearchResponse.Facet

Static Methods

getDescriptor()

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

Methods

addAllValues(Iterable<? extends SearchResponse.Facet.FacetValue> values)

public SearchResponse.Facet.Builder addAllValues(Iterable<? extends SearchResponse.Facet.FacetValue> values)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue>
Returns
Type Description
SearchResponse.Facet.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addValues(SearchResponse.Facet.FacetValue value)

public SearchResponse.Facet.Builder addValues(SearchResponse.Facet.FacetValue value)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
value SearchResponse.Facet.FacetValue
Returns
Type Description
SearchResponse.Facet.Builder

addValues(SearchResponse.Facet.FacetValue.Builder builderForValue)

public SearchResponse.Facet.Builder addValues(SearchResponse.Facet.FacetValue.Builder builderForValue)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
builderForValue SearchResponse.Facet.FacetValue.Builder
Returns
Type Description
SearchResponse.Facet.Builder

addValues(int index, SearchResponse.Facet.FacetValue value)

public SearchResponse.Facet.Builder addValues(int index, SearchResponse.Facet.FacetValue value)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameters
Name Description
index int
value SearchResponse.Facet.FacetValue
Returns
Type Description
SearchResponse.Facet.Builder

addValues(int index, SearchResponse.Facet.FacetValue.Builder builderForValue)

public SearchResponse.Facet.Builder addValues(int index, SearchResponse.Facet.FacetValue.Builder builderForValue)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameters
Name Description
index int
builderForValue SearchResponse.Facet.FacetValue.Builder
Returns
Type Description
SearchResponse.Facet.Builder

addValuesBuilder()

public SearchResponse.Facet.FacetValue.Builder addValuesBuilder()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
SearchResponse.Facet.FacetValue.Builder

addValuesBuilder(int index)

public SearchResponse.Facet.FacetValue.Builder addValuesBuilder(int index)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.Facet.FacetValue.Builder

build()

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

buildPartial()

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

clear()

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

clearDynamicFacet()

public SearchResponse.Facet.Builder clearDynamicFacet()

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Returns
Type Description
SearchResponse.Facet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearKey()

public SearchResponse.Facet.Builder clearKey()

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".

string key = 1;

Returns
Type Description
SearchResponse.Facet.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearValues()

public SearchResponse.Facet.Builder clearValues()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
SearchResponse.Facet.Builder

clone()

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

getDefaultInstanceForType()

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

getDescriptorForType()

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

getDynamicFacet()

public boolean getDynamicFacet()

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Returns
Type Description
boolean

The dynamicFacet.

getKey()

public String getKey()

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".

string key = 1;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".

string key = 1;

Returns
Type Description
ByteString

The bytes for key.

getValues(int index)

public SearchResponse.Facet.FacetValue getValues(int index)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.Facet.FacetValue

getValuesBuilder(int index)

public SearchResponse.Facet.FacetValue.Builder getValuesBuilder(int index)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.Facet.FacetValue.Builder

getValuesBuilderList()

public List<SearchResponse.Facet.FacetValue.Builder> getValuesBuilderList()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
List<Builder>

getValuesCount()

public int getValuesCount()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
int

getValuesList()

public List<SearchResponse.Facet.FacetValue> getValuesList()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
List<FacetValue>

getValuesOrBuilder(int index)

public SearchResponse.Facet.FacetValueOrBuilder getValuesOrBuilder(int index)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameter
Name Description
index int
Returns
Type Description
SearchResponse.Facet.FacetValueOrBuilder

getValuesOrBuilderList()

public List<? extends SearchResponse.Facet.FacetValueOrBuilder> getValuesOrBuilderList()

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Returns
Type Description
List<? extends com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValueOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchResponse.Facet other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeValues(int index)

public SearchResponse.Facet.Builder removeValues(int index)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

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

setDynamicFacet(boolean value)

public SearchResponse.Facet.Builder setDynamicFacet(boolean value)

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Parameter
Name Description
value boolean

The dynamicFacet to set.

Returns
Type Description
SearchResponse.Facet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setKey(String value)

public SearchResponse.Facet.Builder setKey(String value)

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".

string key = 1;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
SearchResponse.Facet.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public SearchResponse.Facet.Builder setKeyBytes(ByteString value)

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".

string key = 1;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
SearchResponse.Facet.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setValues(int index, SearchResponse.Facet.FacetValue value)

public SearchResponse.Facet.Builder setValues(int index, SearchResponse.Facet.FacetValue value)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameters
Name Description
index int
value SearchResponse.Facet.FacetValue
Returns
Type Description
SearchResponse.Facet.Builder

setValues(int index, SearchResponse.Facet.FacetValue.Builder builderForValue)

public SearchResponse.Facet.Builder setValues(int index, SearchResponse.Facet.FacetValue.Builder builderForValue)

The facet values for this field.

repeated .google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue values = 2;

Parameters
Name Description
index int
builderForValue SearchResponse.Facet.FacetValue.Builder
Returns
Type Description
SearchResponse.Facet.Builder