Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8d2bd17

Browse files
chore: Use gapic-generator-python 0.65.0 (#300)
- [ ] Regenerate this pull request now.PiperOrigin-RevId: 440970084Source-Link:googleapis/googleapis@5e0a3d5Source-Link:googleapis/googleapis-gen@b0c628aCopy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9feat: expose new read_time API fields, currently only available in private previewdocs: fix type in docstring for map fieldsPiperOrigin-RevId: 440914241Source-Link:googleapis/googleapis@0ed730fSource-Link:googleapis/googleapis-gen@b2e5ae9Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJlNWFlOTdmZDI0ZjY0YWYwZmVmMTk5OWRhZDE0OTQ1ZmRjMzY2MyJ9
1 parentcff6a1c commit8d2bd17

File tree

15 files changed

+266
-91
lines changed

15 files changed

+266
-91
lines changed

‎google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
fromcollectionsimportOrderedDict
1717
importfunctools
1818
importre
19-
fromtypingimportDict,Optional,Sequence,Tuple,Type,Union
19+
fromtypingimportDict,Mapping,Optional,Sequence,Tuple,Type,Union
2020
importpkg_resources
2121

2222
fromgoogle.api_core.client_optionsimportClientOptions
@@ -267,7 +267,7 @@ async def export_entities(
267267
request:Union[datastore_admin.ExportEntitiesRequest,dict]=None,
268268
*,
269269
project_id:str=None,
270-
labels:Dict[str,str]=None,
270+
labels:Mapping[str,str]=None,
271271
entity_filter:datastore_admin.EntityFilter=None,
272272
output_url_prefix:str=None,
273273
retry:OptionalRetry=gapic_v1.method.DEFAULT,
@@ -285,7 +285,6 @@ async def export_entities(
285285
before completion it may leave partial data behind in
286286
Google Cloud Storage.
287287
288-
289288
.. code-block:: python
290289
291290
from google.cloud import datastore_admin_v1
@@ -321,7 +320,7 @@ def sample_export_entities():
321320
This corresponds to the ``project_id`` field
322321
on the ``request`` instance; if ``request`` is provided, this
323322
should not be set.
324-
labels (:class:`Dict[str, str]`):
323+
labels (:class:`Mapping[str, str]`):
325324
Client-assigned labels.
326325
This corresponds to the ``labels`` field
327326
on the ``request`` instance; if ``request`` is provided, this
@@ -434,7 +433,7 @@ async def import_entities(
434433
request:Union[datastore_admin.ImportEntitiesRequest,dict]=None,
435434
*,
436435
project_id:str=None,
437-
labels:Dict[str,str]=None,
436+
labels:Mapping[str,str]=None,
438437
input_url:str=None,
439438
entity_filter:datastore_admin.EntityFilter=None,
440439
retry:OptionalRetry=gapic_v1.method.DEFAULT,
@@ -449,7 +448,6 @@ async def import_entities(
449448
is possible that a subset of the data has already been
450449
imported to Cloud Datastore.
451450
452-
453451
.. code-block:: python
454452
455453
from google.cloud import datastore_admin_v1
@@ -485,7 +483,7 @@ def sample_import_entities():
485483
This corresponds to the ``project_id`` field
486484
on the ``request`` instance; if ``request`` is provided, this
487485
should not be set.
488-
labels (:class:`Dict[str, str]`):
486+
labels (:class:`Mapping[str, str]`):
489487
Client-assigned labels.
490488
This corresponds to the ``labels`` field
491489
on the ``request`` instance; if ``request`` is provided, this
@@ -621,7 +619,6 @@ async def create_index(
621619
622620
Indexes with a single property cannot be created.
623621
624-
625622
.. code-block:: python
626623
627624
from google.cloud import datastore_admin_v1
@@ -716,7 +713,6 @@ async def delete_index(
716713
[delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex]
717714
again.
718715
719-
720716
.. code-block:: python
721717
722718
from google.cloud import datastore_admin_v1
@@ -842,8 +838,7 @@ def sample_get_index():
842838
maximum=60.0,
843839
multiplier=1.3,
844840
predicate=retries.if_exception_type(
845-
core_exceptions.DeadlineExceeded,
846-
core_exceptions.ServiceUnavailable,
841+
core_exceptions.GoogleAPICallError,
847842
),
848843
deadline=60.0,
849844
),
@@ -875,7 +870,6 @@ async def list_indexes(
875870
the list of indexes and may occasionally return stale
876871
results.
877872
878-
879873
.. code-block:: python
880874
881875
from google.cloud import datastore_admin_v1
@@ -926,8 +920,7 @@ def sample_list_indexes():
926920
maximum=60.0,
927921
multiplier=1.3,
928922
predicate=retries.if_exception_type(
929-
core_exceptions.DeadlineExceeded,
930-
core_exceptions.ServiceUnavailable,
923+
core_exceptions.GoogleAPICallError,
931924
),
932925
deadline=60.0,
933926
),

‎google/cloud/datastore_admin_v1/services/datastore_admin/client.py‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
fromcollectionsimportOrderedDict
1717
importos
1818
importre
19-
fromtypingimportDict,Optional,Sequence,Tuple,Type,Union
19+
fromtypingimportDict,Mapping,Optional,Sequence,Tuple,Type,Union
2020
importpkg_resources
2121

2222
fromgoogle.api_coreimportclient_optionsasclient_options_lib
@@ -468,7 +468,7 @@ def export_entities(
468468
request:Union[datastore_admin.ExportEntitiesRequest,dict]=None,
469469
*,
470470
project_id:str=None,
471-
labels:Dict[str,str]=None,
471+
labels:Mapping[str,str]=None,
472472
entity_filter:datastore_admin.EntityFilter=None,
473473
output_url_prefix:str=None,
474474
retry:OptionalRetry=gapic_v1.method.DEFAULT,
@@ -486,7 +486,6 @@ def export_entities(
486486
before completion it may leave partial data behind in
487487
Google Cloud Storage.
488488
489-
490489
.. code-block:: python
491490
492491
from google.cloud import datastore_admin_v1
@@ -522,7 +521,7 @@ def sample_export_entities():
522521
This corresponds to the ``project_id`` field
523522
on the ``request`` instance; if ``request`` is provided, this
524523
should not be set.
525-
labels (Dict[str, str]):
524+
labels (Mapping[str, str]):
526525
Client-assigned labels.
527526
This corresponds to the ``labels`` field
528527
on the ``request`` instance; if ``request`` is provided, this
@@ -634,7 +633,7 @@ def import_entities(
634633
request:Union[datastore_admin.ImportEntitiesRequest,dict]=None,
635634
*,
636635
project_id:str=None,
637-
labels:Dict[str,str]=None,
636+
labels:Mapping[str,str]=None,
638637
input_url:str=None,
639638
entity_filter:datastore_admin.EntityFilter=None,
640639
retry:OptionalRetry=gapic_v1.method.DEFAULT,
@@ -649,7 +648,6 @@ def import_entities(
649648
is possible that a subset of the data has already been
650649
imported to Cloud Datastore.
651650
652-
653651
.. code-block:: python
654652
655653
from google.cloud import datastore_admin_v1
@@ -685,7 +683,7 @@ def sample_import_entities():
685683
This corresponds to the ``project_id`` field
686684
on the ``request`` instance; if ``request`` is provided, this
687685
should not be set.
688-
labels (Dict[str, str]):
686+
labels (Mapping[str, str]):
689687
Client-assigned labels.
690688
This corresponds to the ``labels`` field
691689
on the ``request`` instance; if ``request`` is provided, this
@@ -820,7 +818,6 @@ def create_index(
820818
821819
Indexes with a single property cannot be created.
822820
823-
824821
.. code-block:: python
825822
826823
from google.cloud import datastore_admin_v1
@@ -916,7 +913,6 @@ def delete_index(
916913
[delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex]
917914
again.
918915
919-
920916
.. code-block:: python
921917
922918
from google.cloud import datastore_admin_v1
@@ -1067,7 +1063,6 @@ def list_indexes(
10671063
the list of indexes and may occasionally return stale
10681064
results.
10691065
1070-
10711066
.. code-block:: python
10721067
10731068
from google.cloud import datastore_admin_v1

‎google/cloud/datastore_admin_v1/services/datastore_admin/transports/base.py‎

Lines changed: 7 additions & 4 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":"notinhost:
9192
host+=":443"
@@ -153,8 +154,7 @@ def _prep_wrapped_messages(self, client_info):
153154
maximum=60.0,
154155
multiplier=1.3,
155156
predicate=retries.if_exception_type(
156-
core_exceptions.DeadlineExceeded,
157-
core_exceptions.ServiceUnavailable,
157+
core_exceptions.GoogleAPICallError,
158158
),
159159
deadline=60.0,
160160
),
@@ -168,8 +168,7 @@ def _prep_wrapped_messages(self, client_info):
168168
maximum=60.0,
169169
multiplier=1.3,
170170
predicate=retries.if_exception_type(
171-
core_exceptions.DeadlineExceeded,
172-
core_exceptions.ServiceUnavailable,
171+
core_exceptions.GoogleAPICallError,
173172
),
174173
deadline=60.0,
175174
),
@@ -248,5 +247,9 @@ def list_indexes(
248247
]:
249248
raiseNotImplementedError()
250249

250+
@property
251+
defkind(self)->str:
252+
raiseNotImplementedError()
253+
251254

252255
__all__= ("DatastoreAdminTransport",)

‎google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,5 +506,9 @@ def list_indexes(
506506
defclose(self):
507507
self.grpc_channel.close()
508508

509+
@property
510+
defkind(self)->str:
511+
return"grpc"
512+
509513

510514
__all__= ("DatastoreAdminGrpcTransport",)

‎google/cloud/datastore_admin_v1/types/__init__.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
Progress,
3232
OperationType,
3333
)
34-
from .indeximportIndex
34+
from .indeximport (
35+
Index,
36+
)
3537
from .migrationimport (
3638
MigrationProgressEvent,
3739
MigrationStateEvent,

‎google/cloud/datastore_admin_v1/types/datastore_admin.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CommonMetadata(proto.Message):
6464
operation_type (google.cloud.datastore_admin_v1.types.OperationType):
6565
The type of the operation. Can be used as a
6666
filter in ListOperationsRequest.
67-
labels (Dict[str, str]):
67+
labels (Mapping[str, str]):
6868
The client-assigned labels which were
6969
provided when the operation was created. May
7070
also include additional labels.
@@ -141,7 +141,7 @@ class ExportEntitiesRequest(proto.Message):
141141
project_id (str):
142142
Required. Project ID against which to make
143143
the request.
144-
labels (Dict[str, str]):
144+
labels (Mapping[str, str]):
145145
Client-assigned labels.
146146
entity_filter (google.cloud.datastore_admin_v1.types.EntityFilter):
147147
Description of what data from the project is
@@ -199,7 +199,7 @@ class ImportEntitiesRequest(proto.Message):
199199
project_id (str):
200200
Required. Project ID against which to make
201201
the request.
202-
labels (Dict[str, str]):
202+
labels (Mapping[str, str]):
203203
Client-assigned labels.
204204
input_url (str):
205205
Required. The full resource URL of the external storage

‎google/cloud/datastore_v1/services/datastore/async_client.py‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
fromcollectionsimportOrderedDict
1717
importfunctools
1818
importre
19-
fromtypingimportDict,Optional,Sequence,Tuple,Type,Union
19+
fromtypingimportDict,Mapping,Optional,Sequence,Tuple,Type,Union
2020
importpkg_resources
2121

2222
fromgoogle.api_core.client_optionsimportClientOptions
@@ -34,6 +34,7 @@
3434
fromgoogle.cloud.datastore_v1.typesimportdatastore
3535
fromgoogle.cloud.datastore_v1.typesimportentity
3636
fromgoogle.cloud.datastore_v1.typesimportquery
37+
fromgoogle.protobufimporttimestamp_pb2# type: ignore
3738
from .transports.baseimportDatastoreTransport,DEFAULT_CLIENT_INFO
3839
from .transports.grpc_asyncioimportDatastoreGrpcAsyncIOTransport
3940
from .clientimportDatastoreClient
@@ -299,8 +300,7 @@ def sample_lookup():
299300
maximum=60.0,
300301
multiplier=1.3,
301302
predicate=retries.if_exception_type(
302-
core_exceptions.DeadlineExceeded,
303-
core_exceptions.ServiceUnavailable,
303+
core_exceptions.GoogleAPICallError,
304304
),
305305
deadline=60.0,
306306
),
@@ -376,8 +376,7 @@ def sample_run_query():
376376
maximum=60.0,
377377
multiplier=1.3,
378378
predicate=retries.if_exception_type(
379-
core_exceptions.DeadlineExceeded,
380-
core_exceptions.ServiceUnavailable,
379+
core_exceptions.GoogleAPICallError,
381380
),
382381
deadline=60.0,
383382
),
@@ -500,7 +499,6 @@ async def commit(
500499
r"""Commits a transaction, optionally creating, deleting
501500
or modifying some entities.
502501
503-
504502
.. code-block:: python
505503
506504
from google.cloud import datastore_v1
@@ -735,7 +733,6 @@ async def allocate_ids(
735733
r"""Allocates IDs for the given keys, which is useful for
736734
referencing an entity before it is inserted.
737735
738-
739736
.. code-block:: python
740737
741738
from google.cloud import datastore_v1
@@ -838,7 +835,6 @@ async def reserve_ids(
838835
r"""Prevents the supplied keys' IDs from being
839836
auto-allocated by Cloud Datastore.
840837
841-
842838
.. code-block:: python
843839
844840
from google.cloud import datastore_v1
@@ -917,8 +913,7 @@ def sample_reserve_ids():
917913
maximum=60.0,
918914
multiplier=1.3,
919915
predicate=retries.if_exception_type(
920-
core_exceptions.DeadlineExceeded,
921-
core_exceptions.ServiceUnavailable,
916+
core_exceptions.GoogleAPICallError,
922917
),
923918
deadline=60.0,
924919
),

‎google/cloud/datastore_v1/services/datastore/client.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
fromcollectionsimportOrderedDict
1717
importos
1818
importre
19-
fromtypingimportDict,Optional,Sequence,Tuple,Type,Union
19+
fromtypingimportDict,Mapping,Optional,Sequence,Tuple,Type,Union
2020
importpkg_resources
2121

2222
fromgoogle.api_coreimportclient_optionsasclient_options_lib
@@ -37,6 +37,7 @@
3737
fromgoogle.cloud.datastore_v1.typesimportdatastore
3838
fromgoogle.cloud.datastore_v1.typesimportentity
3939
fromgoogle.cloud.datastore_v1.typesimportquery
40+
fromgoogle.protobufimporttimestamp_pb2# type: ignore
4041
from .transports.baseimportDatastoreTransport,DEFAULT_CLIENT_INFO
4142
from .transports.grpcimportDatastoreGrpcTransport
4243
from .transports.grpc_asyncioimportDatastoreGrpcAsyncIOTransport
@@ -689,7 +690,6 @@ def commit(
689690
r"""Commits a transaction, optionally creating, deleting
690691
or modifying some entities.
691692
692-
693693
.. code-block:: python
694694
695695
from google.cloud import datastore_v1
@@ -924,7 +924,6 @@ def allocate_ids(
924924
r"""Allocates IDs for the given keys, which is useful for
925925
referencing an entity before it is inserted.
926926
927-
928927
.. code-block:: python
929928
930929
from google.cloud import datastore_v1
@@ -1027,7 +1026,6 @@ def reserve_ids(
10271026
r"""Prevents the supplied keys' IDs from being
10281027
auto-allocated by Cloud Datastore.
10291028
1030-
10311029
.. code-block:: python
10321030
10331031
from google.cloud import datastore_v1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp