Module api

Module api 

Source

Structs§

Aggregation
Defines an aggregation that produces a single result.
AggregationResult
The result of a single bucket from a Firestore aggregation query. The keys of aggregate_fields are the same for all results in an aggregation query, unlike document queries which can have different fields present for each result.
ArrayValue
An array value.
Avg
Average of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including NULL are skipped. * If the aggregated values contain NaN, returns NaN. Infinity math follows IEEE-754 standards. * If the aggregated value set is empty, returns NULL. * Always returns the result as a double.
BatchGetDocumentsRequest
The request for Firestore.BatchGetDocuments.
BatchGetDocumentsResponse
The streamed response for Firestore.BatchGetDocuments.
BatchWriteRequest
The request for Firestore.BatchWrite.
BatchWriteResponse
The response from Firestore.BatchWrite.
BeginTransactionRequest
The request for Firestore.BeginTransaction.
BeginTransactionResponse
The response for Firestore.BeginTransaction.
BitSequence
A sequence of bits, encoded in a byte array. Each byte in the bitmap byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 or fewer bits. The padding defines the number of bits of the last byte to be ignored as “padding”. The values of these “padding” bits are unspecified and must be ignored. To retrieve the first bit, bit 0, calculate: (bitmap[0] & 0x01) != 0. To retrieve the second bit, bit 1, calculate: (bitmap[0] & 0x02) != 0. To retrieve the third bit, bit 2, calculate: (bitmap[0] & 0x04) != 0. To retrieve the fourth bit, bit 3, calculate: (bitmap[0] & 0x08) != 0. To retrieve bit n, calculate: (bitmap[n / 8] & (0x01 << (n % 8))) != 0. The “size” of a BitSequence (the number of bits it contains) is calculated by this formula: (bitmap.length * 8) - padding.
BloomFilter
A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2’s complement encoding. These two hash values, named h1 and h2, are then used to compute the hash_count hash values using the formula, starting at i=0: h(i) = h1 + (i * h2) These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.
CollectionSelector
A selection of a collection, such as messages as m1.
CommitRequest
The request for Firestore.Commit.
CommitResponse
The response for Firestore.Commit.
CompositeFilter
A filter that merges multiple other filters using the given operator.
Count
Count of documents that match the query. The COUNT(*) aggregation function operates on the entire document so it does not require a field reference.
Cursor
A position in a query result set.
Document
A Firestore document. Must not exceed 1 MiB - 4 bytes.
DocumentChange
A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.
DocumentDelete
A Document has been deleted. May be the result of multiple writes, including updates, the last of which deleted the Document. Multiple DocumentDelete messages may be returned for the same logical delete, if multiple targets are affected.
DocumentMask
A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value.
DocumentRemove
A Document has been removed from the view of the targets. Sent if the document is no longer relevant to a target and is out of view. Can be sent instead of a DocumentDelete or a DocumentChange if the server can not send the new value of the document. Multiple DocumentRemove messages may be returned for the same logical write or delete, if multiple targets are affected.
DocumentTransform
A transformation of a document.
DocumentsTarget
A target specified by a set of documents names.
Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
ExecutePipelineRequest
The request for Firestore.ExecutePipeline.
ExecutePipelineResponse
The response for Firestore.Execute.
ExecutionStats
Execution statistics for the query.
ExistenceFilter
A digest of all the documents that match a given target.
ExplainMetrics
Explain metrics for the query.
ExplainOptions
Explain options for the query.
ExplainStats
Pipeline explain stats. Depending on the explain options in the original request, this can contain the optimized plan and / or execution stats.
FieldFilter
A filter on a specific field.
FieldReference
A reference to a field in a document, ex: stats.operations.
FieldTransform
A transformation of a field of the document.
Filter
A filter.
FindNearest
Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.
Firestore
Central instance to access all Firestore related resource activities
Function
Represents an unevaluated scalar expression. For example, the expression like(user_name, "%alice%") is represented as: name: "like" args { field_reference: "user_name" } args { string_value: "%alice%" }
GoogleFirestoreAdminV1Backup
A Backup of a Cloud Firestore Database. The backup contains all documents and index configurations for the given database at a specific point in time.
GoogleFirestoreAdminV1BackupSchedule
A backup schedule for a Cloud Firestore Database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though.
GoogleFirestoreAdminV1BackupSource
Information about a backup that was used to restore a database.
GoogleFirestoreAdminV1BulkDeleteDocumentsRequest
The request for FirestoreAdmin.BulkDeleteDocuments. When both collection_ids and namespace_ids are set, only documents satisfying both conditions will be deleted. Requests with namespace_ids and collection_ids both empty will be rejected. Please use FirestoreAdmin.DeleteDatabase instead.
GoogleFirestoreAdminV1CloneDatabaseRequest
The request message for FirestoreAdmin.CloneDatabase.
GoogleFirestoreAdminV1CmekConfig
The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.
GoogleFirestoreAdminV1CustomerManagedEncryptionOptions
The configuration options for using CMEK (Customer Managed Encryption Key) encryption.
GoogleFirestoreAdminV1DailyRecurrence
Represents a recurring schedule that runs every day. The time zone is UTC.
GoogleFirestoreAdminV1Database
A Cloud Firestore Database.
GoogleFirestoreAdminV1DisableUserCredsRequest
The request for FirestoreAdmin.DisableUserCreds.
GoogleFirestoreAdminV1EnableUserCredsRequest
The request for FirestoreAdmin.EnableUserCreds.
GoogleFirestoreAdminV1EncryptionConfig
Encryption configuration for a new database being created from another source. The source could be a Backup or a PitrSnapshot.
GoogleFirestoreAdminV1ExportDocumentsRequest
The request for FirestoreAdmin.ExportDocuments.
GoogleFirestoreAdminV1Field
Represents a single field in the database. Fields are grouped by their “Collection Group”, which represent all collections in the database with the same ID.
GoogleFirestoreAdminV1FlatIndex
An index that stores vectors in a flat data structure, and supports exhaustive search.
GoogleFirestoreAdminV1GoogleDefaultEncryptionOptions
The configuration options for using Google default encryption.
GoogleFirestoreAdminV1ImportDocumentsRequest
The request for FirestoreAdmin.ImportDocuments.
GoogleFirestoreAdminV1Index
Cloud Firestore indexes enable simple and complex queries against documents in a database.
GoogleFirestoreAdminV1IndexConfig
The index configuration for this field.
GoogleFirestoreAdminV1IndexField
A field in an index. The field_path describes which field is indexed, the value_mode describes how the field value is indexed.
GoogleFirestoreAdminV1ListBackupSchedulesResponse
The response for FirestoreAdmin.ListBackupSchedules.
GoogleFirestoreAdminV1ListBackupsResponse
The response for FirestoreAdmin.ListBackups.
GoogleFirestoreAdminV1ListDatabasesResponse
The list of databases for a project.
GoogleFirestoreAdminV1ListFieldsResponse
The response for FirestoreAdmin.ListFields.
GoogleFirestoreAdminV1ListIndexesResponse
The response for FirestoreAdmin.ListIndexes.
GoogleFirestoreAdminV1ListUserCredsResponse
The response for FirestoreAdmin.ListUserCreds.
GoogleFirestoreAdminV1PitrSnapshot
A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database’s data is available for every minute up to the associated database’s data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour.
GoogleFirestoreAdminV1ResetUserPasswordRequest
The request for FirestoreAdmin.ResetUserPassword.
GoogleFirestoreAdminV1ResourceIdentity
Describes a Resource Identity principal.
GoogleFirestoreAdminV1RestoreDatabaseRequest
The request message for FirestoreAdmin.RestoreDatabase.
GoogleFirestoreAdminV1SourceEncryptionOptions
The configuration options for using the same encryption method as the source.
GoogleFirestoreAdminV1SourceInfo
Information about the provenance of this database.
GoogleFirestoreAdminV1Stats
Backup specific statistics.
GoogleFirestoreAdminV1TtlConfig
The TTL (time-to-live) configuration for documents that have this Field set. Storing a timestamp value into a TTL-enabled field will be treated as the document’s absolute expiration time. Timestamp values in the past indicate that the document is eligible for immediate expiration. Using any other data type or leaving the field absent will disable expiration for the individual document.
GoogleFirestoreAdminV1UserCreds
A Cloud Firestore User Creds.
GoogleFirestoreAdminV1VectorConfig
The index configuration to support vector search operations
GoogleFirestoreAdminV1WeeklyRecurrence
Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC.
GoogleLongrunningCancelOperationRequest
The request message for Operations.CancelOperation.
GoogleLongrunningListOperationsResponse
The response message for Operations.ListOperations.
GoogleLongrunningOperation
This resource represents a long-running operation that is the result of a network API call.
LatLng
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
ListCollectionIdsRequest
The request for Firestore.ListCollectionIds.
ListCollectionIdsResponse
The response from Firestore.ListCollectionIds.
ListDocumentsResponse
The response for Firestore.ListDocuments.
ListLocationsResponse
The response message for Locations.ListLocations.
ListenRequest
A request for Firestore.Listen
ListenResponse
The response for Firestore.Listen.
Location
A resource that represents a Google Cloud location.
MapValue
A map value.
Order
An order on a field.
PartitionQueryRequest
The request for Firestore.PartitionQuery.
PartitionQueryResponse
The response for Firestore.PartitionQuery.
Pipeline
A Firestore query represented as an ordered list of operations / stages.
PlanSummary
Planning phase information for the query.
Precondition
A precondition on a document, used for conditional operations.
ProjectDatabaseBackupScheduleCreateCall
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.
ProjectDatabaseBackupScheduleDeleteCall
Deletes a backup schedule.
ProjectDatabaseBackupScheduleGetCall
Gets information about a backup schedule.
ProjectDatabaseBackupScheduleListCall
List backup schedules.
ProjectDatabaseBackupSchedulePatchCall
Updates a backup schedule.
ProjectDatabaseBulkDeleteDocumentCall
Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete
ProjectDatabaseCloneCall
Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. 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 database. The long-running operation can be used to track the progress of the clone, with the Operation’s metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.
ProjectDatabaseCollectionGroupFieldGetCall
Gets the metadata and configuration for a Field.
ProjectDatabaseCollectionGroupFieldListCall
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:*.
ProjectDatabaseCollectionGroupFieldPatchCall
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/*.
ProjectDatabaseCollectionGroupIndexCreateCall
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.
ProjectDatabaseCollectionGroupIndexDeleteCall
Deletes a composite index.
ProjectDatabaseCollectionGroupIndexGetCall
Gets a composite index.
ProjectDatabaseCollectionGroupIndexListCall
Lists composite indexes.
ProjectDatabaseCreateCall
Create a database.
ProjectDatabaseDeleteCall
Deletes a database.
ProjectDatabaseDocumentBatchGetCall
Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.
ProjectDatabaseDocumentBatchWriteCall
Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.
ProjectDatabaseDocumentBeginTransactionCall
Starts a new transaction.
ProjectDatabaseDocumentCommitCall
Commits a transaction, while optionally updating documents.
ProjectDatabaseDocumentCreateDocumentCall
Creates a new document.
ProjectDatabaseDocumentDeleteCall
Deletes a document.
ProjectDatabaseDocumentExecutePipelineCall
Executes a pipeline query.
ProjectDatabaseDocumentGetCall
Gets a single document.
ProjectDatabaseDocumentListCall
Lists documents.
ProjectDatabaseDocumentListCollectionIdCall
Lists all the collection IDs underneath a document.
ProjectDatabaseDocumentListDocumentCall
Lists documents.
ProjectDatabaseDocumentListenCall
Listens to changes. This method is only available via gRPC or WebChannel (not REST).
ProjectDatabaseDocumentPartitionQueryCall
Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.
ProjectDatabaseDocumentPatchCall
Updates or inserts a document.
ProjectDatabaseDocumentRollbackCall
Rolls back a transaction.
ProjectDatabaseDocumentRunAggregationQueryCall
Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true );
ProjectDatabaseDocumentRunQueryCall
Runs a query.
ProjectDatabaseDocumentWriteCall
Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
ProjectDatabaseExportDocumentCall
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
ProjectDatabaseGetCall
Gets information about a database.
ProjectDatabaseImportDocumentCall
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.
ProjectDatabaseListCall
List all the databases in the project.
ProjectDatabaseOperationCancelCall
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
ProjectDatabaseOperationDeleteCall
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
ProjectDatabaseOperationGetCall
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
ProjectDatabaseOperationListCall
Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.
ProjectDatabasePatchCall
Updates a database.
ProjectDatabaseRestoreCall
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.
ProjectDatabaseUserCredCreateCall
Create a user creds.
ProjectDatabaseUserCredDeleteCall
Deletes a user creds.
ProjectDatabaseUserCredDisableCall
Disables a user creds. No-op if the user creds are already disabled.
ProjectDatabaseUserCredEnableCall
Enables a user creds. No-op if the user creds are already enabled.
ProjectDatabaseUserCredGetCall
Gets a user creds resource. Note that the returned resource does not contain the secret value itself.
ProjectDatabaseUserCredListCall
List all user creds in the database. Note that the returned resource does not contain the secret value itself.
ProjectDatabaseUserCredResetPasswordCall
Resets the password of a user creds.
ProjectLocationBackupDeleteCall
Deletes a backup.
ProjectLocationBackupGetCall
Gets information about a backup.
ProjectLocationBackupListCall
Lists all the backups.
ProjectLocationGetCall
Gets information about a location.
ProjectLocationListCall
Lists information about the supported locations for this service.
ProjectMethods
A builder providing access to all methods supported on project resources. It is not used directly, but through the Firestore hub.
Projection
The projection of document’s fields to return.
QueryTarget
A target specified by a query.
ReadOnly
Options for a transaction that can only be used to read documents.
ReadWrite
Options for a transaction that can be used to read and write documents. Firestore does not allow 3rd party auth requests to create read-write. transactions.
RollbackRequest
The request for Firestore.Rollback.
RunAggregationQueryRequest
The request for Firestore.RunAggregationQuery.
RunAggregationQueryResponse
The response for Firestore.RunAggregationQuery.
RunQueryRequest
The request for Firestore.RunQuery.
RunQueryResponse
The response for Firestore.RunQuery.
Stage
A single operation within a pipeline. A stage is made up of a unique name, and a list of arguments. The exact number of arguments & types is dependent on the stage type. To give an example, the stage filter(state = "MD") would be encoded as: name: "filter" args { function_value { name: "eq" args { field_reference_value: "state" } args { string_value: "MD" } } } See public documentation for the full list.
Status
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
StructuredAggregationQuery
Firestore query for running an aggregation over a StructuredQuery.
StructuredPipeline
A Firestore query represented as an ordered list of operations / stages. This is considered the top-level function which plans and executes a query. It is logically equivalent to query(stages, options), but prevents the client from having to build a function wrapper.
StructuredQuery
A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order_by + start_at + end_at 5. offset 6. limit 7. find_nearest
Sum
Sum of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including NULL are skipped. * If the aggregated values contain NaN, returns NaN. Infinity math follows IEEE-754 standards. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.
Target
A specification of a set of documents to listen to.
TargetChange
Targets being watched have changed.
TransactionOptions
Options for creating a new transaction.
UnaryFilter
A filter with a single operand.
Value
A message that can hold any of the supported value types.
Write
A write on a document.
WriteRequest
The request for Firestore.Write. The first request creates a stream, or resumes an existing one from a token. When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request. When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request.
WriteResponse
The response for Firestore.Write.
WriteResult
The result of applying a write.

Enums§

Scope
Identifies the an OAuth2 authorization scope. A scope is needed when requesting an authorization token.