public static class CommonGoogleClientRequestInitializer.BuilderBuilder for CommonGoogleClientRequestInitializer.
Constructors
Builder()
protected Builder()Methods
build()
public CommonGoogleClientRequestInitializer build()Returns the constructed CommonGoogleClientRequestInitializer instance.
| Type | Description |
| CommonGoogleClientRequestInitializer | the constructed CommonGoogleClientRequestInitializer instance |
getKey()
public String getKey()Returns the API key.
| Type | Description |
| String | the API key |
getRequestReason()
public String getRequestReason()Get the configured request reason.
| Type | Description |
| String | the request reason |
getUserAgent()
public String getUserAgent()Returns the configured user agent.
| Type | Description |
| String | the user agent |
getUserIp()
public String getUserIp()Returns the configured userIp.
| Type | Description |
| String | the userIp |
getUserProject()
public String getUserProject()Get the configured user project.
| Type | Description |
| String | the user project |
self()
protected CommonGoogleClientRequestInitializer.Builder self()| Type | Description |
| CommonGoogleClientRequestInitializer.Builder |
setKey(String key)
public CommonGoogleClientRequestInitializer.Builder setKey(String key)Set the API Key for outgoing requests.
| Name | Description |
| key | Stringthe API key |
| Type | Description |
| CommonGoogleClientRequestInitializer.Builder | the builder |
setRequestReason(String requestReason)
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.
| Name | Description |
| requestReason | Stringthe reason for making the request |
| Type | Description |
| CommonGoogleClientRequestInitializer.Builder | the builder |
setUserAgent(String userAgent)
public CommonGoogleClientRequestInitializer.Builder setUserAgent(String userAgent)Set the user agent.
| Name | Description |
| userAgent | Stringthe user agent |
| Type | Description |
| CommonGoogleClientRequestInitializer.Builder | the builder |
setUserIp(String userIp)
public CommonGoogleClientRequestInitializer.Builder setUserIp(String userIp)Set the IP address of the end user for whom the API call is being made.
| Name | Description |
| userIp | Stringthe user's IP address |
| Type | Description |
| CommonGoogleClientRequestInitializer.Builder | the builder |
setUserProject(String userProject)
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.
| Name | Description |
| userProject | Stringthe user project |
| Type | Description |
| CommonGoogleClientRequestInitializer.Builder | the builder |