Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .librarian/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ libraries:
tag_format: '{id}-v{version}'
- id: google-cloud-firestore
version: 2.27.0
last_generated_commit: 59d5f2b46924714af627ac29ea6de78641a00835
last_generated_commit: a78b5838b801428bfe5b85758727a46d830b7f39
apis:
- path: google/firestore/admin/v1
service_config: firestore_v1.yaml
Expand Down
1 change: 0 additions & 1 deletion librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@ libraries:
- docs/firestore_v1/transaction.rst
- docs/firestore_v1/transforms.rst
- docs/firestore_v1/types.rst
skip_generate: true
python:
library_type: GAPIC_COMBO
opt_args_by_api:
Expand Down
24 changes: 11 additions & 13 deletions packages/google-cloud-firestore/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"name": "firestore",
"name_pretty": "Cloud Firestore API",
"product_documentation": "https://cloud.google.com/firestore",
"api_description": "is a fully-managed NoSQL document database for mobile, web, and server development from Firebase and Google Cloud Platform. It's backed by a multi-region replicated database that ensures once data is committed, it's durable even in the face of unexpected disasters. Not only that, but despite being a distributed database, it's also strongly consistent and offers seamless integration with other Firebase and Google Cloud Platform products, including Google Cloud Functions.",
"api_id": "firestore.googleapis.com",
"api_shortname": "firestore",
"client_documentation": "https://cloud.google.com/python/docs/reference/firestore/latest",
"default_version": "v1",
"distribution_name": "google-cloud-firestore",
"issue_tracker": "https://issuetracker.google.com/savedsearches/5337669",
"release_level": "stable",
"language": "python",
"library_type": "GAPIC_COMBO",
"repo": "googleapis/google-cloud-python",
"distribution_name": "google-cloud-firestore",
"api_id": "firestore.googleapis.com",
"requires_billing": true,
"default_version": "v1",
"codeowner_team": "@googleapis/api-firestore @googleapis/api-firestore-partners",
"api_shortname": "firestore",
"api_description": "is a fully-managed NoSQL document database for mobile, web, and server development from Firebase and Google Cloud Platform. It's backed by a multi-region replicated database that ensures once data is committed, it's durable even in the face of unexpected disasters. Not only that, but despite being a distributed database, it's also strongly consistent and offers seamless integration with other Firebase and Google Cloud Platform products, including Google Cloud Functions."
}
"name": "firestore",
"name_pretty": "Cloud Firestore API",
"product_documentation": "https://cloud.google.com/firestore",
"release_level": "stable",
"repo": "googleapis/google-cloud-python"
}
4 changes: 2 additions & 2 deletions packages/google-cloud-firestore/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Supported Python Versions
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.7, including 3.14
Python >= 3.9, including 3.14

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.6
Python <= 3.8

If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-firestore/docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Supported Python Versions
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.7, including 3.14
Python >= 3.9, including 3.14

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.6
Python <= 3.8

