Class FirestoreAdminGrpc.FirestoreAdminStub (3.21.0)

public static final class FirestoreAdminGrpc.FirestoreAdminStub extends AbstractAsyncStub<FirestoreAdminGrpc.FirestoreAdminStub>

A stub to allow clients to do asynchronous 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.AbstractAsyncStub > FirestoreAdminGrpc.FirestoreAdminStub

Methods

build(Channel channel, CallOptions callOptions)

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

createBackupSchedule(CreateBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

public void createBackupSchedule(CreateBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

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.

Parameters
Name Description
request CreateBackupScheduleRequest
responseObserver io.grpc.stub.StreamObserver<BackupSchedule>

createDatabase(CreateDatabaseRequest request, StreamObserver<Operation> responseObserver)

public void createDatabase(CreateDatabaseRequest request, StreamObserver<Operation> responseObserver)

Create a database.

Parameters
Name Description
request CreateDatabaseRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

createIndex(CreateIndexRequest request, StreamObserver<Operation> responseObserver)

public void createIndex(CreateIndexRequest request, StreamObserver<Operation> responseObserver)

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.

Parameters
Name Description
request CreateIndexRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

deleteBackup(DeleteBackupRequest request, StreamObserver<Empty> responseObserver)

public void deleteBackup(DeleteBackupRequest request, StreamObserver<Empty> responseObserver)

Deletes a backup.

Parameters
Name Description
request DeleteBackupRequest
responseObserver io.grpc.stub.StreamObserver<Empty>

deleteBackupSchedule(DeleteBackupScheduleRequest request, StreamObserver<Empty> responseObserver)

public void deleteBackupSchedule(DeleteBackupScheduleRequest request, StreamObserver<Empty> responseObserver)

Deletes a backup schedule.

Parameters
Name Description
request DeleteBackupScheduleRequest
responseObserver io.grpc.stub.StreamObserver<Empty>

deleteDatabase(DeleteDatabaseRequest request, StreamObserver<Operation> responseObserver)

public void deleteDatabase(DeleteDatabaseRequest request, StreamObserver<Operation> responseObserver)

Deletes a database.

Parameters
Name Description
request DeleteDatabaseRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

deleteIndex(DeleteIndexRequest request, StreamObserver<Empty> responseObserver)

public void deleteIndex(DeleteIndexRequest request, StreamObserver<Empty> responseObserver)

Deletes a composite index.

Parameters
Name Description
request DeleteIndexRequest
responseObserver io.grpc.stub.StreamObserver<Empty>

exportDocuments(ExportDocumentsRequest request, StreamObserver<Operation> responseObserver)

public void exportDocuments(ExportDocumentsRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
Name Description
request ExportDocumentsRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

getBackup(GetBackupRequest request, StreamObserver<Backup> responseObserver)

public void getBackup(GetBackupRequest request, StreamObserver<Backup> responseObserver)

Gets information about a backup.

Parameters
Name Description
request GetBackupRequest
responseObserver io.grpc.stub.StreamObserver<Backup>

getBackupSchedule(GetBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

public void getBackupSchedule(GetBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

Gets information about a backup schedule.

Parameters
Name Description
request GetBackupScheduleRequest
responseObserver io.grpc.stub.StreamObserver<BackupSchedule>

getDatabase(GetDatabaseRequest request, StreamObserver<Database> responseObserver)

public void getDatabase(GetDatabaseRequest request, StreamObserver<Database> responseObserver)

Gets information about a database.

Parameters
Name Description
request GetDatabaseRequest
responseObserver io.grpc.stub.StreamObserver<Database>

getField(GetFieldRequest request, StreamObserver<Field> responseObserver)

public void getField(GetFieldRequest request, StreamObserver<Field> responseObserver)

Gets the metadata and configuration for a Field.

Parameters
Name Description
request GetFieldRequest
responseObserver io.grpc.stub.StreamObserver<Field>

getIndex(GetIndexRequest request, StreamObserver<Index> responseObserver)

public void getIndex(GetIndexRequest request, StreamObserver<Index> responseObserver)

Gets a composite index.

Parameters
Name Description
request GetIndexRequest
responseObserver io.grpc.stub.StreamObserver<Index>

importDocuments(ImportDocumentsRequest request, StreamObserver<Operation> responseObserver)

public void importDocuments(ImportDocumentsRequest request, StreamObserver<Operation> responseObserver)

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.

Parameters
Name Description
request ImportDocumentsRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

listBackupSchedules(ListBackupSchedulesRequest request, StreamObserver<ListBackupSchedulesResponse> responseObserver)

public void listBackupSchedules(ListBackupSchedulesRequest request, StreamObserver<ListBackupSchedulesResponse> responseObserver)

List backup schedules.

Parameters
Name Description
request ListBackupSchedulesRequest
responseObserver io.grpc.stub.StreamObserver<ListBackupSchedulesResponse>

listBackups(ListBackupsRequest request, StreamObserver<ListBackupsResponse> responseObserver)

public void listBackups(ListBackupsRequest request, StreamObserver<ListBackupsResponse> responseObserver)

Lists all the backups.

Parameters
Name Description
request ListBackupsRequest
responseObserver io.grpc.stub.StreamObserver<ListBackupsResponse>

listDatabases(ListDatabasesRequest request, StreamObserver<ListDatabasesResponse> responseObserver)

public void listDatabases(ListDatabasesRequest request, StreamObserver<ListDatabasesResponse> responseObserver)

List all the databases in the project.

Parameters
Name Description
request ListDatabasesRequest
responseObserver io.grpc.stub.StreamObserver<ListDatabasesResponse>

listFields(ListFieldsRequest request, StreamObserver<ListFieldsResponse> responseObserver)

public void listFields(ListFieldsRequest request, StreamObserver<ListFieldsResponse> responseObserver)

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:*.

Parameters
Name Description
request ListFieldsRequest
responseObserver io.grpc.stub.StreamObserver<ListFieldsResponse>

listIndexes(ListIndexesRequest request, StreamObserver<ListIndexesResponse> responseObserver)

public void listIndexes(ListIndexesRequest request, StreamObserver<ListIndexesResponse> responseObserver)

Lists composite indexes.

Parameters
Name Description
request ListIndexesRequest
responseObserver io.grpc.stub.StreamObserver<ListIndexesResponse>

restoreDatabase(RestoreDatabaseRequest request, StreamObserver<Operation> responseObserver)

public void restoreDatabase(RestoreDatabaseRequest request, StreamObserver<Operation> responseObserver)

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.

Parameters
Name Description
request RestoreDatabaseRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

updateBackupSchedule(UpdateBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

public void updateBackupSchedule(UpdateBackupScheduleRequest request, StreamObserver<BackupSchedule> responseObserver)

Updates a backup schedule.

Parameters
Name Description
request UpdateBackupScheduleRequest
responseObserver io.grpc.stub.StreamObserver<BackupSchedule>

updateDatabase(UpdateDatabaseRequest request, StreamObserver<Operation> responseObserver)

public void updateDatabase(UpdateDatabaseRequest request, StreamObserver<Operation> responseObserver)

Updates a database.

Parameters
Name Description
request UpdateDatabaseRequest
responseObserver io.grpc.stub.StreamObserver<Operation>

updateField(UpdateFieldRequest request, StreamObserver<Operation> responseObserver)

public void updateField(UpdateFieldRequest request, StreamObserver<Operation> responseObserver)

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/*.

Parameters
Name Description
request UpdateFieldRequest
responseObserver io.grpc.stub.StreamObserver<Operation>