Retail v2 API - Class Control (2.4.0)

public sealed class Control : IMessage<Control>, IEquatable<Control>, IDeepCloneable<Control>, IBufferMessage, IMessage

Reference documentation and code samples for the Retail v2 API class Control.

Configures dynamic metadata that can be linked to a [ServingConfig][google.cloud.retail.v2.ServingConfig] and affect search or recommendation results at serving time.

Inheritance

Object > Control

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

Control()

public Control()

Control(Control)

public Control(Control other)
Parameter
NameDescription
otherControl

Properties

AssociatedServingConfigIds

public RepeatedField<string> AssociatedServingConfigIds { get; }

Output only. List of [serving config][google.cloud.retail.v2.ServingConfig] ids that are associated with this control in the same [Catalog][google.cloud.retail.v2.Catalog].

Note the association is managed via the [ServingConfig][google.cloud.retail.v2.ServingConfig], this is an output only denormalized view.

Property Value
TypeDescription
RepeatedField<String>

ControlCase

public Control.ControlOneofCase ControlCase { get; }
Property Value
TypeDescription
Control.ControlOneofCase

ControlName

public ControlName ControlName { get; set; }

ControlName-typed view over the Name resource name property.

Property Value
TypeDescription
ControlName

DisplayName

public string DisplayName { get; set; }

Required. The human readable control display name. Used in Retail UI.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.

Property Value
TypeDescription
String

Name

public string Name { get; set; }

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/controls/*

Property Value
TypeDescription
String

Rule

public Rule Rule { get; set; }

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

Property Value
TypeDescription
Rule

SearchSolutionUseCase

public RepeatedField<SearchSolutionUseCase> SearchSolutionUseCase { get; }

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH] if not specified. Currently only allow one search_solution_use_case per control.

Property Value
TypeDescription
RepeatedField<SearchSolutionUseCase>

SolutionTypes

public RepeatedField<SolutionType> SolutionTypes { get; }

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time.

Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2.SolutionType.SOLUTION_TYPE_SEARCH].

Property Value
TypeDescription
RepeatedField<SolutionType>