Class MockGoogleProtoClientRequest<T> (1.34.1)

public class MockGoogleProtoClientRequest<T> extends AbstractGoogleProtoClientRequest<T>

Beta
Thread-safe mock Google protocol buffer request.

Inheritance

java.lang.Object > java.util.AbstractMap > com.google.api.client.util.GenericData > AbstractGoogleClientRequest<T> > AbstractGoogleProtoClientRequest > MockGoogleProtoClientRequest<T>

Type Parameter

NameDescription
T

Constructors

MockGoogleProtoClientRequest(AbstractGoogleProtoClient client, String method, String uriTemplate, MessageLite message, Class<T> responseClass)

public MockGoogleProtoClientRequest(AbstractGoogleProtoClient client, String method, String uriTemplate, MessageLite message, Class<T> responseClass)
Parameters
NameDescription
clientAbstractGoogleProtoClient

Google client

methodString

HTTP Method

uriTemplateString

URI template for the path relative to the base URL. If it starts with a "/" the base path from the base URL will be stripped out. The URI template can also be a full URL. URI template expansion is done using UriTemplate#expand(String, String, Object, boolean)

messageMessageLite

message to serialize or null for none

responseClassClass<T>

response class to parse into

Methods

getAbstractGoogleClient()

public MockGoogleProtoClient getAbstractGoogleClient()

Returns the Google client.

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

Returns
TypeDescription
MockGoogleProtoClient
Overrides

setDisableGZipContent(boolean disableGZipContent)

public MockGoogleProtoClientRequest<T> setDisableGZipContent(boolean disableGZipContent)

Sets whether to disable GZip compression of HTTP content.

By default it is false.

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

Parameter
NameDescription
disableGZipContentboolean
Returns
TypeDescription
MockGoogleProtoClientRequest<T>
Overrides

setRequestHeaders(HttpHeaders headers)

public MockGoogleProtoClientRequest<T> setRequestHeaders(HttpHeaders headers)

Sets the HTTP headers used for the Google client request.

These headers are set on the request after #buildHttpRequest is called, this means that HttpRequestInitializer#initialize is called first.

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

Parameter
NameDescription
headerscom.google.api.client.http.HttpHeaders
Returns
TypeDescription
MockGoogleProtoClientRequest<T>
Overrides