# MediationAdConfiguration


```
public abstract class MediationAdConfiguration
```

<br />

Known direct subclasses [MediationAppOpenAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationAppOpenAdConfiguration.md.txt), [MediationBannerAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationBannerAdConfiguration.md.txt), [MediationInterstitialAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationInterstitialAdConfiguration.md.txt), [MediationNativeAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationNativeAdConfiguration.md.txt), [MediationRewardedAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationRewardedAdConfiguration.md.txt), [MediationSwipeableInterstitialAdConfiguration](https://developers.google.com/ad-manager/mobile-ads-sdk/android/next-gen/reference/com/google/android/gms/ads/mediation/MediationSwipeableInterstitialAdConfiguration.md.txt)

|---|---|
| `MediationAppOpenAdConfiguration` | Data used to render mediation app open ads. |
| `MediationBannerAdConfiguration` | Data used to render mediation banner ads. |
| `MediationInterstitialAdConfiguration` | Data used to render mediation interstitial ads. |
| `MediationNativeAdConfiguration` | Data used to render mediation native ads. |
| `MediationRewardedAdConfiguration` | Data used to render mediation rewarded ads. |
| `MediationSwipeableInterstitialAdConfiguration` | Data used to render mediation swipeable interstitial ads. |

*** ** * ** ***

Data used to render mediation ads.

## Summary

| ### Nested types |
|---|
| `@Retention(value = AnnotationRetention.SOURCE) @IntDef(value = [0, 1, -1]) public annotation MediationAdConfiguration.TagForChildDirectedTreatment` Tag for child directed treatment. |

| ### Public constructors |
|---|
| `MediationAdConfiguration( @NonNull Context context, @NonNull String bidResponse, @NonNull Bundle serverParameters, @NonNull Bundle mediationExtras, boolean isTesting, Location location, @MediationAdConfiguration.TagForChildDirectedTreatment int taggedForChildDirectedTreatment, @RequestConfiguration.TagForUnderAgeOfConsent int taggedForUnderAgeTreatment, String maxAdContentRating, @NonNull String watermark )` |

| ### Public methods |
|---|---|
| `@NonNull String` | `getBidResponse()` The encrypted data from the third party server containing information the third party SDK needs to render an ad. |
| `@NonNull Context` | `getContext()` The context passed by this publisher for this specific request. |
| `Location` | `getLocation()` Specifies the android provided location for an ad. |
| `String` | `getMaxAdContentRating()` The maximum ad content rating for this request. |
| `@NonNull Bundle` | `getMediationExtras()` Additional parameters passed in by the publisher for this specific request. |
| `@NonNull Bundle` | `getServerParameters()` Additional parameters defined by the publisher on the mediation server side. |
| `int` | `getTaggedForChildDirectedTreatment()` Indicates that the app is to be treated as child-directed for purposes of the [Children's Online Privacy Protection Act (COPPA)](https://www.ftc.gov/business-guidance/privacy-security/childrens-privacy). |
| `int` | `getTaggedForUnderAgeTreatment()` The publisher indicated that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent, if defined by the @see `com.google.android.libraries.ads.mobile.sdk.common.RequestConfiguration`. |
| `@NonNull String` | `getWatermark()` A base64-encoded watermark PNG file that identifies the source of the ad. |
| `final @NonNull View` | `getWatermarkView(@NonNull Context context)` Returns a view with a tiled watermark. |
| `final boolean` | `isTestRequest()` |
| `boolean` | `isTesting()` Specifies if publisher is asking for a test ad. |
| `final int` | `@MediationAdConfiguration.TagForChildDirectedTreatment taggedForChildDirectedTreatment()` |
| `final int` | `@RequestConfiguration.TagForUnderAgeOfConsent taggedForUnderAgeTreatment()` |

## Public constructors

### MediationAdConfiguration

```
public MediationAdConfiguration(
    @NonNull Context context,
    @NonNull String bidResponse,
    @NonNull Bundle serverParameters,
    @NonNull Bundle mediationExtras,
    boolean isTesting,
    Location location,
    @MediationAdConfiguration.TagForChildDirectedTreatment int taggedForChildDirectedTreatment,
    @RequestConfiguration.TagForUnderAgeOfConsent int taggedForUnderAgeTreatment,
    String maxAdContentRating,
    @NonNull String watermark
)
```

## Public methods

### getBidResponse

```
public @NonNull String getBidResponse()
```

The encrypted data from the third party server containing information the third party SDK needs to render an ad.

### getContext

```
public @NonNull Context getContext()
```

The context passed by this publisher for this specific request.

### getLocation

```
public Location getLocation()
```

Specifies the android provided location for an ad.

### getMaxAdContentRating

```
public String getMaxAdContentRating()
```

The maximum ad content rating for this request. This content rating is the more conservative rating between the publisher-specified rating in the @see `com.google.android.libraries.ads.mobile.sdk.common.RequestConfiguration`, or the app rating provided by Google's ad server.

### getMediationExtras

```
public @NonNull Bundle getMediationExtras()
```

Additional parameters passed in by the publisher for this specific request.

### getServerParameters

```
public @NonNull Bundle getServerParameters()
```

Additional parameters defined by the publisher on the mediation server side.

### getTaggedForChildDirectedTreatment

```
public int getTaggedForChildDirectedTreatment()
```

Indicates that the app is to be treated as child-directed for purposes of the [Children's Online Privacy Protection Act (COPPA)](https://www.ftc.gov/business-guidance/privacy-security/childrens-privacy).

### getTaggedForUnderAgeTreatment

```
public int getTaggedForUnderAgeTreatment()
```

The publisher indicated that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent, if defined by the @see `com.google.android.libraries.ads.mobile.sdk.common.RequestConfiguration`. This feature is designed to help facilitate compliance with the [General Data Protection Regulation (GDPR)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679).

### getWatermark

```
public @NonNull String getWatermark()
```

A base64-encoded watermark PNG file that identifies the source of the ad. Notes: This is for Open Bidding only.

### getWatermarkView

```
public final @NonNull View getWatermarkView(@NonNull Context context)
```

Returns a view with a tiled watermark. This view is used to identify the source of an ad, and must be placed on top of your ad view.

### isTestRequest

```
public final boolean isTestRequest()
```

### isTesting

```
public boolean isTesting()
```

Specifies if publisher is asking for a test ad.

### taggedForChildDirectedTreatment

```
@MediationAdConfiguration.TagForChildDirectedTreatment
public final int taggedForChildDirectedTreatment()
```

### taggedForUnderAgeTreatment

```
@RequestConfiguration.TagForUnderAgeOfConsent
public final int taggedForUnderAgeTreatment()
```