# RequestConfiguration


```
class RequestConfiguration
```

<br />

*** ** * ** ***

Global configuration that will be used for every `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AdRequest`.

## Summary

| ### Nested types |
|---|
| `class https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder` Builder for `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration`. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/androidx/annotation/StringDef.html(value = ) annotation https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.MaxAdContentRating` Allowed constants for `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder#setMaxAdContentRating(java.lang.String)`. |
| `enum https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.PublisherPrivacyPersonalizationState` Publisher privacy treatment personalization states. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/androidx/annotation/IntDef.html(value = ) annotation https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.TagForChildDirectedTreatment` **This annotation is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder#setAgeRestrictedTreatment(com.google.android.gms.ads.AgeRestrictedTreatment)` instead. <br /> |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/androidx/annotation/IntDef.html(value = ) annotation https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.TagForUnderAgeOfConsent` **This annotation is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder#setAgeRestrictedTreatment(com.google.android.gms.ads.AgeRestrictedTreatment)` instead. <br /> |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#MAX_AD_CONTENT_RATING_G() = "G"` Content suitable for general audiences, including families. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#MAX_AD_CONTENT_RATING_MA() = "MA"` Content suitable only for mature audiences. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#MAX_AD_CONTENT_RATING_PG() = "PG"` Content suitable for most audiences with parental guidance. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#MAX_AD_CONTENT_RATING_T() = "T"` Content suitable for teen and older audiences. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#MAX_AD_CONTENT_RATING_UNSPECIFIED() = ""` No specified content rating. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE() = 0` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead. <br /> |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE() = 1` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#CHILD` instead. <br /> |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED() = -1` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead. <br /> |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE() = 0` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead. <br /> |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE() = 1` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#CHILD` instead. <br /> |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED() = -1` **This property is deprecated.** Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead. <br /> |

| ### Public functions |
|---|---|
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#toBuilder()()` Returns a `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder` with values from this `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration`. |

| ### Public properties |
|---|---|
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment?` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#ageRestrictedTreatment()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#maxAdContentRating()` |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.PublisherPrivacyPersonalizationState!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#publisherPrivacyPersonalizationState()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#tagForChildDirectedTreatment()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#tagForUnderAgeOfConsent()` |
| `(https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!>!` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration#testDeviceIds()` |

## Constants

### MAX_AD_CONTENT_RATING_G

```
const val MAX_AD_CONTENT_RATING_G = "G": String!
```

Content suitable for general audiences, including families.

### MAX_AD_CONTENT_RATING_MA

```
const val MAX_AD_CONTENT_RATING_MA = "MA": String!
```

Content suitable only for mature audiences.

### MAX_AD_CONTENT_RATING_PG

```
const val MAX_AD_CONTENT_RATING_PG = "PG": String!
```

Content suitable for most audiences with parental guidance.

### MAX_AD_CONTENT_RATING_T

```
const val MAX_AD_CONTENT_RATING_T = "T": String!
```

Content suitable for teen and older audiences.

### MAX_AD_CONTENT_RATING_UNSPECIFIED

```
const val MAX_AD_CONTENT_RATING_UNSPECIFIED = "": String!
```

No specified content rating.

### TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

```
const val TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE = 0: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead.

Indicates that ad requests should not be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA).

### TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

```
const val TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE = 1: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#CHILD` instead.

Indicates that ad requests should be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA).

### TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

```
const val TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED = -1: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead.

Provides no indication whether ad requests should be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA).

### TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE

```
const val TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE = 0: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead.

Indicates the publisher specified that the ad request should not receive treatment for users in the European Economic Area (EEA) under the age of consent.

### TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE

```
const val TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE = 1: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#CHILD` instead.

Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

### TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED

```
const val TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED = -1: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/AgeRestrictedTreatment#UNSPECIFIED` instead.

Indicates that the publisher has not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

## Public functions

### toBuilder

```
fun toBuilder(): RequestConfiguration.Builder!
```

Returns a `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration.Builder` with values from this `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/kotlin/com/google/android/gms/ads/RequestConfiguration`.

## Public properties

### ageRestrictedTreatment

```
val ageRestrictedTreatment: AgeRestrictedTreatment?
```

### maxAdContentRating

```
val maxAdContentRating: String?
```

### publisherPrivacyPersonalizationState

```
val publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState!
```

### tagForChildDirectedTreatment

```
val tagForChildDirectedTreatment: Int
```

### tagForUnderAgeOfConsent

```
val tagForUnderAgeOfConsent: Int
```

### testDeviceIds

```
val testDeviceIds: (Mutable)List<String!>!
```