Optional. Query regex to match the whole search query.
Cannot be set when
[Condition.query_terms][google.cloud.discoveryengine.v1.Condition.query_terms]
is set. Only supported for Basic Site Search promotion serving controls.
public RepeatedField<Condition.Types.QueryTerm> QueryTerms { get; }
Search only
A list of terms to match the query on.
Cannot be set when
[Condition.query_regex][google.cloud.discoveryengine.v1.Condition.query_regex]
is set.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCondition\u003c/code\u003e class in the Google Cloud Discovery Engine v1 API defines the criteria for determining when a particular behavior should be allowed.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eCondition\u003c/code\u003e class is 1.6.0, with older versions available for reference, starting from 1.0.0-beta06, all accessible through the provided links.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes constructors for creating new \u003ccode\u003eCondition\u003c/code\u003e objects, either default or copied from other existing conditions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCondition\u003c/code\u003e supports defining active time ranges via \u003ccode\u003eActiveTimeRange\u003c/code\u003e, utilizing a maximum of 10 time ranges, and matching search query terms or regex patterns using \u003ccode\u003eQueryTerms\u003c/code\u003e or \u003ccode\u003eQueryRegex\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, found in the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace, adding specific functionalities to the class.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class Condition (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.Condition)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.Condition) \n\n public sealed class Condition : IMessage\u003cCondition\u003e, IEquatable\u003cCondition\u003e, IDeepCloneable\u003cCondition\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class Condition.\n\nDefines circumstances to be checked before allowing a behavior \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Condition \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Condition](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Condition), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Condition](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Condition), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Condition](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Condition), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### Condition()\n\n public Condition()\n\n### Condition(Condition)\n\n public Condition(Condition other)\n\nProperties\n----------\n\n### ActiveTimeRange\n\n public RepeatedField\u003cCondition.Types.TimeRange\u003e ActiveTimeRange { get; }\n\nRange of time(s) specifying when condition is active.\n\nMaximum of 10 time ranges.\n\n### QueryRegex\n\n public string QueryRegex { get; set; }\n\nOptional. Query regex to match the whole search query.\nCannot be set when\n\\[Condition.query_terms\\]\\[google.cloud.discoveryengine.v1.Condition.query_terms\\]\nis set. Only supported for Basic Site Search promotion serving controls.\n\n### QueryTerms\n\n public RepeatedField\u003cCondition.Types.QueryTerm\u003e QueryTerms { get; }\n\nSearch only\nA list of terms to match the query on.\nCannot be set when\n\\[Condition.query_regex\\]\\[google.cloud.discoveryengine.v1.Condition.query_regex\\]\nis set.\n\nMaximum of 10 query terms."]]