# interface IAdModel

#### package com.turner.top.sdk.common.ads.models

Represents the ads player model

### Methods

###

`duration ():ApiTimeValue`

The length of the active ad

###

`events ():AdModelEvents`

Ad model events collection

###

`init (?providerModel:IAdProviderModel, ?consumerModel:IAdConsumerModel):IAdModel`

Initialize the ads model

Parameters:

`providerModel` | A provider model to use
`consumerModel` | A consumer model to use

###

`muted ():Bool`

Whether the active ad is muted or not

###

`request ():AdRequest`

The data sent to the ads server

###

`requestError ():String`

The ad request error message if there is an issue with the ad request

###

`requestState ():AdProviderState`

The current state of the ad request

###

`response ():AdResponse`

Data received from the ads server

###

`setConsumerModel (consumerModel:IAdConsumerModel):IAdModel`

Set the consumer model

Parameters:

`consumerModel` | The model of the consumer

###

`setProviderModel (providerModel:IAdProviderModel):IAdModel`

Set the provider model

Parameters:

`providerModel` | The model of the provider

###

`state ():AdConsumerState`

The current state of the ad consumer

###

`time ():ApiTimeValue`

The playhead position of the active ad

###

`toData ():AdModelData`

Get the model data

###

`type ():AdType`

The type of the active ad

###

`volume ():ApiVolumeValue`

The current volume level for the ads engine