NimbusBanner

struct NimbusBanner
extension NimbusBanner : Decodable, Encodable, Equatable

This object represents the most general type of impression. Although the term “banner” may have very specific meaning in other contexts, here it can be many things including a simple static image, an expandable ad unit, or even in-banner video (refer to NimbusImpressionVideo object for the more generalized and full featured video ad units). An array of NimbusImpressionBanner objects can also appear within the video to describe optional companion ads defined in the VAST specification. The presence of a NimbusImpressionBanner as a subordinate of the NimbusImpression object indicates that this impression is offered as a banner type impression. At the publisher’s discretion, that same impression may also be offered as video, audio, and/or native by also including as NimbusImpression subordinates objects of those types. However, any given bid for the impression must conform to one of the offered types. OpenRTB Section 3.2.6

  • Minimum bid for this banner impression expressed in CPM. This value should be equal to or higher than the value set on NimbusImpression.bidFloor.

    Declaration

    Swift

    var bidFloor: Float?
  • Blocked creative attributes

    Declaration

    Swift

    var blockedCreativeAttributes: Set<NimbusCreativeAttribute>?
  • Array of NimbusAdFormat objects representing the banner sizes permitted. If none are specified, then use of the height and width attributes is required.

    Declaration

    Swift

    var formats: Set<NimbusAdFormat>?
  • Exact width in points; required if no NimbusAdFormat objects are specified or if this NimbusImpressionBanner object is configured for a banner size such as 320x50 or 300x50

    Declaration

    Swift

    var width: Int
  • Exact height in points; required if no NimbusAdFormat objects are specified or if this NimbusImpressionBanner object is configured for a banner size such as 320x50 or 300x50

    Declaration

    Swift

    var height: Int
  • List of supported API frameworks for this impression. If an API is not explicitly listed, it is assumed not to be supported.

    Declaration

    Swift

    var supportedApis: Set<NimbusApi>?
  • Ad position on screen

    Declaration

    Swift

    var position: NimbusPosition?
  • Relevant only for Banner objects used with a Video object. Indicates the companion banner rendering mode relative to the associated video

    Declaration

    Swift

    var companionAdRenderMode: NimbusCompanionAdRenderMode?
  • Initializes a NimbusImpression object

    • bidFloor: Minimum bid for this banner impression expressed in CPM. This value should be equal to or higher than the value set on NimbusImpression.bidFloor.
    • blockedCreativeAttributes: Blocked creative attributes
    • formats: Array of NimbusAdFormat objects representing the banner sizes permitted. If none are specified, then use of the height and width attributes is required.
    • width: Exact height in points; required if no NimbusAdFormat objects are specified or if this NimbusImpressionBanner object is configured for a banner size such as 320x50 or 300x50
    • height: Exact height in points; required if no NimbusAdFormat objects are specified or if this NimbusImpressionBanner object is configured for a banner size such as 320x50 or 300x50
    • supportedApis: List of supported API frameworks for this impression. If an API is not explicitly listed, it is assumed not to be supported.
    • position: Ad position on screen
    • companionAdRenderMode: Relevant only for Banner objects used with a Video object in an array of companion ads. Indicates the companion banner rendering mode relative to the associated video

    Declaration

    Swift

    init(bidFloor: Float? = nil, blockedCreativeAttributes: Set<NimbusCreativeAttribute>? = nil, formats: Set<NimbusAdFormat>? = nil, width: Int, height: Int, supportedApis: Set<NimbusApi>? = nil, position: NimbusPosition? = nil, companionAdRenderMode: NimbusCompanionAdRenderMode? = nil)
  • Default configuration for an interstitial ad

    Declaration

    Swift

    static func interstitial() -> NimbusBanner
  • Default configuration for a banner ad

    Declaration

    Swift

    static func banner(format: NimbusAdFormat, adPosition: NimbusPosition) -> NimbusBanner
  • Returns a Boolean value indicating whether two values are not equal.

    Inequality is the inverse of equality. For any values a and b, a != b implies that a == b is false.

    This is the default implementation of the not-equal-to operator (!=) for any type that conforms to Equatable.

    Declaration

    Swift

    static func != (lhs: Self, rhs: Self) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • Creates a new instance by decoding from the given decoder.

    This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

    Declaration

    Swift

    init(from decoder: any Decoder) throws