Class Condition.Builder (2.10.0)

public static final class Condition.Builder extends GeneratedMessageV3.Builder<Condition.Builder> implements ConditionOrBuilder

Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.

Protobuf type google.cloud.retail.v2alpha.Condition

Implements

ConditionOrBuilder

Static Methods

getDescriptor()

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

Methods

addActiveTimeRange(Condition.TimeRange value)

public Condition.Builder addActiveTimeRange(Condition.TimeRange value)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
valueCondition.TimeRange
Returns
TypeDescription
Condition.Builder

addActiveTimeRange(Condition.TimeRange.Builder builderForValue)

public Condition.Builder addActiveTimeRange(Condition.TimeRange.Builder builderForValue)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
builderForValueCondition.TimeRange.Builder
Returns
TypeDescription
Condition.Builder

addActiveTimeRange(int index, Condition.TimeRange value)

public Condition.Builder addActiveTimeRange(int index, Condition.TimeRange value)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameters
NameDescription
indexint
valueCondition.TimeRange
Returns
TypeDescription
Condition.Builder

addActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)

public Condition.Builder addActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameters
NameDescription
indexint
builderForValueCondition.TimeRange.Builder
Returns
TypeDescription
Condition.Builder

addActiveTimeRangeBuilder()

public Condition.TimeRange.Builder addActiveTimeRangeBuilder()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
Condition.TimeRange.Builder

addActiveTimeRangeBuilder(int index)

public Condition.TimeRange.Builder addActiveTimeRangeBuilder(int index)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.TimeRange.Builder

addAllActiveTimeRange(Iterable<? extends Condition.TimeRange> values)

public Condition.Builder addAllActiveTimeRange(Iterable<? extends Condition.TimeRange> values)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2alpha.Condition.TimeRange>
Returns
TypeDescription
Condition.Builder

addAllQueryTerms(Iterable<? extends Condition.QueryTerm> values)

public Condition.Builder addAllQueryTerms(Iterable<? extends Condition.QueryTerm> values)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2alpha.Condition.QueryTerm>
Returns
TypeDescription
Condition.Builder

addQueryTerms(Condition.QueryTerm value)

public Condition.Builder addQueryTerms(Condition.QueryTerm value)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
valueCondition.QueryTerm
Returns
TypeDescription
Condition.Builder

addQueryTerms(Condition.QueryTerm.Builder builderForValue)

public Condition.Builder addQueryTerms(Condition.QueryTerm.Builder builderForValue)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
builderForValueCondition.QueryTerm.Builder
Returns
TypeDescription
Condition.Builder

addQueryTerms(int index, Condition.QueryTerm value)

public Condition.Builder addQueryTerms(int index, Condition.QueryTerm value)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameters
NameDescription
indexint
valueCondition.QueryTerm
Returns
TypeDescription
Condition.Builder

addQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)

public Condition.Builder addQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameters
NameDescription
indexint
builderForValueCondition.QueryTerm.Builder
Returns
TypeDescription
Condition.Builder

addQueryTermsBuilder()

public Condition.QueryTerm.Builder addQueryTermsBuilder()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
Condition.QueryTerm.Builder

addQueryTermsBuilder(int index)

public Condition.QueryTerm.Builder addQueryTermsBuilder(int index)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.QueryTerm.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Condition build()
Returns
TypeDescription
Condition

buildPartial()

public Condition buildPartial()
Returns
TypeDescription
Condition

clear()

public Condition.Builder clear()
Returns
TypeDescription
Condition.Builder
Overrides

clearActiveTimeRange()

public Condition.Builder clearActiveTimeRange()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
Condition.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQueryTerms()

public Condition.Builder clearQueryTerms()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
Condition.Builder

clone()

public Condition.Builder clone()
Returns
TypeDescription
Condition.Builder
Overrides

getActiveTimeRange(int index)

public Condition.TimeRange getActiveTimeRange(int index)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.TimeRange

getActiveTimeRangeBuilder(int index)

public Condition.TimeRange.Builder getActiveTimeRangeBuilder(int index)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.TimeRange.Builder

getActiveTimeRangeBuilderList()

public List<Condition.TimeRange.Builder> getActiveTimeRangeBuilderList()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
List<Builder>

getActiveTimeRangeCount()

public int getActiveTimeRangeCount()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
int

getActiveTimeRangeList()

public List<Condition.TimeRange> getActiveTimeRangeList()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
List<TimeRange>

getActiveTimeRangeOrBuilder(int index)

public Condition.TimeRangeOrBuilder getActiveTimeRangeOrBuilder(int index)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.TimeRangeOrBuilder

getActiveTimeRangeOrBuilderList()

public List<? extends Condition.TimeRangeOrBuilder> getActiveTimeRangeOrBuilderList()

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Returns
TypeDescription
List<? extends com.google.cloud.retail.v2alpha.Condition.TimeRangeOrBuilder>

getDefaultInstanceForType()

public Condition getDefaultInstanceForType()
Returns
TypeDescription
Condition

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getQueryTerms(int index)

public Condition.QueryTerm getQueryTerms(int index)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.QueryTerm

getQueryTermsBuilder(int index)

public Condition.QueryTerm.Builder getQueryTermsBuilder(int index)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.QueryTerm.Builder

getQueryTermsBuilderList()

public List<Condition.QueryTerm.Builder> getQueryTermsBuilderList()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
List<Builder>

getQueryTermsCount()

public int getQueryTermsCount()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
int

getQueryTermsList()

public List<Condition.QueryTerm> getQueryTermsList()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
List<QueryTerm>

getQueryTermsOrBuilder(int index)

public Condition.QueryTermOrBuilder getQueryTermsOrBuilder(int index)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.QueryTermOrBuilder

getQueryTermsOrBuilderList()

public List<? extends Condition.QueryTermOrBuilder> getQueryTermsOrBuilderList()

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Returns
TypeDescription
List<? extends com.google.cloud.retail.v2alpha.Condition.QueryTermOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Condition other)

public Condition.Builder mergeFrom(Condition other)
Parameter
NameDescription
otherCondition
Returns
TypeDescription
Condition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeActiveTimeRange(int index)

public Condition.Builder removeActiveTimeRange(int index)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.Builder

removeQueryTerms(int index)

public Condition.Builder removeQueryTerms(int index)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.Builder

setActiveTimeRange(int index, Condition.TimeRange value)

public Condition.Builder setActiveTimeRange(int index, Condition.TimeRange value)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameters
NameDescription
indexint
valueCondition.TimeRange
Returns
TypeDescription
Condition.Builder

setActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)

public Condition.Builder setActiveTimeRange(int index, Condition.TimeRange.Builder builderForValue)

Range of time(s) specifying when Condition is active. Condition true if any time range matches.

repeated .google.cloud.retail.v2alpha.Condition.TimeRange active_time_range = 3;

Parameters
NameDescription
indexint
builderForValueCondition.TimeRange.Builder
Returns
TypeDescription
Condition.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setQueryTerms(int index, Condition.QueryTerm value)

public Condition.Builder setQueryTerms(int index, Condition.QueryTerm value)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameters
NameDescription
indexint
valueCondition.QueryTerm
Returns
TypeDescription
Condition.Builder

setQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)

public Condition.Builder setQueryTerms(int index, Condition.QueryTerm.Builder builderForValue)

A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).

repeated .google.cloud.retail.v2alpha.Condition.QueryTerm query_terms = 1;

Parameters
NameDescription
indexint
builderForValueCondition.QueryTerm.Builder
Returns
TypeDescription
Condition.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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