Class FirestoreOptions.Builder (3.25.1)

public static class FirestoreOptions.Builder extends ServiceOptions.Builder<Firestore,FirestoreOptions,FirestoreOptions.Builder>

Inheritance

java.lang.Object > com.google.cloud.ServiceOptions.Builder > FirestoreOptions.Builder

Methods

build()

public FirestoreOptions build()
Returns
Type Description
FirestoreOptions
Overrides
com.google.cloud.ServiceOptions.Builder.build()

setChannelProvider(TransportChannelProvider channelProvider)

public FirestoreOptions.Builder setChannelProvider(TransportChannelProvider channelProvider)

Sets the TransportChannelProvider to use with this Firestore client.

Parameter
Name Description
channelProvider TransportChannelProvider

A InstantiatingGrpcChannelProvider object that defines the transport provider for this client.

Returns
Type Description
FirestoreOptions.Builder

setCredentialsProvider(CredentialsProvider credentialsProvider)

public FirestoreOptions.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)

Sets the CredentialsProvider to use with this Firestore client.

Parameter
Name Description
credentialsProvider CredentialsProvider

A CredentialsProvider object that defines the credential provider for this client.

Returns
Type Description
FirestoreOptions.Builder

setDatabaseId(String databaseId)

public FirestoreOptions.Builder setDatabaseId(String databaseId)

Sets the database ID to use with this Firestore client.

Parameter
Name Description
databaseId String

The Firestore database ID to use with this client.

Returns
Type Description
FirestoreOptions.Builder

setEmulatorHost(String emulatorHost)

public FirestoreOptions.Builder setEmulatorHost(String emulatorHost)

Sets the emulator host to use with this Firestore client. The value passed to this method will take precedent if the FIRESTORE_EMULATOR_HOST environment variable is also set.

Parameter
Name Description
emulatorHost String

The Firestore emulator host to use with this client.

Returns
Type Description
FirestoreOptions.Builder

setOpenTelemetryOptions(FirestoreOpenTelemetryOptions openTelemetryOptions)

public FirestoreOptions.Builder setOpenTelemetryOptions(FirestoreOpenTelemetryOptions openTelemetryOptions)

Sets the FirestoreOpenTelemetryOptions to be used for this Firestore instance.

Parameter
Name Description
openTelemetryOptions FirestoreOpenTelemetryOptions

The FirestoreOpenTelemetryOptions to use.

Returns
Type Description
FirestoreOptions.Builder

setTransportOptions(TransportOptions transportOptions)

public FirestoreOptions.Builder setTransportOptions(TransportOptions transportOptions)

Sets the TransportOptions to use with this Firestore client.

Parameter
Name Description
transportOptions com.google.cloud.TransportOptions

A GrpcTransportOptions object that defines the transport options for this client.

Returns
Type Description
FirestoreOptions.Builder
Overrides
com.google.cloud.ServiceOptions.Builder.setTransportOptions(com.google.cloud.TransportOptions)