public sealed class ServingConfig.Types.MediaConfig : IMessage<ServingConfig.Types.MediaConfig>, IEquatable<ServingConfig.Types.MediaConfig>, IDeepCloneable<ServingConfig.Types.MediaConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class ServingConfig.Types.MediaConfig.
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][google.cloud.discoveryengine.v1beta.SolutionType] is
[SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
public int ContentFreshnessCutoffDays { get; set; }
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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation is for the \u003ccode\u003eServingConfig.Types.MediaConfig\u003c/code\u003e class within the Google Cloud Discovery Engine v1beta API, specifically for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMediaConfig\u003c/code\u003e class allows for configurations in Media Discovery, including options to demote watched content based on thresholds, like the percentage or seconds watched, and the number of days to look back.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMediaConfig\u003c/code\u003e class supports promoting fresh content by specifying a cutoff in days, beyond which the content will no longer be promoted.\u003c/p\u003e\n"],["\u003cp\u003eThe class supports several properties, for setting \u003ccode\u003eContentFreshnessCutoffDays\u003c/code\u003e, \u003ccode\u003eContentWatchedPercentageThreshold\u003c/code\u003e, \u003ccode\u003eContentWatchedSecondsThreshold\u003c/code\u003e, \u003ccode\u003eDemoteContentWatchedPastDays\u003c/code\u003e and \u003ccode\u003eDemotionEventType\u003c/code\u003e, as well as properties to check if the percentage and seconds thresholds are set, and the \u003ccode\u003eDemoteContentWatchedCase\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis Class implements various interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, as well as inheritance from the \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class ServingConfig.Types.MediaConfig (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig) \n\n public sealed class ServingConfig.Types.MediaConfig : IMessage\u003cServingConfig.Types.MediaConfig\u003e, IEquatable\u003cServingConfig.Types.MediaConfig\u003e, IDeepCloneable\u003cServingConfig.Types.MediaConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class ServingConfig.Types.MediaConfig.\n\nSpecifies the configurations needed for Media Discovery. Currently we\nsupport:\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\\]\\[google.cloud.discoveryengine.v1beta.SolutionType\\] is \\[SOLUTION_TYPE_RECOMMENDATION\\]\\[google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServingConfig.Types.MediaConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ServingConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ServingConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ServingConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### MediaConfig()\n\n public MediaConfig()\n\n### MediaConfig(MediaConfig)\n\n public MediaConfig(ServingConfig.Types.MediaConfig other)\n\nProperties\n----------\n\n### ContentFreshnessCutoffDays\n\n public int ContentFreshnessCutoffDays { get; set; }\n\nSpecifies the content freshness used for recommendation result.\nContents will be demoted if contents were published for more than content\nfreshness cutoff days.\n\n### ContentWatchedPercentageThreshold\n\n public float ContentWatchedPercentageThreshold { get; set; }\n\nSpecifies the content watched percentage threshold for demotion.\nThreshold value must be between \\[0, 1.0\\] inclusive.\n\n### ContentWatchedSecondsThreshold\n\n public float ContentWatchedSecondsThreshold { get; set; }\n\nSpecifies the content watched minutes threshold for demotion.\n\n### DemoteContentWatchedCase\n\n public ServingConfig.Types.MediaConfig.DemoteContentWatchedOneofCase DemoteContentWatchedCase { get; }\n\n### DemoteContentWatchedPastDays\n\n public int DemoteContentWatchedPastDays { get; set; }\n\nOptional. Specifies the number of days to look back for demoting watched\ncontent. If set to zero or unset, defaults to the maximum of 365 days.\n\n### DemotionEventType\n\n public string DemotionEventType { get; set; }\n\nSpecifies the event type used for demoting recommendation result.\nCurrently supported values:\n\n- `view-item`: Item viewed.\n- `media-play`: Start/resume watching a video, playing a song, etc.\n- `media-complete`: Finished or stopped midway through a video, song, etc.\n\nIf unset, watch history demotion will not be applied. Content freshness\ndemotion will still be applied.\n\n### HasContentWatchedPercentageThreshold\n\n public bool HasContentWatchedPercentageThreshold { get; }\n\nGets whether the \"content_watched_percentage_threshold\" field is set\n\n### HasContentWatchedSecondsThreshold\n\n public bool HasContentWatchedSecondsThreshold { get; }\n\nGets whether the \"content_watched_seconds_threshold\" field is set"]]