Class FirestoreAdminGrpc.FirestoreAdminFutureStub (3.21.4)

public static final class FirestoreAdminGrpc.FirestoreAdminFutureStub extends AbstractFutureStub<FirestoreAdminGrpc.FirestoreAdminFutureStub>

A stub to allow clients to do ListenableFuture-style rpc calls to service FirestoreAdmin.

The Cloud Firestore Admin API. This API provides several administrative services for Cloud Firestore. Project, Database, Namespace, Collection, Collection Group, and Document are used as defined in the Google Cloud Firestore API. Operation: An Operation represents work being performed in the background. The index service manages Cloud Firestore indexes. Index creation is performed asynchronously. An Operation resource is created for each such asynchronous operation. The state of the operation (including any errors encountered) may be queried via the Operation resource. The Operations collection provides a record of actions performed for the specified Project (including any Operations in progress). Operations are not created directly but through calls on other collections or resources. An Operation that is done may be deleted so that it is no longer listed as part of the Operation collection. Operations are garbage collected after 30 days. By default, ListOperations will only return in progress and failed operations. To list completed operation, issue a ListOperations request with the filter done: true. Operations are created by service FirestoreAdmin, but are accessed via service google.longrunning.Operations.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractFutureStub > FirestoreAdminGrpc.FirestoreAdminFutureStub

Methods

build(Channel channel, CallOptions callOptions)

protected FirestoreAdminGrpc.FirestoreAdminFutureStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
FirestoreAdminGrpc.FirestoreAdminFutureStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createBackupSchedule(CreateBackupScheduleRequest request)

public ListenableFuture<BackupSchedule> createBackupSchedule(CreateBackupScheduleRequest request)

Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule and one weekly backup schedule.

Parameter
Name Description
request CreateBackupScheduleRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<BackupSchedule>

createDatabase(CreateDatabaseRequest request)

public ListenableFuture<Operation> createDatabase(CreateDatabaseRequest request)

Create a database.

Parameter
Name Description
request CreateDatabaseRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createIndex(CreateIndexRequest request)

public ListenableFuture<Operation> createIndex(CreateIndexRequest request)

Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation. The metadata for the operation will be the type IndexOperationMetadata.

Parameter
Name Description
request CreateIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteBackup(DeleteBackupRequest request)

public ListenableFuture<Empty> deleteBackup(DeleteBackupRequest request)

Deletes a backup.

Parameter
Name Description
request DeleteBackupRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteBackupSchedule(DeleteBackupScheduleRequest request)

public ListenableFuture<Empty> deleteBackupSchedule(DeleteBackupScheduleRequest request)

Deletes a backup schedule.

Parameter
Name Description
request DeleteBackupScheduleRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteDatabase(DeleteDatabaseRequest request)

public ListenableFuture<Operation> deleteDatabase(DeleteDatabaseRequest request)

Deletes a database.

Parameter
Name Description
request DeleteDatabaseRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteIndex(DeleteIndexRequest request)

public ListenableFuture<Empty> deleteIndex(DeleteIndexRequest request)

Deletes a composite index.

Parameter
Name Description
request DeleteIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

exportDocuments(ExportDocumentsRequest request)

public ListenableFuture<Operation> exportDocuments(ExportDocumentsRequest request)

Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents 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. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import

Parameter
Name Description
request ExportDocumentsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

getBackup(GetBackupRequest request)

public ListenableFuture<Backup> getBackup(GetBackupRequest request)

Gets information about a backup.

Parameter
Name Description
request GetBackupRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Backup>

getBackupSchedule(GetBackupScheduleRequest request)

public ListenableFuture<BackupSchedule> getBackupSchedule(GetBackupScheduleRequest request)

Gets information about a backup schedule.

Parameter
Name Description
request GetBackupScheduleRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<BackupSchedule>

getDatabase(GetDatabaseRequest request)

public ListenableFuture<Database> getDatabase(GetDatabaseRequest request)

Gets information about a database.

Parameter
Name Description
request GetDatabaseRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Database>

getField(GetFieldRequest request)

public ListenableFuture<Field> getField(GetFieldRequest request)

Gets the metadata and configuration for a Field.

Parameter
Name Description
request GetFieldRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Field>

getIndex(GetIndexRequest request)

public ListenableFuture<Index> getIndex(GetIndexRequest request)

Gets a composite index.

Parameter
Name Description
request GetIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Index>

importDocuments(ImportDocumentsRequest request)

public ListenableFuture<Operation> importDocuments(ImportDocumentsRequest request)

Imports documents into Google Cloud Firestore. Existing documents with the same name 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 ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.

Parameter
Name Description
request ImportDocumentsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

listBackupSchedules(ListBackupSchedulesRequest request)

public ListenableFuture<ListBackupSchedulesResponse> listBackupSchedules(ListBackupSchedulesRequest request)

List backup schedules.

Parameter
Name Description
request ListBackupSchedulesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListBackupSchedulesResponse>

listBackups(ListBackupsRequest request)

public ListenableFuture<ListBackupsResponse> listBackups(ListBackupsRequest request)

Lists all the backups.

Parameter
Name Description
request ListBackupsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListBackupsResponse>

listDatabases(ListDatabasesRequest request)

public ListenableFuture<ListDatabasesResponse> listDatabases(ListDatabasesRequest request)

List all the databases in the project.

Parameter
Name Description
request ListDatabasesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListDatabasesResponse>

listFields(ListFieldsRequest request)

public ListenableFuture<ListFieldsResponse> listFields(ListFieldsRequest request)

Lists the field configuration and metadata for this database. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with the filter set to indexConfig.usesAncestorConfig:false or ttlConfig:*.

Parameter
Name Description
request ListFieldsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListFieldsResponse>

listIndexes(ListIndexesRequest request)

public ListenableFuture<ListIndexesResponse> listIndexes(ListIndexesRequest request)

Lists composite indexes.

Parameter
Name Description
request ListIndexesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListIndexesResponse>

restoreDatabase(RestoreDatabaseRequest request)

public ListenableFuture<Operation> restoreDatabase(RestoreDatabaseRequest request)

Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed.

Parameter
Name Description
request RestoreDatabaseRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateBackupSchedule(UpdateBackupScheduleRequest request)

public ListenableFuture<BackupSchedule> updateBackupSchedule(UpdateBackupScheduleRequest request)

Updates a backup schedule.

Parameter
Name Description
request UpdateBackupScheduleRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<BackupSchedule>

updateDatabase(UpdateDatabaseRequest request)

public ListenableFuture<Operation> updateDatabase(UpdateDatabaseRequest request)

Updates a database.

Parameter
Name Description
request UpdateDatabaseRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateField(UpdateFieldRequest request)

public ListenableFuture<Operation> updateField(UpdateFieldRequest request)

Updates a field configuration. Currently, field updates apply only to single field index configuration. However, calls to FirestoreAdmin.UpdateField should provide a field mask to avoid changing any configuration that the caller isn't aware of. The field mask should be specified as: { paths: "index_config" }. This call returns a google.longrunning.Operation which may be used to track the status of the field update. The metadata for the operation will be the type FieldOperationMetadata. To configure the default field settings for the database, use the special Field with resource name: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/*.

Parameter
Name Description
request UpdateFieldRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>