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 `Condition` class in the Retail v2 API is used to define criteria that trigger specific actions, and it is a sealed class implementing multiple interfaces such as `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`."],["This documentation provides information for multiple versions of the Retail v2 API class `Condition`, ranging from version 1.0.0 up to the latest version 2.12.0, but this page is specifically detailing version 2.4.0."],["A valid `Condition` must have either `query_terms` or `products_filter` defined, and if both are present, the condition is met only if all fields are satisfied."],["The `Condition` class has properties such as `ActiveTimeRange` which specifies when the condition is active, and `QueryTerms` which contains a list of terms to match the search query on, of which up to 10 entries can be used."],["This class inherits from `Object` and provides details on inherited members like `GetHashCode()`, `GetType()`, `MemberwiseClone()`, and `ToString()`."]]],[]]