Package com.pubmatic.sdk.nativead
Class POBNativeBuilder
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.openwrap.core.POBNative
public class POBNativeBuilder implements POBNativeModel class to build Native Impression This class holds the information of native impression. It is required to pass the impression level information in bid request for native ad.
-
-
Field Summary
Fields Modifier and Type Field Description public final List<POBBaseNativeRequestAsset>assetspublic final List<POBNativeRequestEventTracker>eventTrackerspublic final Set<Integer>supportedAPIspublic POBNativeAdLoaderConfigconfig
-
Constructor Summary
Constructors Constructor Description POBNativeBuilder(List<POBBaseNativeRequestAsset> assets, List<POBNativeRequestEventTracker> eventTrackers, Set<Integer> supportedAPIs)Helps to create the POBNativeBuilder object
-
Method Summary
Modifier and Type Method Description List<POBBaseNativeRequestAsset>getAssets()Getter for the assets List<POBNativeRequestEventTracker>getEventTrackers()Getter for the eventTrackers Set<Integer>getSupportedAPIs()Getter for the supportedAPIs POBNativeAdLoaderConfiggetConfig()Getter of the POBNativeAdLoaderConfig voidsetConfig(@NonNull() POBNativeAdLoaderConfig config)Setter for the POBNativeAdLoaderConfig JSONObjectgetRTBJson()-
-
Constructor Detail
-
POBNativeBuilder
POBNativeBuilder(List<POBBaseNativeRequestAsset> assets, List<POBNativeRequestEventTracker> eventTrackers, Set<Integer> supportedAPIs)
Helps to create the POBNativeBuilder object- Parameters:
assets- list of the assetseventTrackers- event tracker list
-
-
Method Detail
-
getAssets
@NonNull() List<POBBaseNativeRequestAsset> getAssets()
Getter for the assets
- Returns:
return the list of the assets
-
getEventTrackers
@NonNull() List<POBNativeRequestEventTracker> getEventTrackers()
Getter for the eventTrackers
- Returns:
list of eventTrackers
-
getSupportedAPIs
@NonNull() Set<Integer> getSupportedAPIs()
Getter for the supportedAPIs
- Returns:
set of APIs
-
getConfig
@Nullable() POBNativeAdLoaderConfig getConfig()
Getter of the POBNativeAdLoaderConfig
- Returns:
config
-
setConfig
void setConfig(@NonNull() POBNativeAdLoaderConfig config)
Setter for the POBNativeAdLoaderConfig
- Parameters:
config- Instance of POBNativeAdLoaderConfig
-
getRTBJson
@NonNull() JSONObject getRTBJson()
- Returns:
JSON of format: { "request": "{\"ver\":\"1.2\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":2,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"data\":{\"type\":12,\"len\":90}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"privacy\":1}", "ver": "1.2", "api": [ 7 ] }
-
-
-
-