Class Rule.RemoveFacetAction.Builder (2.48.0)

public static final class Rule.RemoveFacetAction.Builder extends GeneratedMessageV3.Builder<Rule.RemoveFacetAction.Builder> implements Rule.RemoveFacetActionOrBuilder

Removes an attribute/facet in the request if is present.

  • Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both.

  • Action Input: attribute name

  • Action Result: Will remove the attribute (as a facet) from the request if it is present.

    Example: Suppose the query is "shoes", the Condition.query_terms is "shoes" and the attribute name "size", then facet key "size" will be removed from the request (if it is present).

Protobuf type google.cloud.retail.v2alpha.Rule.RemoveFacetAction

Static Methods

getDescriptor()

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

Methods

addAllAttributeNames(Iterable<String> values)

public Rule.RemoveFacetAction.Builder addAllAttributeNames(Iterable<String> values)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameter
Name Description
values Iterable<String>

The attributeNames to add.

Returns
Type Description
Rule.RemoveFacetAction.Builder

This builder for chaining.

addAttributeNames(String value)

public Rule.RemoveFacetAction.Builder addAttributeNames(String value)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameter
Name Description
value String

The attributeNames to add.

Returns
Type Description
Rule.RemoveFacetAction.Builder

This builder for chaining.

addAttributeNamesBytes(ByteString value)

public Rule.RemoveFacetAction.Builder addAttributeNamesBytes(ByteString value)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameter
Name Description
value ByteString

The bytes of the attributeNames to add.

Returns
Type Description
Rule.RemoveFacetAction.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Rule.RemoveFacetAction build()
Returns
Type Description
Rule.RemoveFacetAction

buildPartial()

public Rule.RemoveFacetAction buildPartial()
Returns
Type Description
Rule.RemoveFacetAction

clear()

public Rule.RemoveFacetAction.Builder clear()
Returns
Type Description
Rule.RemoveFacetAction.Builder
Overrides

clearAttributeNames()

public Rule.RemoveFacetAction.Builder clearAttributeNames()

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Returns
Type Description
Rule.RemoveFacetAction.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public Rule.RemoveFacetAction.Builder clone()
Returns
Type Description
Rule.RemoveFacetAction.Builder
Overrides

getAttributeNames(int index)

public String getAttributeNames(int index)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The attributeNames at the given index.

getAttributeNamesBytes(int index)

public ByteString getAttributeNamesBytes(int index)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the attributeNames at the given index.

getAttributeNamesCount()

public int getAttributeNamesCount()

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Returns
Type Description
int

The count of attributeNames.

getAttributeNamesList()

public ProtocolStringList getAttributeNamesList()

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Returns
Type Description
ProtocolStringList

A list containing the attributeNames.

getDefaultInstanceForType()

public Rule.RemoveFacetAction getDefaultInstanceForType()
Returns
Type Description
Rule.RemoveFacetAction

getDescriptorForType()

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Rule.RemoveFacetAction other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAttributeNames(int index, String value)

public Rule.RemoveFacetAction.Builder setAttributeNames(int index, String value)

The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.

repeated string attribute_names = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The attributeNames to set.

Returns
Type Description
Rule.RemoveFacetAction.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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