public abstract static class AbstractGoogleClient.Builder extends Object
AbstractGoogleClient
.
Implementation is not thread-safe.
Modifier | Constructor and Description |
---|---|
protected |
Builder(HttpTransport transport,
String rootUrl,
String servicePath,
ObjectParser objectParser,
HttpRequestInitializer httpRequestInitializer)
Returns an instance of a new builder.
|
Modifier and Type | Method and Description |
---|---|
abstract AbstractGoogleClient |
build()
Builds a new instance of
AbstractGoogleClient . |
String |
getApplicationName()
Returns the application name to be used in the UserAgent header of each request or
null for none. |
GoogleClientRequestInitializer |
getGoogleClientRequestInitializer()
Returns the Google client request initializer or
null for none. |
HttpRequestInitializer |
getHttpRequestInitializer()
Returns the HTTP request initializer or
null for none. |
ObjectParser |
getObjectParser()
Returns the object parser or
null for none. |
String |
getRootUrl()
Returns the URL-encoded root URL of the service, for example
https://www.googleapis.com/ . |
String |
getServicePath()
Returns the URL-encoded service path of the service, for example
"tasks/v1/" . |
boolean |
getSuppressPatternChecks()
Returns whether discovery pattern checks should be suppressed on required parameters.
|
boolean |
getSuppressRequiredParameterChecks()
Returns whether discovery required parameter checks should be suppressed.
|
HttpTransport |
getTransport()
Returns the HTTP transport.
|
AbstractGoogleClient.Builder |
setApplicationName(String applicationName)
Sets the application name to be used in the UserAgent header of each request or
null
for none. |
AbstractGoogleClient.Builder |
setBatchPath(String batchPath)
Sets the URL-encoded batch path of the service, for example
"batch/tasks" . |
AbstractGoogleClient.Builder |
setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
Sets the Google client request initializer or
null for none. |
AbstractGoogleClient.Builder |
setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
Sets the HTTP request initializer or
null for none. |
AbstractGoogleClient.Builder |
setRootUrl(String rootUrl)
Sets the URL-encoded root URL of the service, for example
https://www.googleapis.com/
. |
AbstractGoogleClient.Builder |
setServicePath(String servicePath)
Sets the URL-encoded service path of the service, for example
"tasks/v1/" . |
AbstractGoogleClient.Builder |
setSuppressAllChecks(boolean suppressAllChecks)
Suppresses all discovery pattern and required parameter checks.
|
AbstractGoogleClient.Builder |
setSuppressPatternChecks(boolean suppressPatternChecks)
Sets whether discovery pattern checks should be suppressed on required parameters.
|
AbstractGoogleClient.Builder |
setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
Sets whether discovery required parameter checks should be suppressed.
|
protected Builder(HttpTransport transport, String rootUrl, String servicePath, ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer)
transport
- The transport to use for requestsrootUrl
- root URL of the service. Must end with a "/"servicePath
- service pathobjectParser
- object parser or null
for nonehttpRequestInitializer
- HTTP request initializer or null
for nonepublic abstract AbstractGoogleClient build()
AbstractGoogleClient
.public final HttpTransport getTransport()
public ObjectParser getObjectParser()
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getRootUrl()
https://www.googleapis.com/
.
Must be URL-encoded and must end with a "/".
public AbstractGoogleClient.Builder setRootUrl(String rootUrl)
https://www.googleapis.com/
.
If the specified root URL does not end with a "/" then a "/" is added to the end.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getServicePath()
"tasks/v1/"
.
Must be URL-encoded and must end with a "/" and not begin with a "/". It is allowed to be an
empty string ""
.
public AbstractGoogleClient.Builder setServicePath(String servicePath)
"tasks/v1/"
.
It is allowed to be an empty string ""
or a forward slash "/"
, if it is a
forward slash then it is treated as an empty string. This is determined when the library is
generated and normally should not be changed.
If the specified service path does not end with a "/" then a "/" is added to the end. If the specified service path begins with a "/" then the "/" is removed.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public AbstractGoogleClient.Builder setBatchPath(String batchPath)
"batch/tasks"
.public final GoogleClientRequestInitializer getGoogleClientRequestInitializer()
null
for none.public AbstractGoogleClient.Builder setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final HttpRequestInitializer getHttpRequestInitializer()
null
for none.public AbstractGoogleClient.Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getApplicationName()
null
for none.public AbstractGoogleClient.Builder setApplicationName(String applicationName)
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final boolean getSuppressPatternChecks()
public AbstractGoogleClient.Builder setSuppressPatternChecks(boolean suppressPatternChecks)
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final boolean getSuppressRequiredParameterChecks()
public AbstractGoogleClient.Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public AbstractGoogleClient.Builder setSuppressAllChecks(boolean suppressAllChecks)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Copyright © 2010–2019 Google. All rights reserved.