Google Cloud Discovery Engine V1 Client - Class Control (1.2.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Control.

Defines a conditioned behavior to employ during serving.

Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on SolutionType.

Generated from protobuf message google.cloud.discoveryengine.v1.Control

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ boost_action Google\Cloud\DiscoveryEngine\V1\Control\BoostAction

Defines a boost-type control

↳ filter_action Google\Cloud\DiscoveryEngine\V1\Control\FilterAction

Defines a filter-type control Currently not supported by Recommendation

↳ redirect_action Google\Cloud\DiscoveryEngine\V1\Control\RedirectAction

Defines a redirect-type control.

↳ synonyms_action Google\Cloud\DiscoveryEngine\V1\Control\SynonymsAction

Treats a group of terms as synonyms of one another.

↳ name string

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

↳ display_name string

Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.

↳ associated_serving_config_ids array

Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.

↳ solution_type int

Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.

↳ use_cases array

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

↳ conditions array<Google\Cloud\DiscoveryEngine\V1\Condition>

Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

getBoostAction

Defines a boost-type control

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Control\BoostAction|null

hasBoostAction

setBoostAction

Defines a boost-type control

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Control\BoostAction
Returns
Type Description
$this

getFilterAction

Defines a filter-type control Currently not supported by Recommendation

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Control\FilterAction|null

hasFilterAction

setFilterAction

Defines a filter-type control Currently not supported by Recommendation

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Control\FilterAction
Returns
Type Description
$this

getRedirectAction

Defines a redirect-type control.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Control\RedirectAction|null

hasRedirectAction

setRedirectAction

Defines a redirect-type control.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Control\RedirectAction
Returns
Type Description
$this

getSynonymsAction

Treats a group of terms as synonyms of one another.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Control\SynonymsAction|null

hasSynonymsAction

setSynonymsAction

Treats a group of terms as synonyms of one another.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Control\SynonymsAction
Returns
Type Description
$this

getName

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

Returns
Type Description
string

setName

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

Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

Required. Human readable name. The identifier used in UI views.

Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.

Returns
Type Description
string

setDisplayName

Required. Human readable name. The identifier used in UI views.

Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.

Parameter
Name Description
var string
Returns
Type Description
$this

getAssociatedServingConfigIds

Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAssociatedServingConfigIds

Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getSolutionType

Required. Immutable. What solution the control belongs to.

Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.

Returns
Type Description
int

setSolutionType

Required. Immutable. What solution the control belongs to.

Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.

Parameter
Name Description
var int
Returns
Type Description
$this

getUseCases

Specifies the use case for the control.

Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUseCases

Specifies the use case for the control.

Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getConditions

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setConditions

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

Parameter
Name Description
var array<Google\Cloud\DiscoveryEngine\V1\Condition>
Returns
Type Description
$this

getAction

Returns
Type Description
string