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

```java
public static class CommonGoogleClientRequestInitializer.Builder
```
Builder for `CommonGoogleClientRequestInitializer`.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> CommonGoogleClientRequestInitializer.Builder

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Constructors

### Builder()

```java
protected Builder()
```

## Methods

### build()

```java
public CommonGoogleClientRequestInitializer build()
```
Returns the constructed CommonGoogleClientRequestInitializer instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer` | the constructed CommonGoogleClientRequestInitializer instance |

### getKey()

```java
public String getKey()
```
Returns the API key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `String` | the API key |

### getRequestReason()

```java
public String getRequestReason()
```
Get the configured request reason.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `String` | the request reason |

### getUserAgent()

```java
public String getUserAgent()
```
Returns the configured user agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `String` | the user agent |

### getUserIp()

```java
public String getUserIp()
```
Returns the configured userIp.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `String` | the userIp |

### getUserProject()

```java
public String getUserProject()
```
Get the configured user project.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `String` | the user project |

### self()

```java
protected CommonGoogleClientRequestInitializer.Builder self()
```

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` |   |

### setKey(String key)

```java
public CommonGoogleClientRequestInitializer.Builder setKey(String key)
```
Set the API Key for outgoing requests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `String` the API key |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` | the builder |

### setRequestReason(String requestReason)

```java
public CommonGoogleClientRequestInitializer.Builder setRequestReason(String requestReason)
```
Set the reason for making the request, which is intended to be recorded in audit logging. An
example reason would be a support-case ticket number.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `requestReason` | `String` the reason for making the request |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` | the builder |

### setUserAgent(String userAgent)

```java
public CommonGoogleClientRequestInitializer.Builder setUserAgent(String userAgent)
```
Set the user agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `userAgent` | `String` the user agent |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` | the builder |

### setUserIp(String userIp)

```java
public CommonGoogleClientRequestInitializer.Builder setUserIp(String userIp)
```
Set the IP address of the end user for whom the API call is being made.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `userIp` | `String` the user's IP address |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` | the builder |

### setUserProject(String userProject)

```java
public CommonGoogleClientRequestInitializer.Builder setUserProject(String userProject)
```
Set the user project for the request. This is a caller-specified project for quota and
billing purposes. The caller must have serviceusage.services.use permission on the project.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `userProject` | `String` the user project |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CommonGoogleClientRequestInitializer.Builder` | the builder |