Firestore v1 API - Namespace Google.Cloud.Firestore.V1 (3.6.0)

Classes

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.

BatchGetDocumentsRequest

The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].

BatchGetDocumentsResponse

The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].

BatchWriteRequest

The request for [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].

BatchWriteResponse

The response from [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].

BeginTransactionRequest

The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].

BeginTransactionResponse

The response for [Firestore.BeginTransaction][google.firestore.v1.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.

CommitRequest

The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit].

CommitResponse

The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit].

CreateDocumentRequest

The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].

Cursor

A position in a query result set.

DeleteDocumentRequest

The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].

Document

A Firestore document.

Must not exceed 1 MiB - 4 bytes.

DocumentChange

A [Document][google.firestore.v1.Document] has changed.

May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that ultimately resulted in a new value for the [Document][google.firestore.v1.Document].

Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical change, if multiple targets are affected.

DocumentDelete

A [Document][google.firestore.v1.Document] has been deleted.

May be the result of multiple [writes][google.firestore.v1.Write], including updates, the last of which deleted the [Document][google.firestore.v1.Document].

Multiple [DocumentDelete][google.firestore.v1.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][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value].

DocumentRemove

A [Document][google.firestore.v1.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][google.firestore.v1.DocumentRemove] messages may be returned for the same logical write or delete, if multiple targets are affected.

DocumentTransform

A transformation of a document.

DocumentTransform.Types

Container for nested types declared in the DocumentTransform message type.

DocumentTransform.Types.FieldTransform

A transformation of a field of the document.

DocumentTransform.Types.FieldTransform.Types

Container for nested types declared in the FieldTransform message type.

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.

Firestore

The Cloud Firestore service.

Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL document database that simplifies storing, syncing, and querying data for your mobile, web, and IoT apps at global scale. Its client libraries provide live synchronization and offline support, while its security features and integrations with Firebase and Google Cloud Platform accelerate building truly serverless apps.

Firestore.FirestoreBase

Base class for server-side implementations of Firestore

Firestore.FirestoreClient

Client for Firestore

FirestoreClient

Firestore client wrapper, for convenient use.

FirestoreClient.BatchGetDocumentsStream

Server streaming methods for BatchGetDocuments(BatchGetDocumentsRequest, CallSettings) .

FirestoreClient.ListenStream

Bidirectional streaming methods for Listen(CallSettings, BidirectionalStreamingSettings).

FirestoreClient.RunAggregationQueryStream

Server streaming methods for RunAggregationQuery(RunAggregationQueryRequest, CallSettings).

FirestoreClient.RunQueryStream

Server streaming methods for RunQuery(RunQueryRequest, CallSettings).

FirestoreClient.WriteStream

Bidirectional streaming methods for Write(CallSettings, BidirectionalStreamingSettings).

FirestoreClientBuilder

Builder class for FirestoreClient to provide simple configuration of credentials, endpoint etc.

FirestoreClientImpl

Firestore client wrapper implementation, for convenient use.

FirestoreSettings

Settings for FirestoreClient instances.

GetDocumentRequest

The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].

ListCollectionIdsRequest

The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].

ListCollectionIdsResponse

The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].

ListDocumentsRequest

The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].

ListDocumentsResponse

The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].

ListenRequest

A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen]

ListenResponse

The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen].

MapValue

A map value.

PartitionQueryRequest

The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].

PartitionQueryResponse

The response for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].

PlanSummary

Planning phase information for the query.

Precondition

A precondition on a document, used for conditional operations.

RollbackRequest

The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback].

RunAggregationQueryRequest

The request for [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery].

RunAggregationQueryResponse

The response for [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery].

RunQueryRequest

The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].

RunQueryResponse

The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].

StructuredAggregationQuery

Firestore query for running an aggregation over a [StructuredQuery][google.firestore.v1.StructuredQuery].

StructuredAggregationQuery.Types

Container for nested types declared in the StructuredAggregationQuery message type.

StructuredAggregationQuery.Types.Aggregation

Defines an aggregation that produces a single result.

StructuredAggregationQuery.Types.Aggregation.Types

Container for nested types declared in the Aggregation message type.

StructuredAggregationQuery.Types.Aggregation.Types.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.

StructuredAggregationQuery.Types.Aggregation.Types.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.

StructuredAggregationQuery.Types.Aggregation.Types.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.

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

StructuredQuery.Types

Container for nested types declared in the StructuredQuery message type.

StructuredQuery.Types.CollectionSelector

A selection of a collection, such as messages as m1.

StructuredQuery.Types.CompositeFilter

A filter that merges multiple other filters using the given operator.

StructuredQuery.Types.CompositeFilter.Types

