public sealed class Condition : IMessage<Condition>, IEquatable<Condition>, IDeepCloneable<Condition>, IBufferMessage, IMessage
Reference documentation and code samples for the Retail v2 API class Condition.
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.
public RepeatedField<Condition.Types.QueryTerm> QueryTerms { get; }
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).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The latest version of the Google.Cloud.Retail.V2 API is 2.12.0, with this page offering access to documentation for version 2.5.0 and other previous versions dating back to 1.0.0."],["The `Condition` class within the Retail v2 API serves to define criteria that trigger specific actions, requiring the specification of either `query_terms` or `products_filter` but potentially using both for a more specific conditional trigger."],["The `Condition` class implements several interfaces, including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, and inherits members from the base `object` class."],["The class has two constructors, one default and another that takes an existing Condition object as an argument, along with two properties, `ActiveTimeRange` and `QueryTerms`, which are both `RepeatedFields`."],["Valid conditions must have at least either `query_terms` or `products_filter` specified, however conditions can contain both, and when containing both they must be satisfied together for the condition to be considered met."]]],[]]