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

Commit 8edf594

Browse files
chore: Update gapic-generator-python to v1.6.1 (#145)
* 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 * set manifest to true in .github/release-please.yml * 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 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent f5dd4cc commit 8edf594

Some content is hidden

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

46 files changed

+708
-451
lines changed

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true
34
# NOTE: this section is generated by synthtool.languages.python
45
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
56
branches:

.release-please-manifest.json

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

docs/service_v1/types.rst

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

44
.. automodule:: google.cloud.orchestration.airflow.service_v1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

docs/service_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 Orchestration Airflow Service v1beta1 API
33

44
.. automodule:: google.cloud.orchestration.airflow.service_v1beta1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/orchestration/airflow/service/__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.orchestration.airflow.service import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.orchestration.airflow.service_v1.services.environments.async_client import (
1822
EnvironmentsAsyncClient,
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__ = "1.4.4" # {x-release-please-version}

google/cloud/orchestration/airflow/service_v1/__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.orchestration.airflow.service import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.environments import EnvironmentsAsyncClient, EnvironmentsClient
1822
from .services.image_versions import ImageVersionsAsyncClient, ImageVersionsClient

google/cloud/orchestration/airflow/service_v1/services/environments/async_client.py

Lines changed: 36 additions & 26 deletions
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
@@ -161,9 +171,9 @@ def transport(self) -> EnvironmentsTransport:
161171
def __init__(
162172
self,
163173
*,
164-
credentials: ga_credentials.Credentials = None,
174+
credentials: Optional[ga_credentials.Credentials] = None,
165175
transport: Union[str, EnvironmentsTransport] = "grpc_asyncio",
166-
client_options: ClientOptions = None,
176+
client_options: Optional[ClientOptions] = None,
167177
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
168178
) -> None:
169179
"""Instantiates the environments client.
@@ -207,12 +217,12 @@ def __init__(
207217

208218
async def create_environment(
209219
self,
210-
request: Union[environments.CreateEnvironmentRequest, dict] = None,
220+
request: Optional[Union[environments.CreateEnvironmentRequest, dict]] = None,
211221
*,
212-
parent: str = None,
213-
environment: environments.Environment = None,
222+
parent: Optional[str] = None,
223+
environment: Optional[environments.Environment] = None,
214224
retry: OptionalRetry = gapic_v1.method.DEFAULT,
215-
timeout: float = None,
225+
timeout: Optional[float] = None,
216226
metadata: Sequence[Tuple[str, str]] = (),
217227
) -> operation_async.AsyncOperation:
218228
r"""Create a new environment.
@@ -247,7 +257,7 @@ async def sample_create_environment():
247257
print(response)
248258
249259
Args:
250-
request (Union[google.cloud.orchestration.airflow.service_v1.types.CreateEnvironmentRequest, dict]):
260+
request (Optional[Union[google.cloud.orchestration.airflow.service_v1.types.CreateEnvironmentRequest, dict]]):
251261
The request object. Create a new environment.
252262
parent (:class:`str`):
253263
The parent must be of the form
@@ -330,11 +340,11 @@ async def sample_create_environment():
330340

331341
async def get_environment(
332342
self,
333-
request: Union[environments.GetEnvironmentRequest, dict] = None,
343+
request: Optional[Union[environments.GetEnvironmentRequest, dict]] = None,
334344
*,
335-
name: str = None,
345+
name: Optional[str] = None,
336346
retry: OptionalRetry = gapic_v1.method.DEFAULT,
337-
timeout: float = None,
347+
timeout: Optional[float] = None,
338348
metadata: Sequence[Tuple[str, str]] = (),
339349
) -> environments.Environment:
340350
r"""Get an existing environment.
@@ -365,7 +375,7 @@ async def sample_get_environment():
365375
print(response)
366376
367377
Args:
368-
request (Union[google.cloud.orchestration.airflow.service_v1.types.GetEnvironmentRequest, dict]):
378+
request (Optional[Union[google.cloud.orchestration.airflow.service_v1.types.GetEnvironmentRequest, dict]]):
369379
The request object. Get an environment.
370380
name (:class:`str`):
371381
The resource name of the environment
@@ -431,11 +441,11 @@ async def sample_get_environment():
431441

432442
async def list_environments(
433443
self,
434-
request: Union[environments.ListEnvironmentsRequest, dict] = None,
444+
request: Optional[Union[environments.ListEnvironmentsRequest, dict]] = None,
435445
*,
436-
parent: str = None,
446+
parent: Optional[str] = None,
437447
retry: OptionalRetry = gapic_v1.method.DEFAULT,
438-
timeout: float = None,
448+
timeout: Optional[float] = None,
439449
metadata: Sequence[Tuple[str, str]] = (),
440450
) -> pagers.ListEnvironmentsAsyncPager:
441451
r"""List environments.
@@ -467,7 +477,7 @@ async def sample_list_environments():
467477
print(response)
468478
469479
Args:
470-
request (Union[google.cloud.orchestration.airflow.service_v1.types.ListEnvironmentsRequest, dict]):
480+
request (Optional[Union[google.cloud.orchestration.airflow.service_v1.types.ListEnvironmentsRequest, dict]]):
471481
The request object. List environments in a project and
472482
location.
473483
parent (:class:`str`):
@@ -546,13 +556,13 @@ async def sample_list_environments():
546556

547557
async def update_environment(
548558
self,
549-
request: Union[environments.UpdateEnvironmentRequest, dict] = None,
559+
request: Optional[Union[environments.UpdateEnvironmentRequest, dict]] = None,
550560
*,
551-
name: str = None,
552-
environment: environments.Environment = None,
553-
update_mask: field_mask_pb2.FieldMask = None,
561+
name: Optional[str] = None,
562+
environment: Optional[environments.Environment] = None,
563+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
554564
retry: OptionalRetry = gapic_v1.method.DEFAULT,
555-
timeout: float = None,
565+
timeout: Optional[float] = None,
556566
metadata: Sequence[Tuple[str, str]] = (),
557567
) -> operation_async.AsyncOperation:
558568
r"""Update an environment.
@@ -587,7 +597,7 @@ async def sample_update_environment():
587597
print(response)
588598
589599
Args:
590-
request (Union[google.cloud.orchestration.airflow.service_v1.types.UpdateEnvironmentRequest, dict]):
600+
request (Optional[Union[google.cloud.orchestration.airflow.service_v1.types.UpdateEnvironmentRequest, dict]]):
591601
The request object. Update an environment.
592602
name (:class:`str`):
593603
The relative resource name of the
@@ -843,11 +853,11 @@ async def sample_update_environment():
843853

844854
async def delete_environment(
845855
self,
846-
request: Union[environments.DeleteEnvironmentRequest, dict] = None,
856+
request: Optional[Union[environments.DeleteEnvironmentRequest, dict]] = None,
847857
*,
848-
name: str = None,
858+
name: Optional[str] = None,
849859
retry: OptionalRetry = gapic_v1.method.DEFAULT,
850-
timeout: float = None,
860+
timeout: Optional[float] = None,
851861
metadata: Sequence[Tuple[str, str]] = (),
852862
) -> operation_async.AsyncOperation:
853863
r"""Delete an environment.
@@ -882,7 +892,7 @@ async def sample_delete_environment():
882892
print(response)
883893
884894
Args:
885-
request (Union[google.cloud.orchestration.airflow.service_v1.types.DeleteEnvironmentRequest, dict]):
895+
request (Optional[Union[google.cloud.orchestration.airflow.service_v1.types.DeleteEnvironmentRequest, dict]]):
886896
The request object. Delete an environment.
887897
name (:class:`str`):
888898
The environment to delete, in the

google/cloud/orchestration/airflow/service_v1/services/environments/client.py

Lines changed: 35 additions & 23 deletions
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
@@ -62,7 +73,7 @@ class EnvironmentsClientMeta(type):
6273

6374
def get_transport_class(
6475
cls,
65-
label: str = None,
76+
label: Optional[str] = None,
6677
) -> Type[EnvironmentsTransport]:
6778
"""Returns an appropriate transport class.
6879
@@ -339,8 +350,8 @@ def __init__(
339350
self,
340351
*,
341352
credentials: Optional[ga_credentials.Credentials] = None,
342-
transport: Union[str, EnvironmentsTransport, None] = None,
343-
client_options: Optional[client_options_lib.ClientOptions] = None,
353+
transport: Optional[Union[str, EnvironmentsTransport]] = None,
354+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
344355
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
345356
) -> None:
346357
"""Instantiates the environments client.
@@ -354,7 +365,7 @@ def __init__(
354365
transport (Union[str, EnvironmentsTransport]): The
355366
transport to use. If set to None, a transport is chosen
356367
automatically.
357-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
368+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
358369
client. It won't take effect if a ``transport`` instance is provided.
359370
(1) The ``api_endpoint`` property can be used to override the
360371
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -384,6 +395,7 @@ def __init__(
384395
client_options = client_options_lib.from_dict(client_options)
385396
if client_options is None:
386397
client_options = client_options_lib.ClientOptions()
398+
client_options = cast(client_options_lib.ClientOptions, client_options)
387399

388400
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
389401
client_options
@@ -436,12 +448,12 @@ def __init__(
436448

437449
def create_environment(
438450
self,
439-
request: Union[environments.CreateEnvironmentRequest, dict] = None,
451+
request: Optional[Union[environments.CreateEnvironmentRequest, dict]] = None,
440452
*,
441-
parent: str = None,
442-
environment: environments.Environment = None,
453+
parent: Optional[str] = None,
454+
environment: Optional[environments.Environment] = None,
443455
retry: OptionalRetry = gapic_v1.method.DEFAULT,
444-
timeout: float = None,
456+
timeout: Optional[float] = None,
445457
metadata: Sequence[Tuple[str, str]] = (),
446458
) -> operation.Operation:
447459
r"""Create a new environment.
@@ -559,11 +571,11 @@ def sample_create_environment():
559571

560572
def get_environment(
561573
self,
562-
request: Union[environments.GetEnvironmentRequest, dict] = None,
574+
request: Optional[Union[environments.GetEnvironmentRequest, dict]] = None,
563575
*,
564-
name: str = None,
576+
name: Optional[str] = None,
565577
retry: OptionalRetry = gapic_v1.method.DEFAULT,
566-
timeout: float = None,
578+
timeout: Optional[float] = None,
567579
metadata: Sequence[Tuple[str, str]] = (),
568580
) -> environments.Environment:
569581
r"""Get an existing environment.
@@ -660,11 +672,11 @@ def sample_get_environment():
660672

661673
def list_environments(
662674
self,
663-
request: Union[environments.ListEnvironmentsRequest, dict] = None,
675+
request: Optional[Union[environments.ListEnvironmentsRequest, dict]] = None,
664676
*,
665-
parent: str = None,
677+
parent: Optional[str] = None,
666678
retry: OptionalRetry = gapic_v1.method.DEFAULT,
667-
timeout: float = None,
679+
timeout: Optional[float] = None,
668680
metadata: Sequence[Tuple[str, str]] = (),
669681
) -> pagers.ListEnvironmentsPager:
670682
r"""List environments.
@@ -775,13 +787,13 @@ def sample_list_environments():
775787

776788
def update_environment(
777789
self,
778-
request: Union[environments.UpdateEnvironmentRequest, dict] = None,
790+
request: Optional[Union[environments.UpdateEnvironmentRequest, dict]] = None,
779791
*,
780-
name: str = None,
781-
environment: environments.Environment = None,
782-
update_mask: field_mask_pb2.FieldMask = None,
792+
name: Optional[str] = None,
793+
environment: Optional[environments.Environment] = None,
794+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
783795
retry: OptionalRetry = gapic_v1.method.DEFAULT,
784-
timeout: float = None,
796+
timeout: Optional[float] = None,
785797
metadata: Sequence[Tuple[str, str]] = (),
786798
) -> operation.Operation:
787799
r"""Update an environment.
@@ -1072,11 +1084,11 @@ def sample_update_environment():
10721084

10731085
def delete_environment(
10741086
self,
1075-
request: Union[environments.DeleteEnvironmentRequest, dict] = None,
1087+
request: Optional[Union[environments.DeleteEnvironmentRequest, dict]] = None,
10761088
*,
1077-
name: str = None,
1089+
name: Optional[str] = None,
10781090
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1079-
timeout: float = None,
1091+
timeout: Optional[float] = None,
10801092
metadata: Sequence[Tuple[str, str]] = (),
10811093
) -> operation.Operation:
10821094
r"""Delete an environment.

google/cloud/orchestration/airflow/service_v1/services/environments/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
self,
5050
*,
5151
host: str = DEFAULT_HOST,
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,

0 commit comments

Comments
 (0)