Container for nested types declared in the CompositeFilter message type.

StructuredQuery.Types.FieldFilter

A filter on a specific field.

StructuredQuery.Types.FieldFilter.Types

Container for nested types declared in the FieldFilter message type.

StructuredQuery.Types.FieldReference

A reference to a field in a document, ex: stats.operations.

StructuredQuery.Types.Filter

A filter.

StructuredQuery.Types.FindNearest

Nearest Neighbors search config.

StructuredQuery.Types.FindNearest.Types

Container for nested types declared in the FindNearest message type.

StructuredQuery.Types.Order

An order on a field.

StructuredQuery.Types.Projection

The projection of document's fields to return.

StructuredQuery.Types.UnaryFilter

A filter with a single operand.

StructuredQuery.Types.UnaryFilter.Types

Container for nested types declared in the UnaryFilter message type.

Target

A specification of a set of documents to listen to.

Target.Types

Container for nested types declared in the Target message type.

Target.Types.DocumentsTarget

A target specified by a set of documents names.

Target.Types.QueryTarget

A target specified by a query.

TargetChange

Targets being watched have changed.

TargetChange.Types

Container for nested types declared in the TargetChange message type.

TransactionOptions

Options for creating a new transaction.

TransactionOptions.Types

Container for nested types declared in the TransactionOptions message type.

TransactionOptions.Types.ReadOnly

Options for a transaction that can only be used to read documents.

TransactionOptions.Types.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.

UpdateDocumentRequest

The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].

Value

A message that can hold any of the supported value types.

Write

A write on a document.

WriteRequest

The request for [Firestore.Write][google.firestore.v1.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][google.firestore.v1.Firestore.Write].

WriteResult

The result of applying a write.

Enums

BatchGetDocumentsRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

BatchGetDocumentsResponse.ResultOneofCase

Enum of possible cases for the "result" oneof.

DocumentTransform.Types.FieldTransform.TransformTypeOneofCase

Enum of possible cases for the "transform_type" oneof.

DocumentTransform.Types.FieldTransform.Types.ServerValue

A value that is calculated by the server.

GetDocumentRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

ListCollectionIdsRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

ListDocumentsRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

ListenRequest.TargetChangeOneofCase

Enum of possible cases for the "target_change" oneof.

ListenResponse.ResponseTypeOneofCase

Enum of possible cases for the "response_type" oneof.

PartitionQueryRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

PartitionQueryRequest.QueryTypeOneofCase

Enum of possible cases for the "query_type" oneof.

Precondition.ConditionTypeOneofCase

Enum of possible cases for the "condition_type" oneof.

RunAggregationQueryRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

RunAggregationQueryRequest.QueryTypeOneofCase

Enum of possible cases for the "query_type" oneof.

RunQueryRequest.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

RunQueryRequest.QueryTypeOneofCase

Enum of possible cases for the "query_type" oneof.

RunQueryResponse.ContinuationSelectorOneofCase

Enum of possible cases for the "continuation_selector" oneof.

StructuredAggregationQuery.QueryTypeOneofCase

Enum of possible cases for the "query_type" oneof.

StructuredAggregationQuery.Types.Aggregation.OperatorOneofCase

Enum of possible cases for the "operator" oneof.

StructuredQuery.Types.CompositeFilter.Types.Operator

A composite filter operator.

StructuredQuery.Types.Direction

A sort direction.

StructuredQuery.Types.FieldFilter.Types.Operator

A field filter operator.

StructuredQuery.Types.Filter.FilterTypeOneofCase

Enum of possible cases for the "filter_type" oneof.

StructuredQuery.Types.FindNearest.Types.DistanceMeasure

The distance measure to use when comparing vectors.

StructuredQuery.Types.UnaryFilter.OperandTypeOneofCase

Enum of possible cases for the "operand_type" oneof.

StructuredQuery.Types.UnaryFilter.Types.Operator

A unary operator.

Target.ResumeTypeOneofCase

Enum of possible cases for the "resume_type" oneof.

Target.TargetTypeOneofCase

Enum of possible cases for the "target_type" oneof.

Target.Types.QueryTarget.QueryTypeOneofCase

Enum of possible cases for the "query_type" oneof.

TargetChange.Types.TargetChangeType

The type of change.

TransactionOptions.ModeOneofCase

Enum of possible cases for the "mode" oneof.

TransactionOptions.Types.ReadOnly.ConsistencySelectorOneofCase

Enum of possible cases for the "consistency_selector" oneof.

Value.ValueTypeOneofCase

Enum of possible cases for the "value_type" oneof.

Write.OperationOneofCase

Enum of possible cases for the "operation" oneof.