SearchAdOptions

public final class SearchAdOptions extends Object

Options for initializing the SearchAdController.

Nested Class Summary

@interface SearchAdOptions.AdType Ad types that can be requested. 
class SearchAdOptions.Builder Builds a SearchAdOptions

Constant Summary

int AD_TYPE_PLA_PACK Multiple (pack) product listing ad type.
int AD_TYPE_TEXT Text ad type.
int DEFAULT_NUM_ADS The default number of ads to request at a time.

Public Method Summary

int
getAdType()
Returns the type of ads to request, one of SearchAdOptions.AdType.
String
getAdsafe()
Returns the level of filtering Google will apply to ads matching the query, one of "high", "medium", or "low".
boolean
getAdtest()
Returns whether the request for ads is a test.
String
getChannel()
Returns the channel this ad's performance will be reported under, or an empty string if no channel was provided.
int
getNumAdsRequested()
Returns the number of ads to request at a time.
Boolean
getPersonalizedAds()
Returns whether ads may be personalized for the user, or null if setPersonalizedAds was never called.
boolean
getPrefetch()
Returns whether ads will be pre-fetched in the background from the server when the internal ad buffer runs low.
SearchAdOptions.Builder
toBuilder()
Returns a new builder with the same options set as this SearchAdOptions.

Inherited Method Summary

Constants

public static final int AD_TYPE_PLA_PACK

Multiple (pack) product listing ad type.

Constant Value: 1

public static final int AD_TYPE_TEXT

Text ad type.

Constant Value: 0

public static final int DEFAULT_NUM_ADS

The default number of ads to request at a time.

Constant Value: 8

Public Methods

public int getAdType ()

Returns the type of ads to request, one of SearchAdOptions.AdType.

public String getAdsafe ()

Returns the level of filtering Google will apply to ads matching the query, one of "high", "medium", or "low".

public boolean getAdtest ()

Returns whether the request for ads is a test.

public String getChannel ()

Returns the channel this ad's performance will be reported under, or an empty string if no channel was provided.

public int getNumAdsRequested ()

Returns the number of ads to request at a time.

public Boolean getPersonalizedAds ()

Returns whether ads may be personalized for the user, or null if setPersonalizedAds was never called.

public boolean getPrefetch ()

Returns whether ads will be pre-fetched in the background from the server when the internal ad buffer runs low.

public SearchAdOptions.Builder toBuilder ()

Returns a new builder with the same options set as this SearchAdOptions.