2020"""
2121from __future__ import annotations
2222
23- from datetime import datetime
23+ import datetime
24+
2425from typing import TYPE_CHECKING , Any , Generator , List , Optional , Union
2526
2627from google .api_core import exceptions , gapic_v1
@@ -57,7 +58,7 @@ def get(
5758 timeout : float | None = None ,
5859 * ,
5960 explain_options : Optional [ExplainOptions ] = None ,
60- read_time : Optional [datetime ] = None ,
61+ read_time : Optional [datetime . datetime ] = None ,
6162 ) -> QueryResultsList [AggregationResult ]:
6263 """Runs the aggregation query.
6364
@@ -80,10 +81,11 @@ def get(
8081 (Optional[:class:`~google.cloud.firestore_v1.query_profile.ExplainOptions`]):
8182 Options to enable query profiling for this query. When set,
8283 explain_metrics will be available on the returned generator.
83- read_time (Optional[datetime]): If set, reads documents as they were at the given
84- time. This must be a microsecond precision timestamp within the past one hour,
85- or if Point-in-Time Recovery is enabled, can additionally be a whole minute
86- timestamp within the past 7 days.
84+ read_time (Optional[datetime.datetime]): If set, reads documents as they were at the given
85+ time. This must be a timestamp within the past one hour, or if Point-in-Time Recovery
86+ is enabled, can additionally be a whole minute timestamp within the past 7 days. If no
87+ timezone is specified in the :class:`datetime.datetime` object, it is assumed to be UTC.
88+
8789
8890 Returns:
8991 QueryResultsList[AggregationResult]: The aggregation query results.
@@ -142,7 +144,7 @@ def _make_stream(
142144 retry : Union [retries .Retry , None , object ] = gapic_v1 .method .DEFAULT ,
143145 timeout : Optional [float ] = None ,
144146 explain_options : Optional [ExplainOptions ] = None ,
145- read_time : Optional [datetime ] = None ,
147+ read_time : Optional [datetime . datetime ] = None ,
146148 ) -> Generator [List [AggregationResult ], Any , Optional [ExplainMetrics ]]:
147149 """Internal method for stream(). Runs the aggregation query.
148150
@@ -166,10 +168,10 @@ def _make_stream(
166168 (Optional[:class:`~google.cloud.firestore_v1.query_profile.ExplainOptions`]):
167169 Options to enable query profiling for this query. When set,
168170 explain_metrics will be available on the returned generator.
169- read_time (Optional[datetime]): If set, reads documents as they were at the given
170- time. This must be a microsecond precision timestamp within the past one hour,
171- or if Point-in-Time Recovery is enabled, can additionally be a whole minute
172- timestamp within the past 7 days .
171+ read_time (Optional[datetime.datetime ]): If set, reads documents as they were at the given
172+ time. This must be a timestamp within the past one hour, or if Point-in-Time Recovery
173+ is enabled, can additionally be a whole minute timestamp within the past 7 days. If no
174+ timezone is specified in the :class:`datetime.datetime` object, it is assumed to be UTC .
173175
174176 Yields:
175177 List[AggregationResult]:
@@ -224,7 +226,7 @@ def stream(
224226 timeout : Optional [float ] = None ,
225227 * ,
226228 explain_options : Optional [ExplainOptions ] = None ,
227- read_time : Optional [datetime ] = None ,
229+ read_time : Optional [datetime . datetime ] = None ,
228230 ) -> StreamGenerator [List [AggregationResult ]]:
229231 """Runs the aggregation query.
230232
@@ -248,10 +250,10 @@ def stream(
248250 (Optional[:class:`~google.cloud.firestore_v1.query_profile.ExplainOptions`]):
249251 Options to enable query profiling for this query. When set,
250252 explain_metrics will be available on the returned generator.
251- read_time (Optional[datetime]): If set, reads documents as they were at the given
252- time. This must be a microsecond precision timestamp within the past one hour,
253- or if Point-in-Time Recovery is enabled, can additionally be a whole minute
254- timestamp within the past 7 days .
253+ read_time (Optional[datetime.datetime ]): If set, reads documents as they were at the given
254+ time. This must be a timestamp within the past one hour, or if Point-in-Time Recovery
255+ is enabled, can additionally be a whole minute timestamp within the past 7 days. If no
256+ timezone is specified in the :class:`datetime.datetime` object, it is assumed to be UTC .
255257
256258 Returns:
257259 `StreamGenerator[List[AggregationResult]]`:
0 commit comments