Class Condition (2.43.0)

public final class Condition extends GeneratedMessageV3 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.v2.Condition

Implements

ConditionOrBuilder

Static Fields

ACTIVE_TIME_RANGE_FIELD_NUMBER

public static final int ACTIVE_TIME_RANGE_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_TERMS_FIELD_NUMBER

public static final int QUERY_TERMS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Condition getDefaultInstance()
Returns
TypeDescription
Condition

getDescriptor()

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

newBuilder()

public static Condition.Builder newBuilder()
Returns
TypeDescription
Condition.Builder

newBuilder(Condition prototype)

public static Condition.Builder newBuilder(Condition prototype)
Parameter
NameDescription
prototypeCondition
Returns
TypeDescription
Condition.Builder

parseDelimitedFrom(InputStream input)

public static Condition parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Condition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Condition parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Condition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Condition parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Condition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Condition parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Condition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Condition parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Condition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Condition parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Condition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Condition> parser()
Returns
TypeDescription
Parser<Condition>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.v2.Condition.TimeRange active_time_range = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.TimeRange

getActiveTimeRangeCount()

public int getActiveTimeRangeCount()

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

repeated .google.cloud.retail.v2.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.v2.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.v2.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.v2.Condition.TimeRange active_time_range = 3;

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

getDefaultInstanceForType()

public Condition getDefaultInstanceForType()
Returns
TypeDescription
Condition

getParserForType()

public Parser<Condition> getParserForType()
Returns
TypeDescription
Parser<Condition>
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.v2.Condition.QueryTerm query_terms = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Condition.QueryTerm

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.v2.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.v2.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.v2.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.v2.Condition.QueryTerm query_terms = 1;

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Condition.Builder newBuilderForType()
Returns
TypeDescription
Condition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Condition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Condition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Condition.Builder toBuilder()
Returns
TypeDescription
Condition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException