# Class ConnectorConfig.Builder (0.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.2.0 (latest)](https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder)
- [0.1.2](https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/0.1.2/com.google.cloud.alloydb.ConnectorConfig.Builder)

    public static class ConnectorConfig.Builder

The builder for the ConnectionConfig.

## Inheritance

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

    public Builder()

## Methods

### build()

    public ConnectorConfig build()

Builds a new instance of `ConnectionConfig`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig` |   |

### withAdminServiceEndpoint(String adminServiceEndpoint)

    public ConnectorConfig.Builder withAdminServiceEndpoint(String adminServiceEndpoint)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `adminServiceEndpoint` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |

### withDelegates(List\<String\> delegates)

    public ConnectorConfig.Builder withDelegates(List<String> delegates)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `delegates` | `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |

### withGoogleCredentials(GoogleCredentials googleCredentials)

    public ConnectorConfig.Builder withGoogleCredentials(GoogleCredentials googleCredentials)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `googleCredentials` | `com.google.auth.oauth2.GoogleCredentials` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |

### withGoogleCredentialsPath(String googleCredentialsPath)

    public ConnectorConfig.Builder withGoogleCredentialsPath(String googleCredentialsPath)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `googleCredentialsPath` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |

### withGoogleCredentialsSupplier(Supplier\<GoogleCredentials\> googleCredentialsSupplier)

    public ConnectorConfig.Builder withGoogleCredentialsSupplier(Supplier<GoogleCredentials> googleCredentialsSupplier)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `googleCredentialsSupplier` | `https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html<com.google.auth.oauth2.GoogleCredentials>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |

### withTargetPrincipal(String targetPrincipal)

    public ConnectorConfig.Builder withTargetPrincipal(String targetPrincipal)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `targetPrincipal` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig.Builder` |   |