public static class MockGoogleClient.Builder extends AbstractGoogleClient.Builder
Constructors
Builder(HttpTransport transport, String rootUrl, String servicePath, ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer)
public Builder(HttpTransport transport, String rootUrl, String servicePath, ObjectParser objectParser, HttpRequestInitializer httpRequestInitializer)
Name | Description |
transport | com.google.api.client.http.HttpTransport The transport to use for requests |
rootUrl | String root URL of the service. Must end with a "/" |
servicePath | String service path |
objectParser | com.google.api.client.util.ObjectParser object parser or |
httpRequestInitializer | com.google.api.client.http.HttpRequestInitializer HTTP request initializer or |
Methods
build()
public MockGoogleClient build()
Builds a new instance of AbstractGoogleClient.
Type | Description |
MockGoogleClient |
setApplicationName(String applicationName)
public MockGoogleClient.Builder setApplicationName(String applicationName)
Sets the application name to be used in the UserAgent header of each request or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
applicationName | String |
Type | Description |
MockGoogleClient.Builder |
setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
public MockGoogleClient.Builder setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)
Sets the Google client request initializer or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
googleClientRequestInitializer | GoogleClientRequestInitializer |
Type | Description |
MockGoogleClient.Builder |
setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
public MockGoogleClient.Builder setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)
Sets the HTTP request initializer or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
httpRequestInitializer | com.google.api.client.http.HttpRequestInitializer |
Type | Description |
MockGoogleClient.Builder |
setRootUrl(String rootUrl)
public MockGoogleClient.Builder setRootUrl(String rootUrl)
Sets the URL-encoded root URL of the service, for example 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.
Name | Description |
rootUrl | String |
Type | Description |
MockGoogleClient.Builder |
setServicePath(String servicePath)
public MockGoogleClient.Builder setServicePath(String servicePath)
Sets the URL-encoded service path of the service, for example "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.
Name | Description |
servicePath | String |
Type | Description |
MockGoogleClient.Builder |
setSuppressAllChecks(boolean suppressAllChecks)
public MockGoogleClient.Builder setSuppressAllChecks(boolean suppressAllChecks)
Suppresses all discovery pattern and required parameter checks.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
suppressAllChecks | boolean |
Type | Description |
MockGoogleClient.Builder |
setSuppressPatternChecks(boolean suppressPatternChecks)
public MockGoogleClient.Builder setSuppressPatternChecks(boolean suppressPatternChecks)
Sets whether discovery pattern checks should be suppressed on required parameters.
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
suppressPatternChecks | boolean |
Type | Description |
MockGoogleClient.Builder |
setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
public MockGoogleClient.Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)
Sets whether discovery required parameter checks should be suppressed.
Default value is false
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
suppressRequiredParameterChecks | boolean |
Type | Description |
MockGoogleClient.Builder |