# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::Control (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::Control.

Defines a conditioned behavior to employ during serving.
Must be attached to a
[ServingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ServingConfig "Google::Cloud::DiscoveryEngine::V1::ServingConfig (class)") to be
considered at serving time. Permitted actions dependent on `SolutionType`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #associated_serving_config_ids

    def associated_serving_config_ids() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Output only. List of all [ServingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ServingConfig "Google::Cloud::DiscoveryEngine::V1::ServingConfig (class)") IDs this control is attached to. May take up to 10 minutes to update after changes.

### #boost_action

    def boost_action() -> ::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-BoostAction)) --- Defines a boost-type control


  Note: The following fields are mutually exclusive: `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #boost_action=

    def boost_action=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-BoostAction)) --- Defines a boost-type control


  Note: The following fields are mutually exclusive: `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::BoostAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-BoostAction)) --- Defines a boost-type control


  Note: The following fields are mutually exclusive: `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #conditions

    def conditions() -> ::Array<::Google::Cloud::DiscoveryEngine::V1::Condition>

**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/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.

### #conditions=

    def conditions=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::Condition>

**Parameter**

- **value** (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/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.
**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/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.

### #display_name

    def display_name() -> ::String

**Returns**

- (::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.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #filter_action

    def filter_action() -> ::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-FilterAction)) --- Defines a filter-type control Currently not supported by Recommendation


  Note: The following fields are mutually exclusive: `filter_action`, `boost_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #filter_action=

    def filter_action=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-FilterAction)) --- Defines a filter-type control Currently not supported by Recommendation


  Note: The following fields are mutually exclusive: `filter_action`, `boost_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::FilterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-FilterAction)) --- Defines a filter-type control Currently not supported by Recommendation


  Note: The following fields are mutually exclusive: `filter_action`, `boost_action`, `redirect_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`
**Returns**

- (::String) --- Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`

### #promote_action

    def promote_action() -> ::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-PromoteAction)) --- Promote certain links based on predefined trigger queries.


  Note: The following fields are mutually exclusive: `promote_action`, `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #promote_action=

    def promote_action=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-PromoteAction)) --- Promote certain links based on predefined trigger queries.


  Note: The following fields are mutually exclusive: `promote_action`, `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::PromoteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-PromoteAction)) --- Promote certain links based on predefined trigger queries.


  Note: The following fields are mutually exclusive: `promote_action`, `boost_action`, `filter_action`, `redirect_action`, `synonyms_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #redirect_action

    def redirect_action() -> ::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-RedirectAction)) --- Defines a redirect-type control.


  Note: The following fields are mutually exclusive: `redirect_action`, `boost_action`, `filter_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #redirect_action=

    def redirect_action=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-RedirectAction)) --- Defines a redirect-type control.


  Note: The following fields are mutually exclusive: `redirect_action`, `boost_action`, `filter_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-RedirectAction)) --- Defines a redirect-type control.


  Note: The following fields are mutually exclusive: `redirect_action`, `boost_action`, `filter_action`, `synonyms_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #solution_type

    def solution_type() -> ::Google::Cloud::DiscoveryEngine::V1::SolutionType

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::SolutionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType)) --- Required. Immutable. What solution the control belongs to.


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

### #solution_type=

    def solution_type=(value) -> ::Google::Cloud::DiscoveryEngine::V1::SolutionType

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::SolutionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType)) --- Required. Immutable. What solution the control belongs to.


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

- ([::Google::Cloud::DiscoveryEngine::V1::SolutionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType)) --- Required. Immutable. What solution the control belongs to.


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

### #synonyms_action

    def synonyms_action() -> ::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-SynonymsAction)) --- Treats a group of terms as synonyms of one another.


  Note: The following fields are mutually exclusive: `synonyms_action`, `boost_action`, `filter_action`, `redirect_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #synonyms_action=

    def synonyms_action=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-SynonymsAction)) --- Treats a group of terms as synonyms of one another.


  Note: The following fields are mutually exclusive: `synonyms_action`, `boost_action`, `filter_action`, `redirect_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Control::SynonymsAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Control-SynonymsAction)) --- Treats a group of terms as synonyms of one another.


  Note: The following fields are mutually exclusive: `synonyms_action`, `boost_action`, `filter_action`, `redirect_action`, `promote_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #use_cases

    def use_cases() -> ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchUseCase>

**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::SearchUseCase](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchUseCase)\>) --- 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/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)"). Currently only allow one use case per control. Must be set when solution_type is [SolutionType.SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)").

### #use_cases=

    def use_cases=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchUseCase>

**Parameter**

- **value** (::Array\<[::Google::Cloud::DiscoveryEngine::V1::SearchUseCase](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchUseCase)\>) --- 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/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)"). Currently only allow one use case per control. Must be set when solution_type is [SolutionType.SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)").
**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::SearchUseCase](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchUseCase)\>) --- 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/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)"). Currently only allow one use case per control. Must be set when solution_type is [SolutionType.SOLUTION_TYPE_SEARCH](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SolutionType#Google__Cloud__DiscoveryEngine__V1__SolutionType__SOLUTION_TYPE_SEARCH "Google::Cloud::DiscoveryEngine::V1::SolutionType::SOLUTION_TYPE_SEARCH (constant)").