If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.
Expand Down
36 changes: 0 additions & 36 deletions packages/google-cloud-firestore/google/cloud/firestore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
AsyncClient,
AsyncCollectionReference,
AsyncDocumentReference,
AsyncPipeline,
AsyncPipelineStream,
Comment thread
jskeet marked this conversation as resolved.
AsyncQuery,
AsyncTransaction,
AsyncWriteBatch,
Expand All @@ -45,31 +43,15 @@
ExistsOption,
ExplainOptions,
FieldFilter,
FindNearestOptions,
GeoPoint,
Increment,
LastUpdateOption,
Maximum,
Minimum,
Or,
Ordering,
Pipeline,
PipelineDataType,
PipelineExplainOptions,
PipelineResult,
PipelineSnapshot,
PipelineSource,
PipelineStream,
Query,
ReadAfterWriteError,
SampleOptions,
SearchOptions,
SubPipeline,
TimeGranularity,
TimePart,
TimeUnit,
Transaction,
UnnestOptions,
Watch,
WriteBatch,
WriteOption,
Expand All @@ -86,8 +68,6 @@
"AsyncClient",
"AsyncCollectionReference",
"AsyncDocumentReference",
"AsyncPipeline",
"AsyncPipelineStream",
"AsyncQuery",
"async_transactional",
"AsyncTransaction",
Expand All @@ -103,34 +83,18 @@
"ExistsOption",
"ExplainOptions",
"FieldFilter",
"FindNearestOptions",
"GeoPoint",
"Increment",
"LastUpdateOption",
"Maximum",
"Minimum",
"Or",
"Ordering",
"Pipeline",
"PipelineDataType",
"PipelineExplainOptions",
"PipelineResult",
"PipelineSnapshot",
"PipelineSource",
"PipelineStream",
"Query",
"ReadAfterWriteError",
"SERVER_TIMESTAMP",
"SampleOptions",
"SearchOptions",
"SubPipeline",
"TimeGranularity",
"TimePart",
"TimeUnit",
"Transaction",
"transactional",
"types",
"UnnestOptions",
"Watch",
"WriteBatch",
"WriteOption",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from typing import MutableMapping, MutableSequence

import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import proto # type: ignore

from google.cloud.firestore_admin_v1.types import index
Expand Down Expand Up @@ -123,19 +124,34 @@ class TtlConfig(proto.Message):
r"""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. For Enterprise edition
databases, the timestamp value may also be stored in an array value
in the TTL-enabled field.
A timestamp stored in a TTL-enabled field will be used to determine
the expiration time of the document. The expiration time is the sum
of the timestamp value and the ``expiration_offset``.

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.
For Enterprise edition databases, the timestamp value may
alternatively be stored in an array value in the TTL-enabled field.

An expiration time in the past indicates 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.

Attributes:
state (google.cloud.firestore_admin_v1.types.Field.TtlConfig.State):
Output only. The state of the TTL
configuration.
expiration_offset (google.protobuf.duration_pb2.Duration):
Optional. The offset, relative to the timestamp value from
the TTL-enabled field, used to determine the document's
expiration time.

``expiration_offset.seconds`` must be between 0 and
2,147,483,647 inclusive. Values more precise than seconds
are rejected.

If unset, defaults to 0, in which case the expiration time
is the same as the timestamp value from the TTL-enabled
field.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -172,6 +188,11 @@ class State(proto.Enum):
number=1,
enum="Field.TtlConfig.State",
)
expiration_offset: duration_pb2.Duration = proto.Field(
proto.MESSAGE,
number=3,
message=duration_pb2.Duration,
)

name: str = proto.Field(
proto.STRING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from typing import MutableMapping, MutableSequence

import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
import proto # type: ignore

Expand Down Expand Up @@ -210,6 +211,10 @@ class TtlConfigDelta(proto.Message):
change_type (google.cloud.firestore_admin_v1.types.FieldOperationMetadata.TtlConfigDelta.ChangeType):
Specifies how the TTL configuration is
changing.
expiration_offset (google.protobuf.duration_pb2.Duration):
The offset, relative to the timestamp value
in the TTL-enabled field, used determine the
document's expiration time.
"""

class ChangeType(proto.Enum):
Expand All @@ -233,6 +238,11 @@ class ChangeType(proto.Enum):
number=1,
enum="FieldOperationMetadata.TtlConfigDelta.ChangeType",
)
expiration_offset: duration_pb2.Duration = proto.Field(
proto.MESSAGE,
number=3,
message=duration_pb2.Duration,
)

