Class AbstractGoogleProtoClient.Builder (2.1.2)

public abstract static class AbstractGoogleProtoClient.Builder extends AbstractGoogleClient.Builder

Beta
Builder for AbstractGoogleProtoClient.

Implementation is not thread-safe.

Inheritance

java.lang.Object > AbstractGoogleClient.Builder > AbstractGoogleProtoClient.Builder

Constructors

Builder(HttpTransport transport, String rootUrl, String servicePath, HttpRequestInitializer httpRequestInitializer)

protected Builder(HttpTransport transport, String rootUrl, String servicePath, HttpRequestInitializer httpRequestInitializer)
Parameters
Name Description
transport com.google.api.client.http.HttpTransport

HTTP transport

rootUrl String

root URL of the service

servicePath String

service path

httpRequestInitializer com.google.api.client.http.HttpRequestInitializer

HTTP request initializer or null for none

Methods

build()

public abstract AbstractGoogleProtoClient build()

Builds a new instance of AbstractGoogleClient.

Returns
Type Description
AbstractGoogleProtoClient
Overrides

getObjectParser()

public final ProtoObjectParser getObjectParser()

Returns the object parser or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Returns
Type Description
com.google.api.client.protobuf.ProtoObjectParser
Overrides

setApplicationName(String applicationName)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
applicationName String
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setGoogleClientRequestInitializer(GoogleClientRequestInitializer googleClientRequestInitializer)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
googleClientRequestInitializer GoogleClientRequestInitializer
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setHttpRequestInitializer(HttpRequestInitializer httpRequestInitializer)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
httpRequestInitializer com.google.api.client.http.HttpRequestInitializer
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setRootUrl(String rootUrl)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
rootUrl String
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setServicePath(String servicePath)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
servicePath String
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setSuppressAllChecks(boolean suppressAllChecks)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
suppressAllChecks boolean
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setSuppressPatternChecks(boolean suppressPatternChecks)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
suppressPatternChecks boolean
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides

setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks)

public AbstractGoogleProtoClient.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.

Parameter
Name Description
suppressRequiredParameterChecks boolean
Returns
Type Description
AbstractGoogleProtoClient.Builder
Overrides