Class DatastoreOptions.Builder

java.lang.Object
com.google.datastore.v1.client.DatastoreOptions.Builder
Enclosing class:
DatastoreOptions

public static class DatastoreOptions.Builder extends Object
Builder for DatastoreOptions.
  • Constructor Details

  • Method Details

    • build

      public DatastoreOptions build()
    • projectId

      public DatastoreOptions.Builder projectId(String projectId)
      Sets the project ID used to access Cloud Datastore.
    • databaseId

      @BetaApi @Deprecated public DatastoreOptions.Builder databaseId(String databaseId)
      Deprecated.
      This field is ignored and will be removed in a future release. Please set the database id on the request itself. For example:
      
       CommitRequest.newBuilder()
           .setDatabaseId("my-database-id")
           ....
           .build();
       
    • host

      public DatastoreOptions.Builder host(String host)
      Sets the host used to access Cloud Datastore. To connect to the Cloud Datastore Emulator, use localHost instead.
    • localHost

      public DatastoreOptions.Builder localHost(String localHost)
      Configures the client to access Cloud Datastore on a local host (typically a Cloud Datastore Emulator instance). Call this method also configures the client not to attach credentials to requests.
    • projectEndpoint

      @Deprecated public DatastoreOptions.Builder projectEndpoint(String projectEndpoint)
      Deprecated.
      Use projectId and/or host/localHost instead.
      Sets the project endpoint used to access Cloud Datastore. Prefer using projectId and/or host/localHost when possible.
    • initializer

      public DatastoreOptions.Builder initializer(com.google.api.client.http.HttpRequestInitializer initializer)
      Sets the (optional) initializer to run on HTTP requests to Cloud Datastore.
    • credential

      public DatastoreOptions.Builder credential(com.google.api.client.auth.oauth2.Credential credential)
      Sets the Google APIs Credential used to access Cloud Datastore.
    • transport

      public DatastoreOptions.Builder transport(com.google.api.client.http.HttpTransport transport)
      Sets the transport used to access Cloud Datastore.