# AdFormat

# AdFormat


```
public enum AdFormat
```

<br />

*** ** * ** ***

Format of the ad being requested.

## Summary

| ### Enum Values |
|---|---|
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#APP_OPEN_AD` | App open ad format. |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#BANNER` | Banner ad format. |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#INTERSTITIAL` | Interstitial ad format. |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#NATIVE` | Native ad format. |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#REWARDED` | Rewarded ad format. |
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#REWARDED_INTERSTITIAL` | Rewarded interstitial ad format. |

| ### Public fields |
|---|---|
| `final int` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#value()` |

| ### Public methods |
|---|---|
| `static @https://developer.android.com/reference/javax/annotation/Nullable.html https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#getAdFormat(int)(int adType)` Gets the `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat` from an integer value. |
| `int` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#getValue()()` Gets the integer value of the ad format. |
| `static https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` Returns the enum constant of this type with the specified name. |
| `static AdFormat[]` | `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat#values()()` Returns an array containing the constants of this enum type, in the order they're declared. |

## Enum Values

### APP_OPEN_AD

```
AdFormat AdFormat.APP_OPEN_AD
```

App open ad format.

### BANNER

```
AdFormat AdFormat.BANNER
```

Banner ad format.

### INTERSTITIAL

```
AdFormat AdFormat.INTERSTITIAL
```

Interstitial ad format.

### NATIVE

```
AdFormat AdFormat.NATIVE
```

Native ad format.

### REWARDED

```
AdFormat AdFormat.REWARDED
```

Rewarded ad format.

### REWARDED_INTERSTITIAL

```
AdFormat AdFormat.REWARDED_INTERSTITIAL
```

Rewarded interstitial ad format.

## Public fields

### value

```
public final int value
```

## Public methods

### getAdFormat

```
public static @Nullable AdFormat getAdFormat(int adType)
```

Gets the `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat` from an integer value.

### getValue

```
public int getValue()
```

Gets the integer value of the ad format.

### valueOf

```
public static AdFormat valueOf(String name)
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Returns |
|---|---|
| `https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdFormat` | the enum constant with the specified name |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if this enum type has no constant with the specified name |

### values

```
public static AdFormat[] values()
```

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

| Returns |
|---|---|
| `AdFormat[]` | an array containing the constants of this enum type, in the order they're declared |