public class AdWordsSession extends Object implements AdsSession, 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.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENDPOINT |
Modifier and Type | Method and Description |
---|---|
String |
getClientCustomerId()
Gets the client customer ID.
|
String |
getClientLoginToken()
Deprecated.
It is encouraged that you switch to OAuth2 at your earliest
convenience. Please see the OfflineCredentials utility for
generating offline credentials easily.
|
String |
getDeveloperToken() |
String |
getEndpoint()
Returns the server endpoint to make requests against.
|
Long |
getExpressBusinessId()
Gets the AdWords Express business ID required for AdWords Express
PromotionService
|
com.google.api.client.auth.oauth2.Credential |
getOAuth2Credential()
Gets the OAuth2 credentials.
|
String |
getUserAgent() |
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)
Deprecated.
It is encouraged that you switch to OAuth2 at your earliest
convenience. Please see the OfflineCredentials utility for
generating offline credentials easily.
|
void |
setExpressBusinessId(Long businessId)
Sets the AdWords Express business ID required for AdWords Express
PromotionService
|
void |
setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
Sets the OAuth2 credential.
|
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 static final String DEFAULT_ENDPOINT
public String getClientCustomerId()
public void setClientCustomerId(String clientCustomerId)
@Nullable public Long getExpressBusinessId()
public void setExpressBusinessId(@Nullable Long businessId)
@Nullable public Boolean isValidateOnly()
true
if the session should only validate the request.public void setValidateOnly(@Nullable Boolean isValidateOnly)
public String getUserAgent()
public String getDeveloperToken()
@Nullable public Boolean isPartialFailure()
public void setPartialFailure(@Nullable Boolean isPartialFailure)
public com.google.api.client.auth.oauth2.Credential getOAuth2Credential()
getOAuth2Credential
in interface OAuth2Compatible
public void setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
@Deprecated public String getClientLoginToken()
getClientLoginToken
in interface ClientLoginCompatible
@Deprecated public void setClientLoginToken(String clientLoginToken)
public String getEndpoint()
AdsSession
getEndpoint
in interface AdsSession
public void setReportMoneyInMicros(@Nullable Boolean reportMoneyInMicros)
reportMoneyInMicros
- the reportMoneyInMicros to set@Nullable public Boolean isReportMoneyInMicros()
Copyright © 2014. All Rights Reserved.