public class AdWordsSession extends Object implements AdsSession, OAuthCompatible, OAuth2Compatible, ClientLoginCompatible
AdWordsSession represents a single session of AdWords use.
Implementation is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
AdWordsSession.Builder
Builder for AdWordsSession.
|
static class |
AdWordsSession.Environment
Enum representing the endpoint server, aka environment.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getClientCustomerId()
Gets the client customer ID.
|
String |
getClientLoginToken()
Gets the client login token.
|
String |
getDeveloperToken() |
String |
getEndpoint()
Returns the server endpoint to make requests against.
|
com.google.api.client.auth.oauth2.Credential |
getOAuth2Credential()
Gets the OAuth2 credentials.
|
com.google.api.client.auth.oauth.OAuthParameters |
getOAuthParameters()
Deprecated.
It is encouraged that you switch to OAuth2 at your earliest
convenience. Beginning in 1.9.0, the GoogleOAuth
authorization flow will no longer be supported, making it
substantially more difficult to create OAuth1.0a tokens.
|
String |
getUserAgent() |
boolean |
isEnvironment(Endpoint environment)
Determines if the session is for the supplied
AdWordsSession.Environment. |
Boolean |
isPartialFailure() |
Boolean |
isReportMoneyInMicros() |
Boolean |
isValidateOnly()
Returns
true if the session should only validate the request. |
void |
setClientCustomerId(String clientCustomerId)
Sets the client customer ID.
|
void |
setClientLoginToken(String clientLoginToken)
Sets the ClientLogin Token.
|
void |
setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
Sets the OAuth2 credential.
|
void |
setOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
Deprecated.
It is encouraged that you switch to OAuth2 at your earliest
convenience. Beginning in 1.9.0, the GoogleOAuth
authorization flow will no longer be supported, making it
substantially more difficult to create OAuth1.0a tokens.
|
void |
setPartialFailure(Boolean isPartialFailure)
Sets whether this session should allow partial failure.
|
void |
setReportMoneyInMicros(Boolean reportMoneyInMicros) |
void |
setValidateOnly(Boolean isValidateOnly)
Sets whether this session should only validate the request.
|
public String getClientCustomerId()
public void setClientCustomerId(String clientCustomerId)
public Boolean isValidateOnly()
true if the session should only validate the request.public void setValidateOnly(Boolean isValidateOnly)
public void setPartialFailure(Boolean isPartialFailure)
public String getUserAgent()
public String getDeveloperToken()
public Boolean isPartialFailure()
@Deprecated public com.google.api.client.auth.oauth.OAuthParameters getOAuthParameters()
OAuthCompatiblegetOAuthParameters in interface OAuthCompatible@Deprecated public void setOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
public com.google.api.client.auth.oauth2.Credential getOAuth2Credential()
getOAuth2Credential in interface OAuth2Compatiblepublic void setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
public String getClientLoginToken()
getClientLoginToken in interface ClientLoginCompatiblepublic void setClientLoginToken(String clientLoginToken)
public String getEndpoint()
AdsSessiongetEndpoint in interface AdsSessionpublic void setReportMoneyInMicros(Boolean reportMoneyInMicros)
reportMoneyInMicros - the reportMoneyInMicros to setpublic Boolean isReportMoneyInMicros()
public boolean isEnvironment(Endpoint environment)
AdWordsSession.Environment.isEnvironment in interface AdsSessionenvironment - the environment to checkCopyright © 2012. All Rights Reserved.