Package com.castlabs.android.adverts

# Class Ad

java.lang.Object
com.castlabs.android.adverts.Ad

public class Ad extends Object
Ad container.

Since:
  3.2.2

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Uri`
  `adAssetUri`
  Ad Asset Uri
  `final AdPodData`
  `adPod`
  Information related to the adPod this Ad belongs to
  `Uri`
  `adTagUri`
  Ad Tag Uri
  `int`
  `bitrate`
  The Ad bitrate in bits per second
  `String`
  `clickthroughUrl`
  Ad clickthrough URL
  `long`
  `durationMs`
  Ad duration in milliseconds or `C.TIME_UNSET`
  `String`
  `id`
  Ad Id
  `boolean`
  `isSkippable`
  Returns whether the Ad is Skippable
  `boolean`
  `isUiDisabled`
  Returns whether the Ad IMA UI is disabled
  `int`
  `playerType`
  Player type
  `int`
  `position`
  Ad position in the stream, one of `SdkConsts.AdPosition`
  `long`
  `positionMs`
  Ad position in milliseconds within the window in case of `SdkConsts.AD_EMBEDDED` stream type or `C.TIME_UNSET`
  `double`
  `skipTimeOffset`
  The number of seconds of playback before the ad becomes skippable.
  `int`
  `streamType`
  Stream type
  `String`
  `title`
  Ad title

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Ad()`
  Default constructor for Ad.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### position

    public int position
    Ad position in the stream, one of `SdkConsts.AdPosition`

  - ### durationMs

    public long durationMs
    Ad duration in milliseconds or `C.TIME_UNSET`

  - ### positionMs

    public long positionMs
    Ad position in milliseconds within the window in case of `SdkConsts.AD_EMBEDDED` stream type or `C.TIME_UNSET`

  - ### id

    @Nullable public String id
    Ad Id

  - ### title

    @Nullable public String title
    Ad title

  - ### clickthroughUrl

    @Nullable public String clickthroughUrl
    Ad clickthrough URL

  - ### adTagUri

    @Nullable public Uri adTagUri
    Ad Tag Uri

  - ### adAssetUri

    @Nullable public Uri adAssetUri
    Ad Asset Uri

  - ### streamType

    public int streamType
    Stream type

  - ### playerType

    public int playerType
    Player type

  - ### skipTimeOffset

    public double skipTimeOffset
    The number of seconds of playback before the ad becomes skippable.

  - ### bitrate

    public int bitrate
    The Ad bitrate in bits per second

  - ### isSkippable

    public boolean isSkippable
    Returns whether the Ad is Skippable

  - ### isUiDisabled

    public boolean isUiDisabled
    Returns whether the Ad IMA UI is disabled

  - ### adPod

    @NonNull public final AdPodData adPod
    Information related to the adPod this Ad belongs to

- ## Constructor Details

  - ### Ad

    public Ad()
    Default constructor for Ad.

- ## Method Details

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`