public sealed class DatastoreDbBuilder : ClientBuilderBase<DatastoreDb>
Reference documentation and code samples for the Google Cloud Datastore v1 API class DatastoreDbBuilder.
Builder class for DatastoreDb to provide simple configuration of credentials, endpoint etc.
Namespace
Google.Cloud.Datastore.V1Assembly
Google.Cloud.Datastore.V1.dll
Constructors
DatastoreDbBuilder()
public DatastoreDbBuilder()
Creates a new builder with default settings.
Properties
DatabaseId
public string DatabaseId { get; set; }
The database ID, or null to use the default database.
Property Value | |
---|---|
Type | Description |
string |
EmulatorDetection
public EmulatorDetection EmulatorDetection { get; set; }
Specifies how the builder responds to the presence of emulator environment variables as described by https://cloud.google.com/datastore/docs/tools/datastore-emulator.
Property Value | |
---|---|
Type | Description |
EmulatorDetection |
This property defaults to None, meaning that environment variables are ignored.
NamespaceId
public string NamespaceId { get; set; }
The namespace ID, or null to use the default.
Property Value | |
---|---|
Type | Description |
string |
ProjectId
public string ProjectId { get; set; }
The project ID, or null if this has not yet been configured. Note that a project ID must be configured (or detected via an emulator environment variable) before building the DatastoreDb.
Property Value | |
---|---|
Type | Description |
string |
Settings
public DatastoreSettings Settings { get; set; }
The settings to use for RPCs, or null for the default settings.
Property Value | |
---|---|
Type | Description |
DatastoreSettings |
Methods
Build()
public override DatastoreDb Build()
Builds the resulting client.
Returns | |
---|---|
Type | Description |
DatastoreDb |
BuildAsync(CancellationToken)
public override Task<DatastoreDb> BuildAsync(CancellationToken cancellationToken = default)
Builds the resulting client asynchronously.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken |
Returns | |
---|---|
Type | Description |
TaskDatastoreDb |
GetChannelPool()
protected override ChannelPool GetChannelPool()
Returns the channel pool to use when no other options are specified. This method is not called unless CanUseChannelPool returns true, so if a channel pool is unavailable, override that property to return false and throw an exception from this method.
Returns | |
---|---|
Type | Description |
ChannelPool |