Skip to content

Commit 4d054b0

Browse files
chore: use gapic-generator-python 0.65.1 (#563)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 441524537 Source-Link: googleapis/googleapis@2a27391 Source-Link: googleapis/googleapis-gen@ab6756a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 docs: clarifications for filters PiperOrigin-RevId: 441242400 Source-Link: googleapis/googleapis@9ef0015 Source-Link: googleapis/googleapis-gen@a0735cb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTA3MzVjYjVkNjEzYzkxMDIzMjQ3OWI0ODc5MjljYzQ1ZDdkNDg1NSJ9 chore: Use gapic-generator-python 0.65.0 docs: fix type in docstring for map fields PiperOrigin-RevId: 440970084 Source-Link: googleapis/googleapis@5e0a3d5 Source-Link: googleapis/googleapis-gen@b0c628a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9
1 parent 984f98d commit 4d054b0

File tree

14 files changed

+189
-77
lines changed

14 files changed

+189
-77
lines changed

google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core.client_options import ClientOptions
@@ -268,7 +268,6 @@ async def create_index(
268268
metadata for the operation will be the type
269269
[IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
270270
271-
272271
.. code-block:: python
273272
274273
from google.cloud import firestore_admin_v1
@@ -831,7 +830,6 @@ async def update_field(
831830
the special ``Field`` with resource name:
832831
``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``.
833832
834-
835833
.. code-block:: python
836834
837835
from google.cloud import firestore_admin_v1
@@ -957,7 +955,6 @@ async def list_fields(
957955
with the filter set to ``indexConfig.usesAncestorConfig:false``
958956
.
959957
960-
961958
.. code-block:: python
962959
963960
from google.cloud import firestore_admin_v1
@@ -1090,7 +1087,6 @@ async def export_documents(
10901087
refer to:
10911088
https://cloud.google.com/firestore/docs/manage-data/export-import
10921089
1093-
10941090
.. code-block:: python
10951091
10961092
from google.cloud import firestore_admin_v1
@@ -1209,7 +1205,6 @@ async def import_documents(
12091205
cancelled, it is possible that a subset of the data has
12101206
already been imported to Cloud Firestore.
12111207
1212-
12131208
.. code-block:: python
12141209
12151210
from google.cloud import firestore_admin_v1

google/cloud/firestore_admin_v1/services/firestore_admin/client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core import client_options as client_options_lib
@@ -549,7 +549,6 @@ def create_index(
549549
metadata for the operation will be the type
550550
[IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
551551
552-
553552
.. code-block:: python
554553
555554
from google.cloud import firestore_admin_v1
@@ -1068,7 +1067,6 @@ def update_field(
10681067
the special ``Field`` with resource name:
10691068
``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``.
10701069
1071-
10721070
.. code-block:: python
10731071
10741072
from google.cloud import firestore_admin_v1
@@ -1194,7 +1192,6 @@ def list_fields(
11941192
with the filter set to ``indexConfig.usesAncestorConfig:false``
11951193
.
11961194
1197-
11981195
.. code-block:: python
11991196
12001197
from google.cloud import firestore_admin_v1
@@ -1316,7 +1313,6 @@ def export_documents(
13161313
refer to:
13171314
https://cloud.google.com/firestore/docs/manage-data/export-import
13181315
1319-
13201316
.. code-block:: python
13211317
13221318
from google.cloud import firestore_admin_v1
@@ -1435,7 +1431,6 @@ def import_documents(
14351431
cancelled, it is possible that a subset of the data has
14361432
already been imported to Cloud Firestore.
14371433
1438-
14391434
.. code-block:: python
14401435
14411436
from google.cloud import firestore_admin_v1

google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def __init__(
8989
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
9090
be used for service account credentials.
9191
"""
92+
9293
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9394
if ":" not in host:
9495
host += ":443"
@@ -375,5 +376,9 @@ def update_database(
375376
]:
376377
raise NotImplementedError()
377378

379+
@property
380+
def kind(self) -> str:
381+
raise NotImplementedError()
382+
378383

379384
__all__ = ("FirestoreAdminTransport",)

google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,5 +641,9 @@ def update_database(
641641
def close(self):
642642
self.grpc_channel.close()
643643

644+
@property
645+
def kind(self) -> str:
646+
return "grpc"
647+
644648

645649
__all__ = ("FirestoreAdminGrpcTransport",)

google/cloud/firestore_admin_v1/types/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .database import Database
17-
from .field import Field
16+
from .database import (
17+
Database,
18+
)
19+
from .field import (
20+
Field,
21+
)
1822
from .firestore_admin import (
1923
CreateIndexRequest,
2024
DeleteIndexRequest,
@@ -33,8 +37,12 @@
3337
UpdateDatabaseRequest,
3438
UpdateFieldRequest,
3539
)
36-
from .index import Index
37-
from .location import LocationMetadata
40+
from .index import (
41+
Index,
42+
)
43+
from .location import (
44+
LocationMetadata,
45+
)
3846
from .operation import (
3947
ExportDocumentsMetadata,
4048
ExportDocumentsResponse,

google/cloud/firestore_v1/services/firestore/async_client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re
1919
from typing import (
2020
Dict,
21+
Mapping,
2122
Optional,
2223
AsyncIterable,
2324
Awaitable,
@@ -637,7 +638,6 @@ def batch_get_documents(
637638
Documents returned by this method are not guaranteed to
638639
be returned in the same order that they were requested.
639640
640-
641641
.. code-block:: python
642642
643643
from google.cloud import firestore_v1
@@ -835,7 +835,6 @@ async def commit(
835835
r"""Commits a transaction, while optionally updating
836836
documents.
837837
838-
839838
.. code-block:: python
840839
841840
from google.cloud import firestore_v1
@@ -1146,7 +1145,6 @@ async def partition_query(
11461145
used by RunQuery as starting/end points for the query
11471146
results.
11481147
1149-
11501148
.. code-block:: python
11511149
11521150
from google.cloud import firestore_v1
@@ -1246,7 +1244,6 @@ def write(
12461244
r"""Streams batches of document updates and deletes, in
12471245
order.
12481246
1249-
12501247
.. code-block:: python
12511248
12521249
from google.cloud import firestore_v1
@@ -1565,7 +1562,6 @@ async def batch_write(
15651562
If you require an atomically applied set of writes, use
15661563
[Commit][google.firestore.v1.Firestore.Commit] instead.
15671564
1568-
15691565
.. code-block:: python
15701566
15711567
from google.cloud import firestore_v1

google/cloud/firestore_v1/services/firestore/client.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
Optional,
23+
Iterable,
24+
Iterator,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030
import pkg_resources
2131

2232
from google.api_core import client_options as client_options_lib
@@ -791,7 +801,6 @@ def batch_get_documents(
791801
Documents returned by this method are not guaranteed to
792802
be returned in the same order that they were requested.
793803
794-
795804
.. code-block:: python
796805
797806
from google.cloud import firestore_v1
@@ -966,7 +975,6 @@ def commit(
966975
r"""Commits a transaction, while optionally updating
967976
documents.
968977
969-
970978
.. code-block:: python
971979
972980
from google.cloud import firestore_v1
@@ -1244,7 +1252,6 @@ def partition_query(
12441252
used by RunQuery as starting/end points for the query
12451253
results.
12461254
1247-
12481255
.. code-block:: python
12491256
12501257
from google.cloud import firestore_v1
@@ -1333,7 +1340,6 @@ def write(
13331340
r"""Streams batches of document updates and deletes, in
13341341
order.
13351342
1336-
13371343
.. code-block:: python
13381344
13391345
from google.cloud import firestore_v1
@@ -1620,7 +1626,6 @@ def batch_write(
16201626
If you require an atomically applied set of writes, use
16211627
[Commit][google.firestore.v1.Firestore.Commit] instead.
16221628
1623-
16241629
.. code-block:: python
16251630
16261631
from google.cloud import firestore_v1

google/cloud/firestore_v1/services/firestore/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def __init__(
8686
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8787
be used for service account credentials.
8888
"""
89+
8990
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9091
if ":" not in host:
9192
host += ":443"
@@ -521,5 +522,9 @@ def create_document(
521522
]:
522523
raise NotImplementedError()
523524

525+
@property
526+
def kind(self) -> str:
527+
raise NotImplementedError()
528+
524529

525530
__all__ = ("FirestoreTransport",)

google/cloud/firestore_v1/services/firestore/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,5 +646,9 @@ def create_document(
646646
def close(self):
647647
self.grpc_channel.close()
648648

649+
@property
650+
def kind(self) -> str:
651+
return "grpc"
652+
649653

650654
__all__ = ("FirestoreGrpcTransport",)

google/cloud/firestore_v1/types/document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Document(proto.Message):
3939
name (str):
4040
The resource name of the document, for example
4141
``projects/{project_id}/databases/{database_id}/documents/{document_path}``.
42-
fields (Sequence[google.cloud.firestore_v1.types.Document.FieldsEntry]):
42+
fields (Mapping[str, google.cloud.firestore_v1.types.Value]):
4343
The document's fields.
4444
4545
The map keys represent field names.
@@ -256,7 +256,7 @@ class MapValue(proto.Message):
256256
r"""A map value.
257257
258258
Attributes:
259-
fields (Sequence[google.cloud.firestore_v1.types.MapValue.FieldsEntry]):
259+
fields (Mapping[str, google.cloud.firestore_v1.types.Value]):
260260
The map's fields.
261261
262262
The map keys represent field names. Field names matching the

0 commit comments

Comments
 (0)