Class SearchResponse.Facet.Builder (2.5.1)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue>
Returns
TypeDescription
SearchResponse.Facet.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.Facet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueSearchResponse.Facet.FacetValue
Returns
TypeDescription
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
NameDescription
builderForValueSearchResponse.Facet.FacetValue.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSearchResponse.Facet.FacetValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSearchResponse.Facet.FacetValue.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SearchResponse.Facet.FacetValue.Builder

build()

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

buildPartial()

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

clear()

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

clearDynamicFacet()

public SearchResponse.Facet.Builder clearDynamicFacet()

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Returns
TypeDescription
SearchResponse.Facet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SearchResponse.Facet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
SearchResponse.Facet.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchResponse.Facet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
SearchResponse.Facet.Builder

clone()

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

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDynamicFacet()

public boolean getDynamicFacet()

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Returns
TypeDescription
boolean

The dynamicFacet.

getKey()

public String getKey()

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

string key = 1;

Returns
TypeDescription
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

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

string key = 1;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<Builder>

getValuesCount()

public int getValuesCount()

The facet values for this field.

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValueOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SearchResponse.Facet other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.Facet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SearchResponse.Facet.Builder

setDynamicFacet(boolean value)

public SearchResponse.Facet.Builder setDynamicFacet(boolean value)

Whether the facet is dynamically generated.

bool dynamic_facet = 3;

Parameter
NameDescription
valueboolean

The dynamicFacet to set.

Returns
TypeDescription
SearchResponse.Facet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.Facet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The key to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for key to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SearchResponse.Facet.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.Facet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valueSearchResponse.Facet.FacetValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSearchResponse.Facet.FacetValue.Builder
Returns
TypeDescription
SearchResponse.Facet.Builder