Specifies the configurations needed for Media Discovery. Currently
we support:
demote_content_watched: Threshold for watched content
demotion. Customers can specify if using watched content demotion
or use viewed detail page. Using the content watched demotion,
customers need to specify the watched minutes or percentage
exceeds the threshold, the content will be demoted in the
recommendation result.
promote_fresh_content: cutoff days for fresh content
promotion. Customers can specify if using content freshness
promotion. If the content was published within the cutoff days,
the content will be promoted in the recommendation result. Can
only be set if
SolutionType
is
SOLUTION_TYPE_RECOMMENDATION.
This message has oneof_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
float
Specifies the content watched percentage threshold for
demotion. Threshold value must be between [0, 1.0]
inclusive.
This field is a member of oneof_ demote_content_watched.
content_watched_seconds_threshold
float
Specifies the content watched minutes
threshold for demotion.
This field is a member of oneof_ demote_content_watched.
demotion_event_type
str
Specifies the event type used for demoting recommendation
result. Currently supported values:
- view-item: Item viewed.
- media-play: Start/resume watching a video, playing a
song, etc.
- media-complete: Finished or stopped midway through a
video, song, etc.
If unset, watch history demotion will not be applied.
Content freshness demotion will still be applied.
demote_content_watched_past_days
int
Optional. Specifies the number of days to
look back for demoting watched content. If set
to zero or unset, defaults to the maximum of 365
days.
content_freshness_cutoff_days
int
Specifies the content freshness used for
recommendation result. Contents will be demoted
if contents were published for more than content
freshness cutoff days.
[[["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-08-07 UTC."],[],[],null,["# Class MediaConfig (0.13.11)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.11 (latest)](/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.13.10](/python/docs/reference/discoveryengine/0.13.10/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.12.3](/python/docs/reference/discoveryengine/0.12.3/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.11.14](/python/docs/reference/discoveryengine/0.11.14/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.10.0](/python/docs/reference/discoveryengine/0.10.0/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.9.1](/python/docs/reference/discoveryengine/0.9.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.8.1](/python/docs/reference/discoveryengine/0.8.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.7.0](/python/docs/reference/discoveryengine/0.7.0/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.6.0](/python/docs/reference/discoveryengine/0.6.0/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.5.0](/python/docs/reference/discoveryengine/0.5.0/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.4.1](/python/docs/reference/discoveryengine/0.4.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.3.1](/python/docs/reference/discoveryengine/0.3.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.2.1](/python/docs/reference/discoveryengine/0.2.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig)\n- [0.1.1](/python/docs/reference/discoveryengine/0.1.1/google.cloud.discoveryengine_v1beta.types.ServingConfig.MediaConfig) \n\n MediaConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nSpecifies the configurations needed for Media Discovery. Currently\nwe support:\n\n- `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result.\n- `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.\n\nThis message has `oneof`_ fields (mutually exclusive fields).\nFor each oneof, at most one member field can be set at the same time.\nSetting any member of the oneof automatically clears all other\nmembers.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e"]]