目录

CLASS info
public static class RequestOptions.Builder extends Object
Global request configuration builder.

Public Constructor Summary

Constructor name
Builder()
Global request configuration builder constructor.

Public Method Summary

Return typeMethod name
RequestOptionsbuild()
Builds a global request configuration object.
RequestOptions.BuildersetAdContentClassification(String adContentClassification)
Sets the ad content rating.
RequestOptions.BuildersetAppLang(String appLang)
Sets the language in which an ad needs to be returned for an app.
RequestOptions.BuildersetAppCountry(String appCountry)
Sets the country code corresponding to the language in which an ad needs to be returned for an app.
RequestOptions.BuildersetTagForChildProtection(Integer tagForChildProtection)
Specifies whether to process ad requests according to the COPPA.
RequestOptions.BuildersetTagForUnderAgeOfPromise(Integer tagForUnderAgeOfPromise)
Specifies whether to process ad requests as directed to users under the age of consent.
RequestOptions.BuildersetNonPersonalizedAd(Integer nonPersonalizedAd)
Specifies whether to request non-personalized ads.

Public Constructors

ConstructorConstructor
public Builder()
Global request configuration builder constructor.

Public Methods

Method
public RequestOptions build()
Builds a global request configuration object.


Return

typedesc
RequestOptionsGlobal request configuration.
Method
public RequestOptions.Builder setAdContentClassification(String adContentClassification)
Sets the ad content rating.


Parameters

Parameter nameParameter desc
adContentClassificationAd content rating.
The options are as follows:

ContentClassification.AD_CONTENT_CLASSIFICATION_W

ContentClassification.AD_CONTENT_CLASSIFICATION_PI
ContentClassification.AD_CONTENT_CLASSIFICATION_J
ContentClassification.AD_CONTENT_CLASSIFICATION_A


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.
Method
public RequestOptions.Builder setAppLang(String appLang)
Sets the language in which an ad needs to be returned for an app.


Parameters

Parameter nameParameter desc
appLangLanguage in which an ad needs to be returned for an app


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.
Method
public RequestOptions.Builder setAppCountry(String appCountry)
Sets the country code corresponding to the language in which an ad needs to be returned for an app..


Parameters

Parameter nameParameter desc
appCountryCountry code corresponding to the language in which an ad needs to be returned for an app.


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.
Method
public RequestOptions.Builder setTagForChildProtection(Integer tagForChildProtection)
Specifies whether to process ad requests according to the COPPA.


Parameters

Parameter nameParameter desc
tagForChildProtectionIndicates whether to process ad requests according to the COPPA.
The options are as follows:

TagForChild.TAG_FOR_CHILD_PROTECTION_UNSPECIFIED

TagForChild.TAG_FOR_CHILD_PROTECTION_FALSE
TagForChild.TAG_FOR_CHILD_PROTECTION_TRUE


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.
Method
public RequestOptions.Builder setTagForUnderAgeOfPromise(Integer tagForUnderAgeOfPromise)
Specifies whether to process ad requests as directed to users under the age of consent.


Parameters

Parameter nameParameter desc
tagForUnderAgeOfPromiseIndicates whether to process ad requests as underage user–directed.
The options are as follows:

UnderAge.PROMISE_UNSPECIFIED

UnderAge.PROMISE_FALSE
UnderAge.PROMISE_TRUE


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.
Method
public RequestOptions.Builder setNonPersonalizedAd(Integer nonPersonalizedAd)
Specifies whether to request non-personalized ads.


Parameters

Parameter nameParameter desc
nonPersonalizedAdThe options are as follows:

NonPersonalizedAd.ALLOW_NON_PERSONALIZED

NonPersonalizedAd.ALLOW_ALL


Return

typedesc
RequestOptions.BuilderGlobal request configuration builder.