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

Commit a6193cf

Browse files
chore: Update gapic-generator-python to v1.6.1 (#358)
* 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 * set manifest to true in .github/release-please.yml * 🦉 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 * 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 autogenerated setup.py * add release-please-config.json and use manifest * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * run nox format session * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * restore original coverage level * 🦉 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 d580eb5 commit a6193cf

File tree

543 files changed

+22013
-20331
lines changed

Some content is hidden

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

543 files changed

+22013
-20331
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.6.1"
3+
}

docs/compute_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 Compute v1 API
33

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

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27-
import sys
2827
import os
2928
import shlex
29+
import sys
3030

3131
# If extensions (or modules to document with autodoc) are in another directory,
3232
# add these directories to sys.path here. If the directory is relative to the

google/cloud/compute/__init__.py

Lines changed: 1112 additions & 1497 deletions
Large diffs are not rendered by default.

google/cloud/compute/gapic_version.py

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.6.1"

google/cloud/compute_v1/__init__.py

Lines changed: 1303 additions & 1302 deletions
Large diffs are not rendered by default.

google/cloud/compute_v1/services/accelerator_types/client.py

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,29 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
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+
)
2131

2232
from google.api_core import client_options as client_options_lib
2333
from google.api_core import exceptions as core_exceptions
2434
from google.api_core import gapic_v1
2535
from google.api_core import retry as retries
2636
from google.auth import credentials as ga_credentials # type: ignore
37+
from google.auth.exceptions import MutualTLSChannelError # type: ignore
2738
from google.auth.transport import mtls # type: ignore
2839
from google.auth.transport.grpc import SslCredentials # type: ignore
29-
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3040
from google.oauth2 import service_account # type: ignore
41+
import pkg_resources
3142

3243
try:
3344
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -36,7 +47,8 @@
3647

3748
from google.cloud.compute_v1.services.accelerator_types import pagers
3849
from google.cloud.compute_v1.types import compute
39-
from .transports.base import AcceleratorTypesTransport, DEFAULT_CLIENT_INFO
50+
51+
from .transports.base import DEFAULT_CLIENT_INFO, AcceleratorTypesTransport
4052
from .transports.rest import AcceleratorTypesRestTransport
4153

4254

@@ -55,7 +67,7 @@ class AcceleratorTypesClientMeta(type):
5567

5668
def get_transport_class(
5769
cls,
58-
label: str = None,
70+
label: Optional[str] = None,
5971
) -> Type[AcceleratorTypesTransport]:
6072
"""Returns an appropriate transport class.
6173
@@ -310,8 +322,8 @@ def __init__(
310322
self,
311323
*,
312324
credentials: Optional[ga_credentials.Credentials] = None,
313-
transport: Union[str, AcceleratorTypesTransport, None] = None,
314-
client_options: Optional[client_options_lib.ClientOptions] = None,
325+
transport: Optional[Union[str, AcceleratorTypesTransport]] = None,
326+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
315327
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
316328
) -> None:
317329
"""Instantiates the accelerator types client.
@@ -328,7 +340,7 @@ def __init__(
328340
NOTE: "rest" transport functionality is currently in a
329341
beta state (preview). We welcome your feedback via an
330342
issue in this library's source repository.
331-
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
332344
client. It won't take effect if a ``transport`` instance is provided.
333345
(1) The ``api_endpoint`` property can be used to override the
334346
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -358,6 +370,7 @@ def __init__(
358370
client_options = client_options_lib.from_dict(client_options)
359371
if client_options is None:
360372
client_options = client_options_lib.ClientOptions()
373+
client_options = cast(client_options_lib.ClientOptions, client_options)
361374

362375
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
363376
client_options
@@ -410,11 +423,13 @@ def __init__(
410423

411424
def aggregated_list(
412425
self,
413-
request: Union[compute.AggregatedListAcceleratorTypesRequest, dict] = None,
426+
request: Optional[
427+
Union[compute.AggregatedListAcceleratorTypesRequest, dict]
428+
] = None,
414429
*,
415-
project: str = None,
430+
project: Optional[str] = None,
416431
retry: OptionalRetry = gapic_v1.method.DEFAULT,
417-
timeout: float = None,
432+
timeout: Optional[float] = None,
418433
metadata: Sequence[Tuple[str, str]] = (),
419434
) -> pagers.AggregatedListPager:
420435
r"""Retrieves an aggregated list of accelerator types.
@@ -495,13 +510,13 @@ def aggregated_list(
495510

496511
def get(
497512
self,
498-
request: Union[compute.GetAcceleratorTypeRequest, dict] = None,
513+
request: Optional[Union[compute.GetAcceleratorTypeRequest, dict]] = None,
499514
*,
500-
project: str = None,
501-
zone: str = None,
502-
accelerator_type: str = None,
515+
project: Optional[str] = None,
516+
zone: Optional[str] = None,
517+
accelerator_type: Optional[str] = None,
503518
retry: OptionalRetry = gapic_v1.method.DEFAULT,
504-
timeout: float = None,
519+
timeout: Optional[float] = None,
505520
metadata: Sequence[Tuple[str, str]] = (),
506521
) -> compute.AcceleratorType:
507522
r"""Returns the specified accelerator type.
@@ -602,12 +617,12 @@ def get(
602617

603618
def list(
604619
self,
605-
request: Union[compute.ListAcceleratorTypesRequest, dict] = None,
620+
request: Optional[Union[compute.ListAcceleratorTypesRequest, dict]] = None,
606621
*,
607-
project: str = None,
608-
zone: str = None,
622+
project: Optional[str] = None,
623+
zone: Optional[str] = None,
609624
retry: OptionalRetry = gapic_v1.method.DEFAULT,
610-
timeout: float = None,
625+
timeout: Optional[float] = None,
611626
metadata: Sequence[Tuple[str, str]] = (),
612627
) -> pagers.ListPager:
613628
r"""Retrieves a list of accelerator types that are

google/cloud/compute_v1/services/accelerator_types/pagers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
AsyncIterator,
1919
Awaitable,
2020
Callable,
21+
Iterator,
22+
Optional,
2123
Sequence,
2224
Tuple,
23-
Optional,
24-
Iterator,
2525
)
2626

2727
from google.cloud.compute_v1.types import compute

google/cloud/compute_v1/services/accelerator_types/transports/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
from typing import Dict, Type
1818

1919
from .base import AcceleratorTypesTransport
20-
from .rest import AcceleratorTypesRestTransport
21-
from .rest import AcceleratorTypesRestInterceptor
22-
20+
from .rest import AcceleratorTypesRestInterceptor, AcceleratorTypesRestTransport
2321

2422
# Compile a registry of transports.
2523
_transport_registry = OrderedDict() # type: Dict[str, Type[AcceleratorTypesTransport]]

0 commit comments

Comments
 (0)