# Discovery Engine v1beta API - Class ServingConfig.Types.MediaConfig (1.0.0-beta23)

1.0.0-beta23 (latest) 1.0.0-beta22

    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\].

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ServingConfig.Types.MediaConfig

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ServingConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](https://docs.cloud.google.com/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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](https://docs.cloud.google.com/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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types)[MediaConfig](https://docs.cloud.google.com/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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DiscoveryEngine.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Constructors

### MediaConfig()

    public MediaConfig()

### MediaConfig(MediaConfig)

    public MediaConfig(ServingConfig.Types.MediaConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig` |

## Properties

### ContentFreshnessCutoffDays

    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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### ContentWatchedPercentageThreshold

    public float ContentWatchedPercentageThreshold { get; set; }

Specifies the content watched percentage threshold for demotion.
Threshold value must be between \[0, 1.0\] inclusive.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### ContentWatchedSecondsThreshold

    public float ContentWatchedSecondsThreshold { get; set; }

Specifies the content watched minutes threshold for demotion.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### DemoteContentWatchedCase

    public ServingConfig.Types.MediaConfig.DemoteContentWatchedOneofCase DemoteContentWatchedCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ServingConfig.Types.MediaConfig.DemoteContentWatchedOneofCase` |   |

### DemoteContentWatchedPastDays

    public int DemoteContentWatchedPastDays { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### DemotionEventType

    public string DemotionEventType { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasContentWatchedPercentageThreshold

    public bool HasContentWatchedPercentageThreshold { get; }

Gets whether the "content_watched_percentage_threshold" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasContentWatchedSecondsThreshold

    public bool HasContentWatchedSecondsThreshold { get; }

Gets whether the "content_watched_seconds_threshold" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |