Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Commit 6c5982b

Browse files
chore: Use gapic-generator-python 0.65.0 (#61)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 440970084 Source-Link: googleapis/googleapis@5e0a3d5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0c628a3fade768f225d76992791ea1ba2a881be Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 docs: fix type in docstring for map fields
1 parent 96333ee commit 6c5982b

File tree

28 files changed

+1427
-70
lines changed

28 files changed

+1427
-70
lines changed

google/cloud/bigquery_migration_v2/services/migration_service/async_client.py

Lines changed: 4 additions & 5 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
@@ -403,7 +403,7 @@ def sample_get_migration_workflow():
403403
maximum=10.0,
404404
multiplier=1.3,
405405
predicate=retries.if_exception_type(
406-
core_exceptions.ServiceUnavailable,
406+
core_exceptions.GoogleAPICallError,
407407
),
408408
deadline=60.0,
409409
),
@@ -511,7 +511,7 @@ def sample_list_migration_workflows():
511511
maximum=10.0,
512512
multiplier=1.3,
513513
predicate=retries.if_exception_type(
514-
core_exceptions.ServiceUnavailable,
514+
core_exceptions.GoogleAPICallError,
515515
),
516516
deadline=60.0,
517517
),
@@ -644,7 +644,6 @@ async def start_migration_workflow(
644644
signaled if the state is anything other than DRAFT or
645645
RUNNING.
646646
647-
648647
.. code-block:: python
649648
650649
from google.cloud import bigquery_migration_v2
@@ -705,7 +704,7 @@ def sample_start_migration_workflow():
705704
maximum=10.0,
706705
multiplier=1.3,
707706
predicate=retries.if_exception_type(
708-
core_exceptions.ServiceUnavailable,
707+
core_exceptions.GoogleAPICallError,
709708
),
710709
deadline=60.0,
711710
),

google/cloud/bigquery_migration_v2/services/migration_service/client.py

Lines changed: 1 addition & 2 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
@@ -870,7 +870,6 @@ def start_migration_workflow(
870870
signaled if the state is anything other than DRAFT or
871871
RUNNING.
872872
873-
874873
.. code-block:: python
875874
876875
from google.cloud import bigquery_migration_v2

google/cloud/bigquery_migration_v2/services/migration_service/transports/base.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8383
be used for service account credentials.
8484
"""
85+
8586
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8687
if ":" not in host:
8788
host += ":443"
@@ -134,7 +135,7 @@ def _prep_wrapped_messages(self, client_info):
134135
maximum=10.0,
135136
multiplier=1.3,
136137
predicate=retries.if_exception_type(
137-
core_exceptions.ServiceUnavailable,
138+
core_exceptions.GoogleAPICallError,
138139
),
139140
deadline=60.0,
140141
),
@@ -148,7 +149,7 @@ def _prep_wrapped_messages(self, client_info):
148149
maximum=10.0,
149150
multiplier=1.3,
150151
predicate=retries.if_exception_type(
151-
core_exceptions.ServiceUnavailable,
152+
core_exceptions.GoogleAPICallError,
152153
),
153154
deadline=60.0,
154155
),
@@ -167,7 +168,7 @@ def _prep_wrapped_messages(self, client_info):
167168
maximum=10.0,
168169
multiplier=1.3,
169170
predicate=retries.if_exception_type(
170-
core_exceptions.ServiceUnavailable,
171+
core_exceptions.GoogleAPICallError,
171172
),
172173
deadline=60.0,
173174
),
@@ -273,5 +274,9 @@ def list_migration_subtasks(
273274
]:
274275
raise NotImplementedError()
275276

277+
@property
278+
def kind(self) -> str:
279+
raise NotImplementedError()
280+
276281

277282
__all__ = ("MigrationServiceTransport",)

google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,5 +433,9 @@ def list_migration_subtasks(
433433
def close(self):
434434
self.grpc_channel.close()
435435

436+
@property
437+
def kind(self) -> str:
438+
return "grpc"
439+
436440

437441
__all__ = ("MigrationServiceGrpcTransport",)

google/cloud/bigquery_migration_v2/types/migration_entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MigrationWorkflow(proto.Message):
4646
The display name of the workflow. This can be
4747
set to give a workflow a descriptive name. There
4848
is no guarantee or enforcement of uniqueness.
49-
tasks (Sequence[google.cloud.bigquery_migration_v2.types.MigrationWorkflow.TasksEntry]):
49+
tasks (Mapping[str, google.cloud.bigquery_migration_v2.types.MigrationTask]):
5050
The tasks in a workflow in a named map. The
5151
name (i.e. key) has no meaning and is merely a
5252
convenient way to address a specific task in a

google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py

Lines changed: 6 additions & 7 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
@@ -403,7 +403,7 @@ def sample_get_migration_workflow():
403403
maximum=10.0,
404404
multiplier=1.3,
405405
predicate=retries.if_exception_type(
406-
core_exceptions.ServiceUnavailable,
406+
core_exceptions.GoogleAPICallError,
407407
),
408408
deadline=120.0,
409409
),
@@ -511,7 +511,7 @@ def sample_list_migration_workflows():
511511
maximum=10.0,
512512
multiplier=1.3,
513513
predicate=retries.if_exception_type(
514-
core_exceptions.ServiceUnavailable,
514+
core_exceptions.GoogleAPICallError,
515515
),
516516
deadline=120.0,
517517
),
@@ -644,7 +644,6 @@ async def start_migration_workflow(
644644
signaled if the state is anything other than DRAFT or
645645
RUNNING.
646646
647-
648647
.. code-block:: python
649648
650649
from google.cloud import bigquery_migration_v2alpha
@@ -705,7 +704,7 @@ def sample_start_migration_workflow():
705704
maximum=10.0,
706705
multiplier=1.3,
707706
predicate=retries.if_exception_type(
708-
core_exceptions.ServiceUnavailable,
707+
core_exceptions.GoogleAPICallError,
709708
),
710709
deadline=120.0,
711710
),
@@ -811,7 +810,7 @@ def sample_get_migration_subtask():
811810
maximum=10.0,
812811
multiplier=1.3,
813812
predicate=retries.if_exception_type(
814-
core_exceptions.ServiceUnavailable,
813+
core_exceptions.GoogleAPICallError,
815814
),
816815
deadline=120.0,
817816
),
@@ -918,7 +917,7 @@ def sample_list_migration_subtasks():
918917
maximum=10.0,
919918
multiplier=1.3,
920919
predicate=retries.if_exception_type(
921-
core_exceptions.ServiceUnavailable,
920+
core_exceptions.GoogleAPICallError,
922921
),
923922
deadline=120.0,
924923
),

google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py

Lines changed: 1 addition & 2 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
@@ -870,7 +870,6 @@ def start_migration_workflow(
870870
signaled if the state is anything other than DRAFT or
871871
RUNNING.
872872
873-
874873
.. code-block:: python
875874
876875
from google.cloud import bigquery_migration_v2alpha

google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/base.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8383
be used for service account credentials.
8484
"""
85+
8586
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8687
if ":" not in host:
8788
host += ":443"
@@ -134,7 +135,7 @@ def _prep_wrapped_messages(self, client_info):
134135
maximum=10.0,
135136
multiplier=1.3,
136137
predicate=retries.if_exception_type(
137-
core_exceptions.ServiceUnavailable,
138+
core_exceptions.GoogleAPICallError,
138139
),
139140
deadline=120.0,
140141
),
@@ -148,7 +149,7 @@ def _prep_wrapped_messages(self, client_info):
148149
maximum=10.0,
149150
multiplier=1.3,
150151
predicate=retries.if_exception_type(
151-
core_exceptions.ServiceUnavailable,
152+
core_exceptions.GoogleAPICallError,
152153
),
153154
deadline=120.0,
154155
),
@@ -167,7 +168,7 @@ def _prep_wrapped_messages(self, client_info):
167168
maximum=10.0,
168169
multiplier=1.3,
169170
predicate=retries.if_exception_type(
170-
core_exceptions.ServiceUnavailable,
171+
core_exceptions.GoogleAPICallError,
171172
),
172173
deadline=120.0,
173174
),
@@ -181,7 +182,7 @@ def _prep_wrapped_messages(self, client_info):
181182
maximum=10.0,
182183
multiplier=1.3,
183184
predicate=retries.if_exception_type(
184-
core_exceptions.ServiceUnavailable,
185+
core_exceptions.GoogleAPICallError,
185186
),
186187
deadline=120.0,
187188
),
@@ -195,7 +196,7 @@ def _prep_wrapped_messages(self, client_info):
195196
maximum=10.0,
196197
multiplier=1.3,
197198
predicate=retries.if_exception_type(
198-
core_exceptions.ServiceUnavailable,
199+
core_exceptions.GoogleAPICallError,
199200
),
200201
deadline=120.0,
201202
),
@@ -291,5 +292,9 @@ def list_migration_subtasks(
291292
]:
292293
raise NotImplementedError()
293294

295+
@property
296+
def kind(self) -> str:
297+
raise NotImplementedError()
298+
294299

295300
__all__ = ("MigrationServiceTransport",)

google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,5 +433,9 @@ def list_migration_subtasks(
433433
def close(self):
434434
self.grpc_channel.close()
435435

436+
@property
437+
def kind(self) -> str:
438+
return "grpc"
439+
436440

437441
__all__ = ("MigrationServiceGrpcTransport",)

google/cloud/bigquery_migration_v2alpha/types/migration_entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class MigrationWorkflow(proto.Message):
4949
The display name of the workflow. This can be
5050
set to give a workflow a descriptive name. There
5151
is no guarantee or enforcement of uniqueness.
52-
tasks (Sequence[google.cloud.bigquery_migration_v2alpha.types.MigrationWorkflow.TasksEntry]):
52+
tasks (Mapping[str, google.cloud.bigquery_migration_v2alpha.types.MigrationTask]):
5353
The tasks in a workflow in a named map. The
5454
name (i.e. key) has no meaning and is merely a
5555
convenient way to address a specific task in a

0 commit comments

Comments
 (0)