Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.1 (#563)
Browse files Browse the repository at this point in the history
- [ ] 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
  • Loading branch information
gcf-owl-bot[bot] authored Apr 14, 2022
1 parent 984f98d commit 4d054b0
Show file tree
Hide file tree
Showing 14 changed files with 189 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -268,7 +268,6 @@ async def create_index(
metadata for the operation will be the type
[IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -831,7 +830,6 @@ async def update_field(
the special ``Field`` with resource name:
``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -957,7 +955,6 @@ async def list_fields(
with the filter set to ``indexConfig.usesAncestorConfig:false``
.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1090,7 +1087,6 @@ async def export_documents(
refer to:
https://cloud.google.com/firestore/docs/manage-data/export-import
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1209,7 +1205,6 @@ async def import_documents(
cancelled, it is possible that a subset of the data has
already been imported to Cloud Firestore.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -549,7 +549,6 @@ def create_index(
metadata for the operation will be the type
[IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1068,7 +1067,6 @@ def update_field(
the special ``Field`` with resource name:
``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1194,7 +1192,6 @@ def list_fields(
with the filter set to ``indexConfig.usesAncestorConfig:false``
.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1316,7 +1313,6 @@ def export_documents(
refer to:
https://cloud.google.com/firestore/docs/manage-data/export-import
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down Expand Up @@ -1435,7 +1431,6 @@ def import_documents(
cancelled, it is possible that a subset of the data has
already been imported to Cloud Firestore.
.. code-block:: python
from google.cloud import firestore_admin_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -375,5 +376,9 @@ def update_database(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("FirestoreAdminTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -641,5 +641,9 @@ def update_database(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("FirestoreAdminGrpcTransport",)
16 changes: 12 additions & 4 deletions google/cloud/firestore_admin_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .database import Database
from .field import Field
from .database import (
Database,
)
from .field import (
Field,
)
from .firestore_admin import (
CreateIndexRequest,
DeleteIndexRequest,
Expand All @@ -33,8 +37,12 @@
UpdateDatabaseRequest,
UpdateFieldRequest,
)
from .index import Index
from .location import LocationMetadata
from .index import (
Index,
)
from .location import (
LocationMetadata,
)
from .operation import (
ExportDocumentsMetadata,
ExportDocumentsResponse,
Expand Down
6 changes: 1 addition & 5 deletions google/cloud/firestore_v1/services/firestore/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import re
from typing import (
Dict,
Mapping,
Optional,
AsyncIterable,
Awaitable,
Expand Down Expand Up @@ -637,7 +638,6 @@ def batch_get_documents(
Documents returned by this method are not guaranteed to
be returned in the same order that they were requested.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -835,7 +835,6 @@ async def commit(
r"""Commits a transaction, while optionally updating
documents.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1146,7 +1145,6 @@ async def partition_query(
used by RunQuery as starting/end points for the query
results.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1246,7 +1244,6 @@ def write(
r"""Streams batches of document updates and deletes, in
order.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1565,7 +1562,6 @@ async def batch_write(
If you require an atomically applied set of writes, use
[Commit][google.firestore.v1.Firestore.Commit] instead.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down
17 changes: 11 additions & 6 deletions google/cloud/firestore_v1/services/firestore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
Optional,
Iterable,
Iterator,
Sequence,
Tuple,
Type,
Union,
)
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -791,7 +801,6 @@ def batch_get_documents(
Documents returned by this method are not guaranteed to
be returned in the same order that they were requested.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -966,7 +975,6 @@ def commit(
r"""Commits a transaction, while optionally updating
documents.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1244,7 +1252,6 @@ def partition_query(
used by RunQuery as starting/end points for the query
results.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1333,7 +1340,6 @@ def write(
r"""Streams batches of document updates and deletes, in
order.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down Expand Up @@ -1620,7 +1626,6 @@ def batch_write(
If you require an atomically applied set of writes, use
[Commit][google.firestore.v1.Firestore.Commit] instead.
.. code-block:: python
from google.cloud import firestore_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -521,5 +522,9 @@ def create_document(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("FirestoreTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -646,5 +646,9 @@ def create_document(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("FirestoreGrpcTransport",)
4 changes: 2 additions & 2 deletions google/cloud/firestore_v1/types/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Document(proto.Message):
name (str):
The resource name of the document, for example
``projects/{project_id}/databases/{database_id}/documents/{document_path}``.
fields (Sequence[google.cloud.firestore_v1.types.Document.FieldsEntry]):
fields (Mapping[str, google.cloud.firestore_v1.types.Value]):
The document's fields.
The map keys represent field names.
Expand Down Expand Up @@ -256,7 +256,7 @@ class MapValue(proto.Message):
r"""A map value.
Attributes:
fields (Sequence[google.cloud.firestore_v1.types.MapValue.FieldsEntry]):
fields (Mapping[str, google.cloud.firestore_v1.types.Value]):
The map's fields.
The map keys represent field names. Field names matching the
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/firestore_v1/types/firestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ class WriteRequest(proto.Message):
``stream_id`` field.
Leave this field unset when creating a new stream.
labels (Sequence[google.cloud.firestore_v1.types.WriteRequest.LabelsEntry]):
labels (Mapping[str, str]):
Labels associated with this write request.
"""

Expand Down Expand Up @@ -1020,7 +1020,7 @@ class ListenRequest(proto.Message):
stream.
This field is a member of `oneof`_ ``target_change``.
labels (Sequence[google.cloud.firestore_v1.types.ListenRequest.LabelsEntry]):
labels (Mapping[str, str]):
Labels associated with this target change.
"""

Expand Down Expand Up @@ -1383,7 +1383,7 @@ class BatchWriteRequest(proto.Message):
not guarantee ordering. Each write succeeds or
fails independently. You cannot write to the
same document more than once per request.
labels (Sequence[google.cloud.firestore_v1.types.BatchWriteRequest.LabelsEntry]):
labels (Mapping[str, str]):
Labels associated with this batch write.
"""

Expand Down
5 changes: 4 additions & 1 deletion google/cloud/firestore_v1/types/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ class CompositeFilter(proto.Message):
The operator for combining multiple filters.
filters (Sequence[google.cloud.firestore_v1.types.StructuredQuery.Filter]):
The list of filters to combine.
Must contain at least one filter.
Requires:
- At least one filter is present.
"""

class Operator(proto.Enum):
Expand Down
Loading

0 comments on commit 4d054b0

Please sign in to comment.