NativeMarkupRequestObject

@objc(PBMNativeMarkupRequestObject)
@objcMembers
public class NativeMarkupRequestObject : NSObject, NSCopying, PBMJsonCodable

Represents a request object for native markup, including details about the ad’s context, placement, and supported features.

  • [Recommended] [Integer] The context in which the ad appears. See NativeContextType

    Declaration

    Swift

    public var context: ContextType?
  • [Integer] A more detailed context in which the ad appears. See NativeContextSubtype

    Declaration

    Swift

    public var contextsubtype: ContextSubType?
  • [Recommended] [Integer] The design/format/layout of the ad unit being offered. See NativePlacementType

    Declaration

    Swift

    public var plcmttype: PlacementType?
  • [Integer] The number of identical placements in this Layout. Refer Section 8.1 Multiplacement Bid Requests for further detail.

    Declaration

    Swift

    public var plcmtcnt: Int
  • seq

    [Integer] 0 for the first ad, 1 for the second ad, and so on. Note this would generally NOT be used in combination with plcmtcnt - either you are auctioning multiple identical placements (in which case plcmtcnt>1, seq=0) or you are holding separate auctions for distinct items in the feed (in which case plcmtcnt=1, seq=>=1)

    Declaration

    Swift

    public var seq: Int
  • [Required] An array of Asset Objects. Any objects bid response must comply with the array of elements expressed in the bid request.

    Declaration

    Swift

    public var assets: [NativeAsset]?
  • [Integer] Whether the supply source / impression supports returning an assetsurl instead of an asset object. 0 or the absence of the field indicates no such support.

    Declaration

    Swift

    public var aurlsupport: Int
  • [Integer] Whether the supply source / impression supports returning a dco url instead of an asset object. 0 or the absence of the field indicates no such support. Beta feature.

    Declaration

    Swift

    public var durlsupport: Int
  • Specifies what type of event objects tracking is supported - see Event Trackers Request Object

    Declaration

    Swift

    public var eventtrackers: [NativeEventTracker]?
  • [Recommended] [Integer] Set to 1 when the native ad supports buyer-specific privacy notice. Set to 0 (or field absent) when the native ad doesn’t support custom privacy links or if support is unknown.

    Declaration

    Swift

    public var privacy: Int
  • ext

    This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification

    Declaration

    Swift

    public var ext: [String : Any]?
  • Initializes a NativeMarkupRequestObject with default values.

    Declaration

    Swift

    public override init()

NSCopying

  • Creates a copy of the current NativeMarkupRequestObject instance.

    Declaration

    Swift

    public func copy(with zone: NSZone? = nil) -> Any

    Parameters

    zone

    An optional zone for the copy operation.

    Return Value

    A copy of the NativeMarkupRequestObject instance.

PBMJsonCodable

  • Converts the NativeMarkupRequestObject instance to a JSON dictionary.

    Declaration

    Swift

    public var jsonDictionary: [String : Any]? { get }

    Return Value

    A dictionary representation of the NativeMarkupRequestObject instance.

  • Converts the NativeMarkupRequestObject instance to a JSON string.

    Throws

    An error if the conversion to JSON string fails.

    Declaration

    Swift

    public func toJsonString() throws -> String

    Return Value

    A JSON string representation of the NativeMarkupRequestObject instance.