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

Commit 5f36251

Browse files
chore: Update gapic-generator-python to v1.6.1 (#154)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use templated owlbot.py and setup.py * configure release-please to use manifest Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent bc6f5ce commit 5f36251

File tree

93 files changed

+1570
-3613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1570
-3613
lines changed

.github/release-please.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true

.release-please-manifest.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.6.2"
3+
}

docs/dataflow_v1beta3/types.rst

-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Dataflow v1beta3 API
33

44
.. automodule:: google.cloud.dataflow_v1beta3.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/dataflow/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.dataflow import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.dataflow_v1beta3.services.flex_templates_service.async_client import (
1822
FlexTemplatesServiceAsyncClient,
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.6.2" # {x-release-please-version}

google/cloud/dataflow_v1beta3/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.dataflow import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.flex_templates_service import (
1822
FlexTemplatesServiceAsyncClient,

google/cloud/dataflow_v1beta3/services/flex_templates_service/async_client.py

+16-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030

2131
from google.api_core import exceptions as core_exceptions
2232
from google.api_core import gapic_v1
@@ -159,9 +169,9 @@ def transport(self) -> FlexTemplatesServiceTransport:
159169
def __init__(
160170
self,
161171
*,
162-
credentials: ga_credentials.Credentials = None,
172+
credentials: Optional[ga_credentials.Credentials] = None,
163173
transport: Union[str, FlexTemplatesServiceTransport] = "grpc_asyncio",
164-
client_options: ClientOptions = None,
174+
client_options: Optional[ClientOptions] = None,
165175
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
166176
) -> None:
167177
"""Instantiates the flex templates service client.
@@ -205,10 +215,10 @@ def __init__(
205215

206216
async def launch_flex_template(
207217
self,
208-
request: Union[templates.LaunchFlexTemplateRequest, dict] = None,
218+
request: Optional[Union[templates.LaunchFlexTemplateRequest, dict]] = None,
209219
*,
210220
retry: OptionalRetry = gapic_v1.method.DEFAULT,
211-
timeout: float = None,
221+
timeout: Optional[float] = None,
212222
metadata: Sequence[Tuple[str, str]] = (),
213223
) -> templates.LaunchFlexTemplateResponse:
214224
r"""Launch a job with a FlexTemplate.
@@ -239,7 +249,7 @@ async def sample_launch_flex_template():
239249
print(response)
240250
241251
Args:
242-
request (Union[google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest, dict]):
252+
request (Optional[Union[google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest, dict]]):
243253
The request object. A request to launch a Cloud Dataflow
244254
job from a FlexTemplate.
245255
retry (google.api_core.retry.Retry): Designation of what errors, if any,

google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py

+19-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
cast,
30+
)
2031

2132
from google.api_core import client_options as client_options_lib
2233
from google.api_core import exceptions as core_exceptions
@@ -59,7 +70,7 @@ class FlexTemplatesServiceClientMeta(type):
5970

6071
def get_transport_class(
6172
cls,
62-
label: str = None,
73+
label: Optional[str] = None,
6374
) -> Type[FlexTemplatesServiceTransport]:
6475
"""Returns an appropriate transport class.
6576
@@ -314,8 +325,8 @@ def __init__(
314325
self,
315326
*,
316327
credentials: Optional[ga_credentials.Credentials] = None,
317-
transport: Union[str, FlexTemplatesServiceTransport, None] = None,
318-
client_options: Optional[client_options_lib.ClientOptions] = None,
328+
transport: Optional[Union[str, FlexTemplatesServiceTransport]] = None,
329+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
319330
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
320331
) -> None:
321332
"""Instantiates the flex templates service client.
@@ -332,7 +343,7 @@ def __init__(
332343
NOTE: "rest" transport functionality is currently in a
333344
beta state (preview). We welcome your feedback via an
334345
issue in this library's source repository.
335-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
346+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
336347
client. It won't take effect if a ``transport`` instance is provided.
337348
(1) The ``api_endpoint`` property can be used to override the
338349
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -362,6 +373,7 @@ def __init__(
362373
client_options = client_options_lib.from_dict(client_options)
363374
if client_options is None:
364375
client_options = client_options_lib.ClientOptions()
376+
client_options = cast(client_options_lib.ClientOptions, client_options)
365377

366378
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
367379
client_options
@@ -414,10 +426,10 @@ def __init__(
414426

415427
def launch_flex_template(
416428
self,
417-
request: Union[templates.LaunchFlexTemplateRequest, dict] = None,
429+
request: Optional[Union[templates.LaunchFlexTemplateRequest, dict]] = None,
418430
*,
419431
retry: OptionalRetry = gapic_v1.method.DEFAULT,
420-
timeout: float = None,
432+
timeout: Optional[float] = None,
421433
metadata: Sequence[Tuple[str, str]] = (),
422434
) -> templates.LaunchFlexTemplateResponse:
423435
r"""Launch a job with a FlexTemplate.

google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
self,
5454
*,
5555
host: str = DEFAULT_HOST,
56-
credentials: ga_credentials.Credentials = None,
56+
credentials: Optional[ga_credentials.Credentials] = None,
5757
credentials_file: Optional[str] = None,
5858
scopes: Optional[Sequence[str]] = None,
5959
quota_project_id: Optional[str] = None,

google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def __init__(
4747
self,
4848
*,
4949
host: str = "dataflow.googleapis.com",
50-
credentials: ga_credentials.Credentials = None,
51-
credentials_file: str = None,
52-
scopes: Sequence[str] = None,
53-
channel: grpc.Channel = None,
54-
api_mtls_endpoint: str = None,
55-
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
56-
ssl_channel_credentials: grpc.ChannelCredentials = None,
57-
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
50+
credentials: Optional[ga_credentials.Credentials] = None,
51+
credentials_file: Optional[str] = None,
52+
scopes: Optional[Sequence[str]] = None,
53+
channel: Optional[grpc.Channel] = None,
54+
api_mtls_endpoint: Optional[str] = None,
55+
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
56+
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
57+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
5858
quota_project_id: Optional[str] = None,
5959
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
6060
always_use_jwt_access: Optional[bool] = False,
@@ -181,8 +181,8 @@ def __init__(
181181
def create_channel(
182182
cls,
183183
host: str = "dataflow.googleapis.com",
184-
credentials: ga_credentials.Credentials = None,
185-
credentials_file: str = None,
184+
credentials: Optional[ga_credentials.Credentials] = None,
185+
credentials_file: Optional[str] = None,
186186
scopes: Optional[Sequence[str]] = None,
187187
quota_project_id: Optional[str] = None,
188188
**kwargs,

google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc_asyncio.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FlexTemplatesServiceGrpcAsyncIOTransport(FlexTemplatesServiceTransport):
4949
def create_channel(
5050
cls,
5151
host: str = "dataflow.googleapis.com",
52-
credentials: ga_credentials.Credentials = None,
52+
credentials: Optional[ga_credentials.Credentials] = None,
5353
credentials_file: Optional[str] = None,
5454
scopes: Optional[Sequence[str]] = None,
5555
quota_project_id: Optional[str] = None,
@@ -92,15 +92,15 @@ def __init__(
9292
self,
9393
*,
9494
host: str = "dataflow.googleapis.com",
95-
credentials: ga_credentials.Credentials = None,
95+
credentials: Optional[ga_credentials.Credentials] = None,
9696
credentials_file: Optional[str] = None,
9797
scopes: Optional[Sequence[str]] = None,
98-
channel: aio.Channel = None,
99-
api_mtls_endpoint: str = None,
100-
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
101-
ssl_channel_credentials: grpc.ChannelCredentials = None,
102-
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
103-
quota_project_id=None,
98+
channel: Optional[aio.Channel] = None,
99+
api_mtls_endpoint: Optional[str] = None,
100+
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
101+
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
102+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
103+
quota_project_id: Optional[str] = None,
104104
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
105105
always_use_jwt_access: Optional[bool] = False,
106106
api_audience: Optional[str] = None,

google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/rest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def __init__(
128128
self,
129129
*,
130130
host: str = "dataflow.googleapis.com",
131-
credentials: ga_credentials.Credentials = None,
132-
credentials_file: str = None,
133-
scopes: Sequence[str] = None,
134-
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
131+
credentials: Optional[ga_credentials.Credentials] = None,
132+
credentials_file: Optional[str] = None,
133+
scopes: Optional[Sequence[str]] = None,
134+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
135135
quota_project_id: Optional[str] = None,
136136
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
137137
always_use_jwt_access: Optional[bool] = False,
@@ -213,7 +213,7 @@ def __call__(
213213
request: templates.LaunchFlexTemplateRequest,
214214
*,
215215
retry: OptionalRetry = gapic_v1.method.DEFAULT,
216-
timeout: float = None,
216+
timeout: Optional[float] = None,
217217
metadata: Sequence[Tuple[str, str]] = (),
218218
) -> templates.LaunchFlexTemplateResponse:
219219
r"""Call the launch flex template method over HTTP.

0 commit comments

Comments
 (0)