# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig (v0.28.0)

0.28.0 (latest) 0.27.0 0.26.0 0.25.0 0.24.0 0.23.1 0.22.0 0.21.0 0.20.1 0.19.1 0.18.0 0.17.0 0.16.0 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig.

Additional config specs for a Media Recommendation engine.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #engine_features_config

    def engine_features_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-EngineFeaturesConfig)) --- Optional. Additional engine features config.

### #engine_features_config=

    def engine_features_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-EngineFeaturesConfig)) --- Optional. Additional engine features config.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::EngineFeaturesConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-EngineFeaturesConfig)) --- Optional. Additional engine features config.

### #optimization_objective

    def optimization_objective() -> ::String

**Returns**

- (::String) --- The optimization objective. e.g., `cvr`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_type_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#type (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported
  values: `ctr`, `cvr`.

  If not specified, we choose default based on engine type.
  Default depends on type of recommendation:

  `recommended-for-you` =\> `ctr`

  `others-you-may-like` =\> `ctr`

### #optimization_objective=

    def optimization_objective=(value) -> ::String

**Parameter**

- **value** (::String) --- The optimization objective. e.g., `cvr`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_type_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#type (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported
  values: `ctr`, `cvr`.

  If not specified, we choose default based on engine type.
  Default depends on type of recommendation:

  `recommended-for-you` =\> `ctr`

  `others-you-may-like` =\> `ctr`
**Returns**

- (::String) --- The optimization objective. e.g., `cvr`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_type_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#type (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported
  values: `ctr`, `cvr`.

  If not specified, we choose default based on engine type.
  Default depends on type of recommendation:

  `recommended-for-you` =\> `ctr`

  `others-you-may-like` =\> `ctr`

### #optimization_objective_config

    def optimization_objective_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-OptimizationObjectiveConfig)) --- Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400\] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0\] (excludes 0, includes 1.0) (e.g., 0.5).

### #optimization_objective_config=

    def optimization_objective_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-OptimizationObjectiveConfig)) --- Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400\] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0\] (excludes 0, includes 1.0) (e.g., 0.5).
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::OptimizationObjectiveConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-OptimizationObjectiveConfig)) --- Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400\] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0\] (excludes 0, includes 1.0) (e.g., 0.5).

### #training_state

    def training_state() -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::TrainingState

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::TrainingState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-TrainingState)) --- The training state that the engine is in (e.g. `TRAINING` or `PAUSED`).


  Since part of the cost of running the service
  is frequency of training - this can be used to determine when to train
  engine in order to control cost. If not specified: the default value for
  `CreateEngine` method is `TRAINING`. The default value for
  `UpdateEngine` method is to keep the state the same as before.

### #training_state=

    def training_state=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::TrainingState

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::TrainingState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-TrainingState)) --- The training state that the engine is in (e.g. `TRAINING` or `PAUSED`).


  Since part of the cost of running the service
  is frequency of training - this can be used to determine when to train
  engine in order to control cost. If not specified: the default value for
  `CreateEngine` method is `TRAINING`. The default value for
  `UpdateEngine` method is to keep the state the same as before.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig::TrainingState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig-TrainingState)) --- The training state that the engine is in (e.g. `TRAINING` or `PAUSED`).


  Since part of the cost of running the service
  is frequency of training - this can be used to determine when to train
  engine in order to control cost. If not specified: the default value for
  `CreateEngine` method is `TRAINING`. The default value for
  `UpdateEngine` method is to keep the state the same as before.

### #type

    def type() -> ::String

**Returns**

- (::String) --- Required. The type of engine. e.g., `recommended-for-you`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_optimization_objective_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#optimization_objective (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported values: `recommended-for-you`, `others-you-may-like`,
  `more-like-this`, `most-popular-items`.

### #type=

    def type=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The type of engine. e.g., `recommended-for-you`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_optimization_objective_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#optimization_objective (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported values: `recommended-for-you`, `others-you-may-like`,
  `more-like-this`, `most-popular-items`.
**Returns**

- (::String) --- Required. The type of engine. e.g., `recommended-for-you`.


  This field together with
  [optimization_objective](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-Engine-MediaRecommendationEngineConfig#Google__Cloud__DiscoveryEngine__V1beta__Engine__MediaRecommendationEngineConfig_optimization_objective_instance_ "Google::Cloud::DiscoveryEngine::V1beta::Engine::MediaRecommendationEngineConfig#optimization_objective (method)")
  describe engine metadata to use to control engine training and serving.

  Currently supported values: `recommended-for-you`, `others-you-may-like`,
  `more-like-this`, `most-popular-items`.