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 AppIdentityCredential.Builder
```
Builder for [AppIdentityCredential](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.md.txt).

Implementation is not thread-safe.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> AppIdentityCredential.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(Collection\<String\> scopes)

```java
public Builder(Collection<String> scopes)
```
Returns an instance of a new builder.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `scopes` | `Collection<String>` OAuth scopes |

## Methods

### build()

```java
public AppIdentityCredential build()
```
Returns a new [AppIdentityCredential](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AppIdentityCredential` |   |

### getAppIdentityService()

```java
public final AppIdentityService getAppIdentityService()
```
Returns the App Identity Service that provides the access token or `null` to use AppIdentityServiceFactory#getAppIdentityService().

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.appengine.api.appidentity.AppIdentityService` |   |

### getScopes()

```java
public final Collection<String> getScopes()
```
Returns the OAuth scopes (unmodifiable).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Collection<String>` |   |

### setAppIdentityService(AppIdentityService appIdentityService)

```java
public AppIdentityCredential.Builder setAppIdentityService(AppIdentityService appIdentityService)
```
Sets the App Identity Service that provides the access token or `null` to use AppIdentityServiceFactory#getAppIdentityService().

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `appIdentityService` | `com.google.appengine.api.appidentity.AppIdentityService` |

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