start_time: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,44 +33,20 @@
from google.cloud.firestore_v1.async_client import AsyncClient
from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
from google.cloud.firestore_v1.async_document import AsyncDocumentReference
from google.cloud.firestore_v1.async_pipeline import AsyncPipeline
Comment thread
jskeet marked this conversation as resolved.
from google.cloud.firestore_v1.async_query import AsyncQuery
from google.cloud.firestore_v1.async_transaction import (
AsyncTransaction,
async_transactional,
)
from google.cloud.firestore_v1.base_aggregation import CountAggregation
from google.cloud.firestore_v1.base_document import DocumentSnapshot
from google.cloud.firestore_v1.base_pipeline import SubPipeline
from google.cloud.firestore_v1.base_query import And, FieldFilter, Or
from google.cloud.firestore_v1.batch import WriteBatch
from google.cloud.firestore_v1.client import Client
from google.cloud.firestore_v1.collection import CollectionReference
from google.cloud.firestore_v1.document import DocumentReference
from google.cloud.firestore_v1.pipeline import Pipeline
from google.cloud.firestore_v1.pipeline_result import (
AsyncPipelineStream,
PipelineResult,
PipelineSnapshot,
PipelineStream,
)
from google.cloud.firestore_v1.pipeline_source import PipelineSource
from google.cloud.firestore_v1.pipeline_types import (
FindNearestOptions,
Ordering,
PipelineDataType,
SampleOptions,
SearchOptions,
TimeGranularity,
TimePart,
TimeUnit,
UnnestOptions,
)
from google.cloud.firestore_v1.query import CollectionGroup, Query
from google.cloud.firestore_v1.query_profile import (
ExplainOptions,
PipelineExplainOptions,
)
from google.cloud.firestore_v1.query_profile import ExplainOptions
from google.cloud.firestore_v1.transaction import Transaction, transactional
from google.cloud.firestore_v1.transforms import (
DELETE_FIELD,
Expand Down Expand Up @@ -139,8 +115,6 @@
"AsyncClient",
"AsyncCollectionReference",
"AsyncDocumentReference",
"AsyncPipeline",
"AsyncPipelineStream",
"AsyncQuery",
"async_transactional",
"AsyncTransaction",
Expand All @@ -156,34 +130,18 @@
"ExistsOption",
"ExplainOptions",
"FieldFilter",
"FindNearestOptions",
"GeoPoint",
"Increment",
"LastUpdateOption",
"Maximum",
"Minimum",
"Or",
"Ordering",
"Pipeline",
"PipelineDataType",
"PipelineExplainOptions",
"PipelineResult",
"PipelineSnapshot",
"PipelineSource",
"PipelineStream",
"Query",
"ReadAfterWriteError",
"SERVER_TIMESTAMP",
"SampleOptions",
"SearchOptions",
"SubPipeline",
"TimeGranularity",
"TimePart",
"TimeUnit",
"Transaction",
"transactional",
"types",
"UnnestOptions",
"Watch",
"WriteBatch",
"WriteOption",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Sequence, TypeVar, Type

from typing import TYPE_CHECKING, Sequence, Type, TypeVar

from google.cloud.firestore_v1 import pipeline_stages as stages
from google.cloud.firestore_v1 import pipeline_types as types
Expand All @@ -26,8 +25,8 @@
BooleanExpression,
Expression,
Field,
Selectable,
FunctionExpression,
Selectable,
_PipelineValueExpression,
)
from google.cloud.firestore_v1.types.pipeline import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

from __future__ import annotations

from typing import Generic, TypeVar, TYPE_CHECKING
from typing import TYPE_CHECKING, Generic, TypeVar

from google.cloud.firestore_v1 import pipeline_stages as stages
from google.cloud.firestore_v1._helpers import DOCUMENT_PATH_DELIMITER
from google.cloud.firestore_v1.base_pipeline import _BasePipeline, SubPipeline
from google.cloud.firestore_v1.base_pipeline import SubPipeline, _BasePipeline

if TYPE_CHECKING: # pragma: NO COVER
from google.cloud.firestore_v1.async_client import AsyncClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from google.cloud.firestore_v1._helpers import encode_value
from google.cloud.firestore_v1.base_vector_query import DistanceMeasure
from google.cloud.firestore_v1.pipeline_expressions import (
CONSTANT_TYPE,
AggregateFunction,
AliasedExpression,
BooleanExpression,
CONSTANT_TYPE,
Expression,
Field,
Selectable,
Expand Down
Loading
Loading