2.9.3 (latest) 2.9.2 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4 [com.google.api.client.util.Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta.md.txt)   

Contains the basis for the generated service-specific libraries based on the Protobuf format.

## Classes

### [AbstractGoogleProtoClient](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient.md.txt)

Beta   

Thread-safe Google protocol buffer client.

### [AbstractGoogleProtoClient.Builder](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient.Builder.md.txt)

Beta   

Builder for [AbstractGoogleProtoClient](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient.md.txt).

Implementation is not thread-safe.

### [AbstractGoogleProtoClientRequest\<T\>](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClientRequest.md.txt)

Beta   

Google protocol buffer request for a [AbstractGoogleProtoClient](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.AbstractGoogleProtoClient.md.txt).

Implementation is not thread-safe.

### [CommonGoogleProtoClientRequestInitializer](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.services.protobuf.CommonGoogleProtoClientRequestInitializer.md.txt)

Beta   

Google protocol buffer client request initializer implementation for setting properties like key
and userIp.

The simplest usage is to use it to set the key parameter:

```java

 public static final GoogleClientRequestInitializer KEY_INITIALIZER =
   new CommonGoogleProtoClientRequestInitializer(KEY);
 
```

There is also a constructor to set both the key and userIp parameters:

```java

 public static final GoogleClientRequestInitializer INITIALIZER =
   new CommonGoogleProtoClientRequestInitializer(KEY, USER_IP);
 
```

If you want to implement custom logic, extend it like this:

```java

 public static class MyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {

  {@literal @}Override
  public void initialize(AbstractGoogleProtoClientRequest{@literal <}?{@literal>} request)
      throws IOException {
      // custom logic
  }
 }
 
```

Finally, to set the key and userIp parameters and insert custom logic, extend it like this:

```java

 public static class MyKeyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {

   public MyKeyRequestInitializer() {
     super(KEY, USER_IP);
   }

   {@literal @}Override
   public void initializeProtoRequest(
     AbstractGoogleProtoClientRequest{@literal <}?{@literal>} request) throws IOException {
     // custom logic
   }
 }
 
```

Subclasses should be thread-safe.