diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java index dc6811736..11bc6ca2a 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java @@ -116,108 +116,109 @@ * as threads. In the example above, try-with-resources is used, which automatically calls close(). * * - * + * * * * * + * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java index 6de58e7f0..e3c2b7d1d 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java @@ -258,6 +258,15 @@ public DatastoreAdminStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + /** Returns the default service name. */ @Override public String getServiceName() { @@ -491,7 +500,6 @@ private static Builder createDefault() { builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -504,7 +512,6 @@ private static Builder createHttpJsonDefault() { builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -719,6 +726,15 @@ public UnaryCallSettings.Builder getIndexSettings() { return listIndexesSettings; } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + @Override public DatastoreAdminStubSettings build() throws IOException { return new DatastoreAdminStubSettings(this);
MethodsMethods
MethodDescriptionMethod Variants
ExportEntities

ExportEntities

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • exportEntitiesAsync(ExportEntitiesRequest request) + *
  • exportEntitiesAsync(ExportEntitiesRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    - *
  • exportEntitiesAsync(String projectId, Map<String, String> labels, EntityFilter entityFilter, String outputUrlPrefix) + *
  • exportEntitiesAsync(String projectId, Map<String, String> labels, EntityFilter entityFilter, String outputUrlPrefix) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • exportEntitiesOperationCallable() - *
  • exportEntitiesCallable() + *
  • exportEntitiesOperationCallable() + *

  • exportEntitiesCallable() *

*
ImportEntities

ImportEntities

Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • importEntitiesAsync(ImportEntitiesRequest request) + *
  • importEntitiesAsync(ImportEntitiesRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    - *
  • importEntitiesAsync(String projectId, Map<String, String> labels, String inputUrl, EntityFilter entityFilter) + *
  • importEntitiesAsync(String projectId, Map<String, String> labels, String inputUrl, EntityFilter entityFilter) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • importEntitiesOperationCallable() - *
  • importEntitiesCallable() + *
  • importEntitiesOperationCallable() + *

  • importEntitiesCallable() *

*
CreateIndex

CreateIndex

Creates the specified index. A newly created index's initial state is `CREATING`. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. If the index already exists, the call will return an `ALREADY_EXISTS` status. *

During index creation, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex]. *

Indexes with a single property cannot be created.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • createIndexAsync(CreateIndexRequest request) + *
  • createIndexAsync(CreateIndexRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • createIndexOperationCallable() - *
  • createIndexCallable() + *
  • createIndexOperationCallable() + *

  • createIndexCallable() *

*
DeleteIndex

DeleteIndex

Deletes an existing index. An index can only be deleted if it is in a `READY` or `ERROR` state. On successful execution of the request, the index will be in a `DELETING` [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed. *

During index deletion, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • deleteIndexAsync(DeleteIndexRequest request) + *
  • deleteIndexAsync(DeleteIndexRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • deleteIndexOperationCallable() - *
  • deleteIndexCallable() + *
  • deleteIndexOperationCallable() + *

  • deleteIndexCallable() *

*
GetIndex

GetIndex

Gets an index.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • getIndex(GetIndexRequest request) + *
  • getIndex(GetIndexRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • getIndexCallable() + *
  • getIndexCallable() *

*
ListIndexes

ListIndexes

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    - *
  • listIndexes(ListIndexesRequest request) + *
  • listIndexes(ListIndexesRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    - *
  • listIndexesPagedCallable() - *
  • listIndexesCallable() + *
  • listIndexesPagedCallable() + *

  • listIndexesCallable() *

*