commit | author | age
|
96fe76
|
1 |
// |
L |
2 |
// GADResponseInfo.h |
|
3 |
// Google Mobile Ads SDK |
|
4 |
// |
|
5 |
// Copyright 2019-2021 Google LLC. All rights reserved. |
|
6 |
// |
|
7 |
|
|
8 |
#import <Foundation/Foundation.h> |
|
9 |
#import <GoogleMobileAds/GoogleMobileAdsDefines.h> |
|
10 |
|
|
11 |
/// Response metadata for an individual ad network in an ad response. |
|
12 |
@interface GADAdNetworkResponseInfo : NSObject |
|
13 |
|
|
14 |
/// A class name that identifies the ad network. |
|
15 |
@property(nonatomic, readonly, nonnull) NSString *adNetworkClassName; |
|
16 |
|
|
17 |
/// Network configuration set on the AdMob UI. |
|
18 |
@property(nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *adUnitMapping; |
|
19 |
|
|
20 |
/// The ad source name associated with this ad network response. Nil if the ad server does not |
|
21 |
/// populate this field. |
|
22 |
@property(nonatomic, readonly, nullable) NSString *adSourceName; |
|
23 |
|
|
24 |
/// The ad source ID associated with this ad network response. Nil if the ad server does not |
|
25 |
/// populate this field. |
|
26 |
@property(nonatomic, readonly, nullable) NSString *adSourceID; |
|
27 |
|
|
28 |
/// The ad source instance name associated with this ad network response. Nil if the ad server does |
|
29 |
/// not populate this field. |
|
30 |
@property(nonatomic, readonly, nullable) NSString *adSourceInstanceName; |
|
31 |
|
|
32 |
/// The ad source instance ID associated with this ad network response. Nil if the ad server does |
|
33 |
/// not populate this field. |
|
34 |
@property(nonatomic, readonly, nullable) NSString *adSourceInstanceID; |
|
35 |
|
|
36 |
/// Error associated with the request to the network. Nil if the network successfully loaded an ad |
|
37 |
/// or if the network was not attempted. |
|
38 |
@property(nonatomic, readonly, nullable) NSError *error; |
|
39 |
|
|
40 |
/// Amount of time the ad network spent loading an ad. 0 if the network was not attempted. |
|
41 |
@property(nonatomic, readonly) NSTimeInterval latency; |
|
42 |
|
|
43 |
/// JSON-safe dictionary representation of the ad network response info. |
|
44 |
@property(nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *dictionaryRepresentation; |
|
45 |
|
|
46 |
@end |
|
47 |
|
|
48 |
/// Ad network class name for ads returned from Google's ad network. |
|
49 |
FOUNDATION_EXPORT NSString *_Nonnull const GADGoogleAdNetworkClassName; |
|
50 |
|
|
51 |
/// Ad network class name for custom event ads. |
|
52 |
FOUNDATION_EXPORT NSString *_Nonnull const GADCustomEventAdNetworkClassName; |
|
53 |
|
|
54 |
/// Key into NSError.userInfo mapping to a GADResponseInfo object. When ads fail to load, errors |
|
55 |
/// returned contain an instance of GADResponseInfo. |
|
56 |
FOUNDATION_EXPORT NSString *_Nonnull GADErrorUserInfoKeyResponseInfo; |
|
57 |
|
|
58 |
/// Information about a response to an ad request. |
|
59 |
@interface GADResponseInfo : NSObject |
|
60 |
|
|
61 |
/// Unique identifier of the ad response. |
|
62 |
@property(nonatomic, readonly, nullable) NSString *responseIdentifier; |
|
63 |
|
|
64 |
/// Dictionary of extra parameters that may be returned in an ad response. |
|
65 |
@property(nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *extrasDictionary; |
|
66 |
|
|
67 |
/// The GADAdNetworkResponseInfo corresponding to the adapter that was used to load the ad. Nil if |
|
68 |
/// the ad failed to load. |
|
69 |
@property(nonatomic, readonly, nullable) GADAdNetworkResponseInfo *loadedAdNetworkResponseInfo; |
|
70 |
|
|
71 |
/// Array of metadata for each ad network included in the response. |
|
72 |
@property(nonatomic, readonly, nonnull) NSArray<GADAdNetworkResponseInfo *> *adNetworkInfoArray; |
|
73 |
|
|
74 |
/// JSON-safe dictionary representation of the response info. |
|
75 |
@property(nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *dictionaryRepresentation; |
|
76 |
|
|
77 |
@end |