Skip to content

Commit

Permalink
chore: Use gapic-generator-python 0.65.0 (#300)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440970084

Source-Link: googleapis/googleapis@5e0a3d5

Source-Link: googleapis/googleapis-gen@b0c628a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9

feat: expose new read_time API fields, currently only available in private preview
docs: fix type in docstring for map fields

PiperOrigin-RevId: 440914241

Source-Link: googleapis/googleapis@0ed730f

Source-Link: googleapis/googleapis-gen@b2e5ae9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJlNWFlOTdmZDI0ZjY0YWYwZmVmMTk5OWRhZDE0OTQ1ZmRjMzY2MyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Apr 12, 2022
1 parent cff6a1c commit 8d2bd17
Show file tree
Hide file tree
Showing 15 changed files with 266 additions and 91 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 @@ -267,7 +267,7 @@ async def export_entities(
request: Union[datastore_admin.ExportEntitiesRequest, dict] = None,
*,
project_id: str = None,
labels: Dict[str, str] = None,
labels: Mapping[str, str] = None,
entity_filter: datastore_admin.EntityFilter = None,
output_url_prefix: str = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
Expand All @@ -285,7 +285,6 @@ async def export_entities(
before completion it may leave partial data behind in
Google Cloud Storage.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -321,7 +320,7 @@ def sample_export_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (:class:`Dict[str, str]`):
labels (:class:`Mapping[str, str]`):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -434,7 +433,7 @@ async def import_entities(
request: Union[datastore_admin.ImportEntitiesRequest, dict] = None,
*,
project_id: str = None,
labels: Dict[str, str] = None,
labels: Mapping[str, str] = None,
input_url: str = None,
entity_filter: datastore_admin.EntityFilter = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
Expand All @@ -449,7 +448,6 @@ async def import_entities(
is possible that a subset of the data has already been
imported to Cloud Datastore.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -485,7 +483,7 @@ def sample_import_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (:class:`Dict[str, str]`):
labels (:class:`Mapping[str, str]`):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -621,7 +619,6 @@ async def create_index(
Indexes with a single property cannot be created.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -716,7 +713,6 @@ async def delete_index(
[delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex]
again.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -842,8 +838,7 @@ def sample_get_index():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -875,7 +870,6 @@ async def list_indexes(
the list of indexes and may occasionally return stale
results.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -926,8 +920,7 @@ def sample_list_indexes():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down
15 changes: 5 additions & 10 deletions google/cloud/datastore_admin_v1/services/datastore_admin/client.py
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 @@ -468,7 +468,7 @@ def export_entities(
request: Union[datastore_admin.ExportEntitiesRequest, dict] = None,
*,
project_id: str = None,
labels: Dict[str, str] = None,
labels: Mapping[str, str] = None,
entity_filter: datastore_admin.EntityFilter = None,
output_url_prefix: str = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
Expand All @@ -486,7 +486,6 @@ def export_entities(
before completion it may leave partial data behind in
Google Cloud Storage.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -522,7 +521,7 @@ def sample_export_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (Dict[str, str]):
labels (Mapping[str, str]):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -634,7 +633,7 @@ def import_entities(
request: Union[datastore_admin.ImportEntitiesRequest, dict] = None,
*,
project_id: str = None,
labels: Dict[str, str] = None,
labels: Mapping[str, str] = None,
input_url: str = None,
entity_filter: datastore_admin.EntityFilter = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
Expand All @@ -649,7 +648,6 @@ def import_entities(
is possible that a subset of the data has already been
imported to Cloud Datastore.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -685,7 +683,7 @@ def sample_import_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (Dict[str, str]):
labels (Mapping[str, str]):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -820,7 +818,6 @@ def create_index(
Indexes with a single property cannot be created.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -916,7 +913,6 @@ def delete_index(
[delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex]
again.
.. code-block:: python
from google.cloud import datastore_admin_v1
Expand Down Expand Up @@ -1067,7 +1063,6 @@ def list_indexes(
the list of indexes and may occasionally return stale
results.
.. code-block:: python
from google.cloud import datastore_admin_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 @@ -153,8 +154,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand All @@ -168,8 +168,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -248,5 +247,9 @@ def list_indexes(
]:
raise NotImplementedError()

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


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

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


__all__ = ("DatastoreAdminGrpcTransport",)
4 changes: 3 additions & 1 deletion google/cloud/datastore_admin_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
Progress,
OperationType,
)
from .index import Index
from .index import (
Index,
)
from .migration import (
MigrationProgressEvent,
MigrationStateEvent,
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/datastore_admin_v1/types/datastore_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CommonMetadata(proto.Message):
operation_type (google.cloud.datastore_admin_v1.types.OperationType):
The type of the operation. Can be used as a
filter in ListOperationsRequest.
labels (Dict[str, str]):
labels (Mapping[str, str]):
The client-assigned labels which were
provided when the operation was created. May
also include additional labels.
Expand Down Expand Up @@ -141,7 +141,7 @@ class ExportEntitiesRequest(proto.Message):
project_id (str):
Required. Project ID against which to make
the request.
labels (Dict[str, str]):
labels (Mapping[str, str]):
Client-assigned labels.
entity_filter (google.cloud.datastore_admin_v1.types.EntityFilter):
Description of what data from the project is
Expand Down Expand Up @@ -199,7 +199,7 @@ class ImportEntitiesRequest(proto.Message):
project_id (str):
Required. Project ID against which to make
the request.
labels (Dict[str, str]):
labels (Mapping[str, str]):
Client-assigned labels.
input_url (str):
Required. The full resource URL of the external storage
Expand Down
15 changes: 5 additions & 10 deletions google/cloud/datastore_v1/services/datastore/async_client.py
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 All @@ -34,6 +34,7 @@
from google.cloud.datastore_v1.types import datastore
from google.cloud.datastore_v1.types import entity
from google.cloud.datastore_v1.types import query
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import DatastoreTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import DatastoreGrpcAsyncIOTransport
from .client import DatastoreClient
Expand Down Expand Up @@ -299,8 +300,7 @@ def sample_lookup():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -376,8 +376,7 @@ def sample_run_query():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -500,7 +499,6 @@ async def commit(
r"""Commits a transaction, optionally creating, deleting
or modifying some entities.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down Expand Up @@ -735,7 +733,6 @@ async def allocate_ids(
r"""Allocates IDs for the given keys, which is useful for
referencing an entity before it is inserted.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down Expand Up @@ -838,7 +835,6 @@ async def reserve_ids(
r"""Prevents the supplied keys' IDs from being
auto-allocated by Cloud Datastore.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down Expand Up @@ -917,8 +913,7 @@ def sample_reserve_ids():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down
6 changes: 2 additions & 4 deletions google/cloud/datastore_v1/services/datastore/client.py
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 All @@ -37,6 +37,7 @@
from google.cloud.datastore_v1.types import datastore
from google.cloud.datastore_v1.types import entity
from google.cloud.datastore_v1.types import query
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import DatastoreTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import DatastoreGrpcTransport
from .transports.grpc_asyncio import DatastoreGrpcAsyncIOTransport
Expand Down Expand Up @@ -689,7 +690,6 @@ def commit(
r"""Commits a transaction, optionally creating, deleting
or modifying some entities.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down Expand Up @@ -924,7 +924,6 @@ def allocate_ids(
r"""Allocates IDs for the given keys, which is useful for
referencing an entity before it is inserted.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down Expand Up @@ -1027,7 +1026,6 @@ def reserve_ids(
r"""Prevents the supplied keys' IDs from being
auto-allocated by Cloud Datastore.
.. code-block:: python
from google.cloud import datastore_v1
Expand Down
Loading

0 comments on commit 8d2bd17

Please sign in to comment.