Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class MediaRecommendationEngineConfig.
Additional config specs for a Media Recommendation engine.
Generated from protobuf message google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ Engine
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ type
string
Required. The type of engine. e.g., recommended-for-you. This field together with optimization_objective 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.
↳ optimization_objective
string
The optimization objective. e.g., cvr. This field together with optimization_objective 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 => ctrothers-you-may-like => ctr
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
int
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.
Required. The type of engine. e.g., recommended-for-you.
This field together with
optimization_objective
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
Type
Description
string
setType
Required. The type of engine. e.g., recommended-for-you.
This field together with
optimization_objective
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOptimizationObjective
The optimization objective. e.g., cvr.
This field together with
optimization_objective
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 => ctrothers-you-may-like => ctr
Returns
Type
Description
string
setOptimizationObjective
The optimization objective. e.g., cvr.
This field together with
optimization_objective
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 => ctrothers-you-may-like => ctr
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOptimizationObjectiveConfig
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).
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 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
Type
Description
int
setTrainingState
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class MediaRecommendationEngineConfig (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.Engine.MediaRecommendationEngineConfig)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.Engine.MediaRecommendationEngineConfig)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.Engine.MediaRecommendationEngineConfig)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.Engine.MediaRecommendationEngineConfig)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.Engine.MediaRecommendationEngineConfig)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.Engine.MediaRecommendationEngineConfig)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.Engine.MediaRecommendationEngineConfig)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.Engine.MediaRecommendationEngineConfig)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.Engine.MediaRecommendationEngineConfig)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.Engine.MediaRecommendationEngineConfig)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.Engine.MediaRecommendationEngineConfig) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class MediaRecommendationEngineConfig.\n\nAdditional config specs for a Media Recommendation engine.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1 \\\\ Engine\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getType\n\nRequired. The type of engine. e.g., `recommended-for-you`.\n\nThis field together with\n[optimization_objective](/php/docs/reference/cloud-discoveryengine/latest/V1.Engine.MediaRecommendationEngineConfig#_Google_Cloud_DiscoveryEngine_V1_Engine_MediaRecommendationEngineConfig__getOptimizationObjective__)\ndescribe engine metadata to use to control engine training and serving.\nCurrently supported values: `recommended-for-you`, `others-you-may-like`,\n`more-like-this`, `most-popular-items`.\n\n### setType\n\nRequired. The type of engine. e.g., `recommended-for-you`.\n\nThis field together with\n[optimization_objective](/php/docs/reference/cloud-discoveryengine/latest/V1.Engine.MediaRecommendationEngineConfig#_Google_Cloud_DiscoveryEngine_V1_Engine_MediaRecommendationEngineConfig__getOptimizationObjective__)\ndescribe engine metadata to use to control engine training and serving.\nCurrently supported values: `recommended-for-you`, `others-you-may-like`,\n`more-like-this`, `most-popular-items`.\n\n### getOptimizationObjective\n\nThe optimization objective. e.g., `cvr`.\n\nThis field together with\n[optimization_objective](/php/docs/reference/cloud-discoveryengine/latest/V1.Engine.MediaRecommendationEngineConfig#_Google_Cloud_DiscoveryEngine_V1_Engine_MediaRecommendationEngineConfig__getType__)\ndescribe engine metadata to use to control engine training and serving.\nCurrently supported\nvalues: `ctr`, `cvr`.\nIf not specified, we choose default based on engine type.\nDefault depends on type of recommendation:\n`recommended-for-you` =\\\u003e `ctr`\n`others-you-may-like` =\\\u003e `ctr`\n\n### setOptimizationObjective\n\nThe optimization objective. e.g., `cvr`.\n\nThis field together with\n[optimization_objective](/php/docs/reference/cloud-discoveryengine/latest/V1.Engine.MediaRecommendationEngineConfig#_Google_Cloud_DiscoveryEngine_V1_Engine_MediaRecommendationEngineConfig__getType__)\ndescribe engine metadata to use to control engine training and serving.\nCurrently supported\nvalues: `ctr`, `cvr`.\nIf not specified, we choose default based on engine type.\nDefault depends on type of recommendation:\n`recommended-for-you` =\\\u003e `ctr`\n`others-you-may-like` =\\\u003e `ctr`\n\n### getOptimizationObjectiveConfig\n\nName and value of the custom threshold for cvr optimization_objective.\n\nFor target_field `watch-time`, target_field_value must be an integer\nvalue indicating the media progress time in seconds between (0, 86400\\]\n(excludes 0, includes 86400) (e.g., 90).\nFor target_field `watch-percentage`, the target_field_value must be a\nvalid float value between (0, 1.0\\] (excludes 0, includes 1.0) (e.g.,\n0.5).\n\n### hasOptimizationObjectiveConfig\n\n### clearOptimizationObjectiveConfig\n\n### setOptimizationObjectiveConfig\n\nName and value of the custom threshold for cvr optimization_objective.\n\nFor target_field `watch-time`, target_field_value must be an integer\nvalue indicating the media progress time in seconds between (0, 86400\\]\n(excludes 0, includes 86400) (e.g., 90).\nFor target_field `watch-percentage`, the target_field_value must be a\nvalid float value between (0, 1.0\\] (excludes 0, includes 1.0) (e.g.,\n0.5).\n\n### getTrainingState\n\nThe training state that the engine is in (e.g.\n\n`TRAINING` or `PAUSED`).\nSince part of the cost of running the service\nis frequency of training - this can be used to determine when to train\nengine in order to control cost. If not specified: the default value for\n`CreateEngine` method is `TRAINING`. The default value for\n`UpdateEngine` method is to keep the state the same as before.\n\n### setTrainingState\n\nThe training state that the engine is in (e.g.\n\n`TRAINING` or `PAUSED`).\nSince part of the cost of running the service\nis frequency of training - this can be used to determine when to train\nengine in order to control cost. If not specified: the default value for\n`CreateEngine` method is `TRAINING`. The default value for\n`UpdateEngine` method is to keep the state the same as before.\n\n### getEngineFeaturesConfig\n\nOptional. Additional engine features config.\n\n### hasEngineFeaturesConfig\n\n### clearEngineFeaturesConfig\n\n### setEngineFeaturesConfig\n\nOptional. Additional engine features config."]]