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

Commit 0600814

Browse files
chore: Update gapic-generator-python to v1.6.1 (#239)
* 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 owlbot.py to exclude generated gapic_version.py * 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 * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 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 * configure release-please to use manifest Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 38eb3ce commit 0600814

File tree

21 files changed

+242
-70
lines changed

21 files changed

+242
-70
lines changed

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.9.4"
3+
}

docs/mediatranslation_v1beta1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Mediatranslation v1beta1 API
33

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

google/cloud/mediatranslation/__init__.py

Lines changed: 4 additions & 0 deletions
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.mediatranslation import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.mediatranslation_v1beta1.services.speech_translation_service.async_client import (
1822
SpeechTranslationServiceAsyncClient,
Lines changed: 16 additions & 0 deletions
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.9.4" # {x-release-please-version}

google/cloud/mediatranslation_v1beta1/__init__.py

Lines changed: 4 additions & 0 deletions
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.mediatranslation import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.speech_translation_service import (
1822
SpeechTranslationServiceAsyncClient,

google/cloud/mediatranslation_v1beta1/services/speech_translation_service/async_client.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
Awaitable,
2323
Dict,
2424
Mapping,
25+
MutableMapping,
26+
MutableSequence,
2527
Optional,
2628
Sequence,
2729
Tuple,
@@ -174,9 +176,9 @@ def transport(self) -> SpeechTranslationServiceTransport:
174176
def __init__(
175177
self,
176178
*,
177-
credentials: ga_credentials.Credentials = None,
179+
credentials: Optional[ga_credentials.Credentials] = None,
178180
transport: Union[str, SpeechTranslationServiceTransport] = "grpc_asyncio",
179-
client_options: ClientOptions = None,
181+
client_options: Optional[ClientOptions] = None,
180182
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
181183
) -> None:
182184
"""Instantiates the speech translation service client.
@@ -220,12 +222,12 @@ def __init__(
220222

221223
def streaming_translate_speech(
222224
self,
223-
requests: AsyncIterator[
224-
media_translation.StreamingTranslateSpeechRequest
225+
requests: Optional[
226+
AsyncIterator[media_translation.StreamingTranslateSpeechRequest]
225227
] = None,
226228
*,
227229
retry: OptionalRetry = gapic_v1.method.DEFAULT,
228-
timeout: float = None,
230+
timeout: Optional[float] = None,
229231
metadata: Sequence[Tuple[str, str]] = (),
230232
) -> Awaitable[AsyncIterable[media_translation.StreamingTranslateSpeechResponse]]:
231233
r"""Performs bidirectional streaming speech translation:

google/cloud/mediatranslation_v1beta1/services/speech_translation_service/client.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
Iterable,
2222
Iterator,
2323
Mapping,
24+
MutableMapping,
25+
MutableSequence,
2426
Optional,
2527
Sequence,
2628
Tuple,
2729
Type,
2830
Union,
31+
cast,
2932
)
3033

3134
from google.api_core import client_options as client_options_lib
@@ -69,7 +72,7 @@ class SpeechTranslationServiceClientMeta(type):
6972

7073
def get_transport_class(
7174
cls,
72-
label: str = None,
75+
label: Optional[str] = None,
7376
) -> Type[SpeechTranslationServiceTransport]:
7477
"""Returns an appropriate transport class.
7578
@@ -322,8 +325,8 @@ def __init__(
322325
self,
323326
*,
324327
credentials: Optional[ga_credentials.Credentials] = None,
325-
transport: Union[str, SpeechTranslationServiceTransport, None] = None,
326-
client_options: Optional[client_options_lib.ClientOptions] = None,
328+
transport: Optional[Union[str, SpeechTranslationServiceTransport]] = None,
329+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
327330
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
328331
) -> None:
329332
"""Instantiates the speech translation service client.
@@ -337,7 +340,7 @@ def __init__(
337340
transport (Union[str, SpeechTranslationServiceTransport]): The
338341
transport to use. If set to None, a transport is chosen
339342
automatically.
340-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
343+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
341344
client. It won't take effect if a ``transport`` instance is provided.
342345
(1) The ``api_endpoint`` property can be used to override the
343346
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -367,6 +370,7 @@ def __init__(
367370
client_options = client_options_lib.from_dict(client_options)
368371
if client_options is None:
369372
client_options = client_options_lib.ClientOptions()
373+
client_options = cast(client_options_lib.ClientOptions, client_options)
370374

371375
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
372376
client_options
@@ -419,10 +423,12 @@ def __init__(
419423

420424
def streaming_translate_speech(
421425
self,
422-
requests: Iterator[media_translation.StreamingTranslateSpeechRequest] = None,
426+
requests: Optional[
427+
Iterator[media_translation.StreamingTranslateSpeechRequest]
428+
] = None,
423429
*,
424430
retry: OptionalRetry = gapic_v1.method.DEFAULT,
425-
timeout: float = None,
431+
timeout: Optional[float] = None,
426432
metadata: Sequence[Tuple[str, str]] = (),
427433
) -> Iterable[media_translation.StreamingTranslateSpeechResponse]:
428434
r"""Performs bidirectional streaming speech translation:

google/cloud/mediatranslation_v1beta1/services/speech_translation_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848
self,
4949
*,
5050
host: str = DEFAULT_HOST,
51-
credentials: ga_credentials.Credentials = None,
51+
credentials: Optional[ga_credentials.Credentials] = None,
5252
credentials_file: Optional[str] = None,
5353
scopes: Optional[Sequence[str]] = None,
5454
quota_project_id: Optional[str] = None,

google/cloud/mediatranslation_v1beta1/services/speech_translation_service/transports/grpc.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ def __init__(
4646
self,
4747
*,
4848
host: str = "mediatranslation.googleapis.com",
49-
credentials: ga_credentials.Credentials = None,
50-
credentials_file: str = None,
51-
scopes: Sequence[str] = None,
52-
channel: grpc.Channel = None,
53-
api_mtls_endpoint: str = None,
54-
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
55-
ssl_channel_credentials: grpc.ChannelCredentials = None,
56-
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
49+
credentials: Optional[ga_credentials.Credentials] = None,
50+
credentials_file: Optional[str] = None,
51+
scopes: Optional[Sequence[str]] = None,
52+
channel: Optional[grpc.Channel] = None,
53+
api_mtls_endpoint: Optional[str] = None,
54+
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
55+
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
56+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
5757
quota_project_id: Optional[str] = None,
5858
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
5959
always_use_jwt_access: Optional[bool] = False,
@@ -180,8 +180,8 @@ def __init__(
180180
def create_channel(
181181
cls,
182182
host: str = "mediatranslation.googleapis.com",
183-
credentials: ga_credentials.Credentials = None,
184-
credentials_file: str = None,
183+
credentials: Optional[ga_credentials.Credentials] = None,
184+
credentials_file: Optional[str] = None,
185185
scopes: Optional[Sequence[str]] = None,
186186
quota_project_id: Optional[str] = None,
187187
**kwargs,

0 commit comments

Comments
 (0)