# CmcdConfiguration.RequestConfig

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/upstream/CmcdConfiguration.java+class:androidx.media3.exoplayer.upstream.CmcdConfiguration.RequestConfig)

*** ** * ** ***

<br />

```
interface CmcdConfiguration.RequestConfig
```

<br />

*** ** * ** ***

Represents configuration which can vary on each request.

Implementations must not make assumptions about which thread called their methods; and must be thread-safe.

## Summary

| ### Public functions |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableListMultimap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.RequestConfig#getCustomData()()` Retrieves the custom data associated with CMCD logging. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.RequestConfig#getRequestedMaximumThroughputKbps(int)(throughputKbps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the maximum throughput requested in kbps, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RATE_UNSET_INT()` if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.RequestConfig#isKeyAllowed(java.lang.String)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.CmcdKey key: @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.CmcdKey https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html! )` Checks whether the specified key is allowed in CMCD logging. |

## Public functions

### getCustomData

```
fun getCustomData(): ImmutableListMultimap<String!, String!>!
```

Retrieves the custom data associated with CMCD logging.

By default, no custom data is provided.

The data payload consists of a series of key/value pairs constructed according to the following rules:

- Custom keys SHOULD be allocated to one of the four defined header names defined in the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.HeaderKey` annotation.
- All information in the payload MUST be represented as key=value pairs.
- The key and value MUST be separated by an equals sign. If the value type is boolean and the value is `true`, then the equals sign and the value MUST be omitted.
- The key names are case-sensitive and reserved. Custom key names MUST carry a hyphenated prefix to ensure no namespace collision with future revisions to Common Media Client Data (CMCD) specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.
- Any value of type String MUST be enclosed by opening and closing double quotes. Double quotes and backslashes MUST be escaped using a backslash "\\" character. Any value that is not of type string does not require quoting.

**Note:** The key words MUST and SHOULD are to be interpreted as described in RFC 2119.

Example:

- CMCD-Request:custom-field1=25400
- CMCD-Object:custom-field2=3200,custom-field3=4004,custom-field4=v,custom-field5=6000
- CMCD-Status:custom-field6,custom-field7=15000
- CMCD-Session:custom-field8="stringValue"

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableListMultimap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | An `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableListMultimap.html` containing the custom data. |

### getRequestedMaximumThroughputKbps

```
fun getRequestedMaximumThroughputKbps(throughputKbps: Int): Int
```

Returns the maximum throughput requested in kbps, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RATE_UNSET_INT()` if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream.

| Parameters |
|---|---|
| `throughputKbps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The throughput in kbps of the audio or video object being requested. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The maximum throughput requested in kbps. |

### isKeyAllowed

```
fun isKeyAllowed(
    @CmcdConfiguration.CmcdKey key: @CmcdConfiguration.CmcdKey String!
): Boolean
```

Checks whether the specified key is allowed in CMCD logging. By default, all keys are allowed.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.CmcdKey key: @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/CmcdConfiguration.CmcdKey https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The key to check. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the key is allowed. |