|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.adwords.lib.client.AdWordsSession.Builder
public static class AdWordsSession.Builder
Builder for AdWordsSession.
| Field Summary |
|---|
| Fields inherited from interface com.google.api.ads.common.lib.utils.Builder |
|---|
DEFAULT_CONFIGURATION_FILENAME |
| Constructor Summary | |
|---|---|
AdWordsSession.Builder()
Constructor. |
|
| Method Summary | |
|---|---|
AdWordsSession |
build()
Builds the AdWordsSession. |
AdWordsSession.Builder |
enablePartialFailure()
Enables partial failure. |
AdWordsSession.Builder |
enableReportMoneyInMicros()
Enable downloading of money values in reports in micros. |
AdWordsSession.Builder |
from(org.apache.commons.configuration.Configuration config)
Reads properties from the provided Configuration object.Known properties: api.adwords.clientLoginToken api.adwords.clientCustomerId api.adwords.userAgent api.adwords.developerToken api.adwords.isPartialFailure api.adwords.environment - e.g. |
AdWordsSession.Builder |
fromFile()
Loads credentials from "ads.properties" file in one of the following locations according to the following order: in the current directory, in the user home directory, in the classpath |
AdWordsSession.Builder |
fromFile(File path)
Populates this builder from a properties file from a specified path. |
AdWordsSession.Builder |
fromFile(String path)
Populates this builder from a properties file from a specified path. |
AdWordsSession.Builder |
fromFile(URL path)
Populates this builder from a properties file from a specified path. |
AdWordsSession.Builder |
withClientCustomerId(String clientCustomerId)
Includes a clientCustomerId. |
AdWordsSession.Builder |
withClientLoginToken(String clientLoginToken)
Includes hard-coded ClientLogin token that will be used instead of fetching a new one. |
AdWordsSession.Builder |
withDeveloperToken(String developerToken)
Includes a developer token. |
AdWordsSession.Builder |
withEndpoint(String endpoint)
Override the endpoint server. |
AdWordsSession.Builder |
withEnvironment(AdWordsSession.Environment environment)
Includes the specified environment, e.g. |
AdWordsSession.Builder |
withOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
Includes OAuth2 credential to be used for OAuth2 authentication. |
AdWordsSession.Builder |
withOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
Includes OAuth parameters to be used for OAuth authentication. |
AdWordsSession.Builder |
withUserAgent(String userAgent)
Includes user agent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdWordsSession.Builder()
| Method Detail |
|---|
public AdWordsSession.Builder fromFile()
throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile in interface Builder<AdWordsSession>com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.
public AdWordsSession.Builder fromFile(String path)
throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile in interface Builder<AdWordsSession>path - the path to try first as a resource, then as a file
com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.
public AdWordsSession.Builder fromFile(File path)
throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile in interface Builder<AdWordsSession>path - the path to load properties from
com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.
public AdWordsSession.Builder fromFile(URL path)
throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile in interface Builder<AdWordsSession>path - the path to try first as a resource, then as a file
com.google.api.ads.common.lib.conf.ConfigurationLoadException - if the configuration could not be
loaded.public AdWordsSession.Builder from(org.apache.commons.configuration.Configuration config)
Configuration object.
from in interface Builder<AdWordsSession>config -
public AdWordsSession.Builder withClientLoginToken(String clientLoginToken)
public AdWordsSession.Builder withDeveloperToken(String developerToken)
public AdWordsSession.Builder withOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
public AdWordsSession.Builder withOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
public AdWordsSession.Builder withUserAgent(String userAgent)
public AdWordsSession.Builder withEnvironment(AdWordsSession.Environment environment)
AdWordsSession.Environment.SANDBOX
The environment and endpoint in AdWords are currently synonymous. Setting
an environment will clear out any endpoint you have previously set.
public AdWordsSession.Builder withEndpoint(String endpoint)
public AdWordsSession.Builder withClientCustomerId(String clientCustomerId)
public AdWordsSession.Builder enablePartialFailure()
public AdWordsSession.Builder enableReportMoneyInMicros()
public AdWordsSession build()
throws ValidationException
AdWordsSession.
build in interface Builder<AdWordsSession>AdWordsSession
ValidationException - if the AdWordsSession did not validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||