Builder
@objc(AASDKAdswizzAdRequestBuilder)
public class Builder : NSObject, IdentifiableBuilder class for AdRequest.
- 
                  
                  The unique identifier for this Builder.DeclarationSwift public let objectId: UUID
- 
                  
                  The HTTP protocol. The default is .https.DeclarationSwift @objc public func with(httpProtocol: HTTPProtocol) -> BuilderParametershttpProtocolHTTP protocol Return Valuethe same builder object 
- 
                  
                  Set VAST version. As of AdswizzSDK v7.12.0, the default is 4.1. DeclarationSwift @objc public func with(vastVersion: VASTVersion) -> BuilderParametersvastVersionvastVersion description Return Valuethe same builder object 
- 
                  
                  Set a single zone to the builder. DeclarationSwift @objc public func with(zone: AdswizzAdZone) -> BuilderParameterszonea single zone description Return Valuethe same builder object 
- 
                  
                  Set one or more zones on which the request will be made. Mandatory. Note that the order of the zones will be used by the Adswizz ad server during ad selection. For a single AdswizzAdZone, consider usingwith(zone:)instead.DeclarationSwift @objc public func with(zones: [AdswizzAdZone]) -> BuilderParameterszoneszone descriptions Return Valuethe same builder object 
- 
                  
                  Set the configuration for “shim” ads. Optional. By specifying an AdswizzShimZone, the request will append the shims configuration to the list of zones and instruct the Adswizz AdServer to pad the adpod as necesarry to fulfill the duration requirement. e.g For livestream ad replacement use-case, the total duration of returned ads in the ad pod should be at least the requested size, not less. “shim” ads are used to pad as needed and to fill up any gaps in duration.DeclarationSwift @objc public func with(shim: AdswizzShimZone) -> BuilderParametersshimconfiguration for the “shim” ads Return Valuethe same builder object 
- 
                  
                  Set the maximum total duration of ads to be selected, in seconds. Optional. DeclarationSwift @objc public func with(duration: TimeInterval) -> BuilderParametersdurationnon-zero duration description in seconds Return Valuethe same builder object 
- 
                  
                  Set the zone alias referencing an external zone. Optional. DeclarationSwift @objc public func with(zoneAlias: String) -> BuilderParameterszoneAliaszoneAlias description Return Valuethe same builder object 
- 
                  
                  Set the companion zone ids. Optional. Deprecated from v7.12.0 and up. Use with(companionZoneIds: [Int])instead. Alternatively, consider usingwith(companionZoneAliases: [String])if you need to set strings (non numerical values) as companion zones identifier. Contact your Technical Account Manager for more details.DeclarationSwift @available(*, deprecated, message: "Please use either .with(companionZoneIds: [Int]﹚ or .with(companionZoneAliases: [String]﹚ to set the companion zones on the request.") @objc public func with(companionZones: String?) -> BuilderParameterscompanionZonesa string which represents a comma separated list of numerical values (CSV format) Return Valuethe same builder object 
- 
                  
                  Set the companion zone ids. Optional. Note that it is mutually exclusive with with(companionZoneAliases: [String]). Use one or the other, not both, otherwise the Builder will throw an error.DeclarationSwift @objc public func with(companionZoneIds: [Int]) -> BuilderParameterscompanionZoneIdscompanion zones identifiers with a list of (numerical) ids Return Valuesame builder object 
- 
                  
                  Set the companion zone aliases. Optional. Note that it is mutually exclusive with with(companionZoneIds: [Int]). Use one or the other, not both, otherwise the Builder will throw an error.DeclarationSwift @objc public func with(companionZoneAliases: [String]) -> BuilderParameterscompanionZoneAliasescompanion zones identifiers with a list of aliases Return Valuesame builder object 
- 
                  
                  Set the tags used for requesting the ads. Optional. DeclarationSwift @objc public func with(tagsArray: String?) -> BuilderParameterstagsArraystring with tags separated by comma Return Valuethe same builder object 
- 
                  
                  Set a referrer. Optional. DeclarationSwift @objc public func with(referrer: String?) -> BuilderParametersreferrerreferrer description Return Valuethe same builder object 
- 
                  
                  Set the Adswizz ad server. Mandatory. DeclarationSwift @objc public func with(server: String) -> BuilderParametersserverAdswizz server Return Valuethe same builder object. 
- 
                  
                  Set and pass additional custom parameters to AdswizzAdRequest. Optional. Note that it should only be used at the recommendation of AdsWizz. All parameters must be URL encoded.DeclarationSwift @objc public func with(additionalCustomParameters: String?) -> BuilderParametersadditionalCustomParameterscustom parameters with a suggested format of key1=value1&key2=value2Return Valuethe same builder object 
- 
                  
                  Set and pass custom analytics data used for all AnalyticsEvententries. Optional. Must be set before callingbuild().DeclarationSwift @objc public func with(analyticsCustomData: AnalyticsCustomData?) -> BuilderParametersanalyticsCustomDatacustom parameters appended to all AnalyticsEvententriesReturn Valuethe same builder object 
- 
                  
                  Set a TCFv2 string as described by IAB’s Transparency and Consent Framework (TCF). Optional. DeclarationSwift @objc public func with(userConsentV2: String?) -> BuilderParametersuserConsentV2a valid TCFv2 string Return Valuethe same builder object 
- 
                  
                  When setting the maxAdsvalue for anAdswizzAdZone, the Adswizz server will try to respond with that number of ads. However, when it cannot fulfill that request, by settingenableExpectedAdsReportingto true, the SDK will calculate the difference between the number of expected ads (maxAds) and the number of ads from the response and it will determine how many empty ads there are: numberOfEmptyAds = totalMaxAds - adsFromResponseFor each empty AdData, the SDK will fire the error tracking URLs viaadManager(_ adManager: AdManager, ad: AdData, trackingErrorUrls errorCode: VastErrorCode) -> [URL]fromAdManagerDatasource. By default,enableExpectedAdsReportingis set to false.Note that totalMaxAds also takes into account zones that didn’t configure a specific maxAds, in which case every such zone will count as +1 towards the total number of expected ads.DeclarationSwift @objc public func with(enableExpectedAdsReporting: Bool) -> BuilderParametersenableExpectedAdsReportingwhether or not reporting the expected ad count is enabled Return Valuethe same builder object 
- 
                  
                  Builds an AdswizzAdRequestobjectThrows a missing zone ID error if it was not provided, or a server address is missingDeclarationSwift @objc public func build() throws -> AdswizzAdRequestReturn Valuea valid AdswizzAdRequestobject
