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

Commit 8e84d42

Browse files
chore: Update gapic-generator-python to v1.6.1 (#241)
* 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 <partheniou@google.com>
1 parent 435697a commit 8e84d42

Some content is hidden

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

48 files changed

+925
-555
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.5.3"
3+
}

docs/servicedirectory_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 Servicedirectory v1 API
33

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

docs/servicedirectory_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 Servicedirectory v1beta1 API
33

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

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

1721
from google.cloud.servicedirectory_v1.services.lookup_service.async_client import (
1822
LookupServiceAsyncClient,
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.5.3" # {x-release-please-version}

google/cloud/servicedirectory_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.servicedirectory import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.lookup_service import LookupServiceAsyncClient, LookupServiceClient
1822
from .services.registration_service import (

google/cloud/servicedirectory_v1/services/lookup_service/async_client.py

Lines changed: 16 additions & 6 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
@@ -160,9 +170,9 @@ def transport(self) -> LookupServiceTransport:
160170
def __init__(
161171
self,
162172
*,
163-
credentials: ga_credentials.Credentials = None,
173+
credentials: Optional[ga_credentials.Credentials] = None,
164174
transport: Union[str, LookupServiceTransport] = "grpc_asyncio",
165-
client_options: ClientOptions = None,
175+
client_options: Optional[ClientOptions] = None,
166176
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
167177
) -> None:
168178
"""Instantiates the lookup service client.
@@ -206,10 +216,10 @@ def __init__(
206216

207217
async def resolve_service(
208218
self,
209-
request: Union[lookup_service.ResolveServiceRequest, dict] = None,
219+
request: Optional[Union[lookup_service.ResolveServiceRequest, dict]] = None,
210220
*,
211221
retry: OptionalRetry = gapic_v1.method.DEFAULT,
212-
timeout: float = None,
222+
timeout: Optional[float] = None,
213223
metadata: Sequence[Tuple[str, str]] = (),
214224
) -> lookup_service.ResolveServiceResponse:
215225
r"""Returns a [service][google.cloud.servicedirectory.v1.Service]
@@ -243,7 +253,7 @@ async def sample_resolve_service():
243253
print(response)
244254
245255
Args:
246-
request (Union[google.cloud.servicedirectory_v1.types.ResolveServiceRequest, dict]):
256+
request (Optional[Union[google.cloud.servicedirectory_v1.types.ResolveServiceRequest, dict]]):
247257
The request object. The request message for
248258
[LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService].
249259
Looks up a service by its name, returns the service and

google/cloud/servicedirectory_v1/services/lookup_service/client.py

Lines changed: 19 additions & 7 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
@@ -55,7 +66,7 @@ class LookupServiceClientMeta(type):
5566

5667
def get_transport_class(
5768
cls,
58-
label: str = None,
69+
label: Optional[str] = None,
5970
) -> Type[LookupServiceTransport]:
6071
"""Returns an appropriate transport class.
6172
@@ -358,8 +369,8 @@ def __init__(
358369
self,
359370
*,
360371
credentials: Optional[ga_credentials.Credentials] = None,
361-
transport: Union[str, LookupServiceTransport, None] = None,
362-
client_options: Optional[client_options_lib.ClientOptions] = None,
372+
transport: Optional[Union[str, LookupServiceTransport]] = None,
373+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
363374
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
364375
) -> None:
365376
"""Instantiates the lookup service client.
@@ -373,7 +384,7 @@ def __init__(
373384
transport (Union[str, LookupServiceTransport]): The
374385
transport to use. If set to None, a transport is chosen
375386
automatically.
376-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
387+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
377388
client. It won't take effect if a ``transport`` instance is provided.
378389
(1) The ``api_endpoint`` property can be used to override the
379390
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -403,6 +414,7 @@ def __init__(
403414
client_options = client_options_lib.from_dict(client_options)
404415
if client_options is None:
405416
client_options = client_options_lib.ClientOptions()
417+
client_options = cast(client_options_lib.ClientOptions, client_options)
406418

407419
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
408420
client_options
@@ -455,10 +467,10 @@ def __init__(
455467

456468
def resolve_service(
457469
self,
458-
request: Union[lookup_service.ResolveServiceRequest, dict] = None,
470+
request: Optional[Union[lookup_service.ResolveServiceRequest, dict]] = None,
459471
*,
460472
retry: OptionalRetry = gapic_v1.method.DEFAULT,
461-
timeout: float = None,
473+
timeout: Optional[float] = None,
462474
metadata: Sequence[Tuple[str, str]] = (),
463475
) -> lookup_service.ResolveServiceResponse:
464476
r"""Returns a [service][google.cloud.servicedirectory.v1.Service]

google/cloud/servicedirectory_v1/services/lookup_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,

0 commit comments

Comments
 (0)