public class AdWordsSession extends Object implements AdsSession, OAuth2Compatible
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.ImmutableAdWordsSession
Immutable, thread-safe implementation of 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 |
getDeveloperToken() |
String |
getEndpoint()
Returns the server endpoint to make requests against.
|
com.google.api.client.auth.oauth2.Credential |
getOAuth2Credential()
Gets the OAuth2 credentials.
|
ReportingConfiguration |
getReportingConfiguration()
Gets the reporting configuration.
|
String |
getUserAgent() |
Boolean |
isPartialFailure() |
Boolean |
isValidateOnly()
Returns
true if the session should only validate the request. |
AdWordsSession.Builder |
newBuilder()
Returns a new
AdWordsSession.Builder with all settings copied from this session. |
void |
setClientCustomerId(String clientCustomerId)
Sets the client customer ID.
|
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 |
setReportingConfiguration(ReportingConfiguration reportingConfiguration)
Sets the reporting configuration.
|
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 Boolean isValidateOnly()
true
if the session should only validate the request.public void setValidateOnly(@Nullable Boolean isValidateOnly)
public String getUserAgent()
public String getDeveloperToken()
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)
@Nullable public ReportingConfiguration getReportingConfiguration()
public void setReportingConfiguration(@Nullable ReportingConfiguration reportingConfiguration)
public String getEndpoint()
AdsSession
getEndpoint
in interface AdsSession
public AdWordsSession.Builder newBuilder()
AdWordsSession.Builder
with all settings copied from this session. This is not
thread-safe unless this session is an AdWordsSession.ImmutableAdWordsSession
.Copyright © 2018. All Rights Reserved.