public abstract static class AbstractGoogleJsonClient.Builder extends AbstractGoogleClient.Builder
AbstractGoogleJsonClient
.
Implementation is not thread-safe.
Modifier | Constructor and Description |
---|---|
protected |
Builder(HttpTransport transport,
JsonFactory jsonFactory,
String rootUrl,
String servicePath,
HttpRequestInitializer httpRequestInitializer,
boolean legacyDataWrapper) |
Modifier and Type | Method and Description |
---|---|
abstract AbstractGoogleJsonClient |
build()
Builds a new instance of
AbstractGoogleClient . |
JsonFactory |
getJsonFactory()
Returns the JSON Factory.
|
JsonObjectParser |
getObjectParser()
Returns the object parser or
null for none. |
AbstractGoogleJsonClient.Builder |
setApplicationName(String applicationName)
Sets the application name to be used in the UserAgent header of each request or
null
for none. |
AbstractGoogleJsonClient.Builder |
setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
Sets the Google client request initializer or
null for none. |
AbstractGoogleJsonClient.Builder |
setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
Sets the HTTP request initializer or
null for none. |
AbstractGoogleJsonClient.Builder |
setRootUrl(String rootUrl)
Sets the URL-encoded root URL of the service, for example
https://www.googleapis.com/
. |
AbstractGoogleJsonClient.Builder |
setServicePath(String servicePath)
Sets the URL-encoded service path of the service, for example
"tasks/v1/" . |
AbstractGoogleJsonClient.Builder |
setSuppressAllChecks(boolean suppressAllChecks)
Suppresses all discovery pattern and required parameter checks.
|
AbstractGoogleJsonClient.Builder |
setSuppressPatternChecks(boolean suppressPatternChecks)
Sets whether discovery pattern checks should be suppressed on required parameters.
|
AbstractGoogleJsonClient.Builder |
setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
Sets whether discovery required parameter checks should be suppressed.
|
getApplicationName, getGoogleClientRequestInitializer, getHttpRequestInitializer, getRootUrl, getServicePath, getSuppressPatternChecks, getSuppressRequiredParameterChecks, getTransport, setBatchPath
protected Builder(HttpTransport transport, JsonFactory jsonFactory, String rootUrl, String servicePath, HttpRequestInitializer httpRequestInitializer, boolean legacyDataWrapper)
transport
- HTTP transportjsonFactory
- JSON factoryrootUrl
- root URL of the serviceservicePath
- service pathhttpRequestInitializer
- HTTP request initializer or null
for nonelegacyDataWrapper
- whether using the legacy data wrapper in responsespublic final JsonObjectParser getObjectParser()
AbstractGoogleClient.Builder
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
getObjectParser
in class AbstractGoogleClient.Builder
public final JsonFactory getJsonFactory()
public abstract AbstractGoogleJsonClient build()
AbstractGoogleClient.Builder
AbstractGoogleClient
.build
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setRootUrl(String rootUrl)
AbstractGoogleClient.Builder
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.
setRootUrl
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setServicePath(String servicePath)
AbstractGoogleClient.Builder
"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.
setServicePath
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
AbstractGoogleClient.Builder
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setGoogleClientRequestInitializer
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
AbstractGoogleClient.Builder
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setHttpRequestInitializer
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setApplicationName(String applicationName)
AbstractGoogleClient.Builder
null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setApplicationName
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setSuppressPatternChecks(boolean suppressPatternChecks)
AbstractGoogleClient.Builder
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setSuppressPatternChecks
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
AbstractGoogleClient.Builder
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setSuppressRequiredParameterChecks
in class AbstractGoogleClient.Builder
public AbstractGoogleJsonClient.Builder setSuppressAllChecks(boolean suppressAllChecks)
AbstractGoogleClient.Builder
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setSuppressAllChecks
in class AbstractGoogleClient.Builder
Copyright © 2010–2021 Google. All rights reserved.