# Google Cloud Discovery Engine V1 Client - Class Control (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 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](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getBoostAction

Defines a boost-type control

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.BoostAction|null` |   |

### hasBoostAction

### setBoostAction

Defines a boost-type control

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.BoostAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFilterAction

Defines a filter-type control
Currently not supported by Recommendation

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.FilterAction|null` |   |

### hasFilterAction

### setFilterAction

Defines a filter-type control
Currently not supported by Recommendation

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.FilterAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRedirectAction

Defines a redirect-type control.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.RedirectAction|null` |   |

### hasRedirectAction

### setRedirectAction

Defines a redirect-type control.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.RedirectAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSynonymsAction

Treats a group of terms as synonyms of one another.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.SynonymsAction|null` |   |

### hasSynonymsAction

### setSynonymsAction

Treats a group of terms as synonyms of one another.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.SynonymsAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPromoteAction

Promote certain links based on predefined trigger queries.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.PromoteAction|null` |   |

### hasPromoteAction

### setPromoteAction

Promote certain links based on predefined trigger queries.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Control.PromoteAction` |

| **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](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.ServingConfig) IDs this
control is attached to. May take up to 10 minutes to update after changes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setAssociatedServingConfigIds

Output only. List of all
[ServingConfig](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.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` | Enum of type [SolutionType](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType). |

### 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` Enum of type [SolutionType](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType). |

| **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](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType#_Google_Cloud_DiscoveryEngine_V1_SolutionType__SOLUTION_TYPE_SEARCH).
Currently only allow one use case per control.
Must be set when solution_type is
[SolutionType.SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType#_Google_Cloud_DiscoveryEngine_V1_SolutionType__SOLUTION_TYPE_SEARCH).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setUseCases

Specifies the use case for the control.

Affects what condition fields can be set.
Only applies to
[SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType#_Google_Cloud_DiscoveryEngine_V1_SolutionType__SOLUTION_TYPE_SEARCH).
Currently only allow one use case per control.
Must be set when solution_type is
[SolutionType.SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SolutionType#_Google_Cloud_DiscoveryEngine_V1_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** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Condition>` |   |

### 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<https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Condition>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAction

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |