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

Commit fd8cfa4

Browse files
chore: Update gapic-generator-python to v1.6.1 (#89)
* 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 1c407cb commit fd8cfa4

22 files changed

+276
-109
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.2.4"
3+
}

docs/ids_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 Ids v1 API
33

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

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

1721
from google.cloud.ids_v1.services.ids.async_client import IDSAsyncClient
1822
from google.cloud.ids_v1.services.ids.client import IDSClient

google/cloud/ids/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.2.4" # {x-release-please-version}

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

1721
from .services.ids import IDSAsyncClient, IDSClient
1822
from .types.ids import (

google/cloud/ids_v1/services/ids/async_client.py

Lines changed: 31 additions & 21 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
@@ -154,9 +164,9 @@ def transport(self) -> IDSTransport:
154164
def __init__(
155165
self,
156166
*,
157-
credentials: ga_credentials.Credentials = None,
167+
credentials: Optional[ga_credentials.Credentials] = None,
158168
transport: Union[str, IDSTransport] = "grpc_asyncio",
159-
client_options: ClientOptions = None,
169+
client_options: Optional[ClientOptions] = None,
160170
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
161171
) -> None:
162172
"""Instantiates the ids client.
@@ -200,11 +210,11 @@ def __init__(
200210

201211
async def list_endpoints(
202212
self,
203-
request: Union[ids.ListEndpointsRequest, dict] = None,
213+
request: Optional[Union[ids.ListEndpointsRequest, dict]] = None,
204214
*,
205-
parent: str = None,
215+
parent: Optional[str] = None,
206216
retry: OptionalRetry = gapic_v1.method.DEFAULT,
207-
timeout: float = None,
217+
timeout: Optional[float] = None,
208218
metadata: Sequence[Tuple[str, str]] = (),
209219
) -> pagers.ListEndpointsAsyncPager:
210220
r"""Lists Endpoints in a given project and location.
@@ -237,7 +247,7 @@ async def sample_list_endpoints():
237247
print(response)
238248
239249
Args:
240-
request (Union[google.cloud.ids_v1.types.ListEndpointsRequest, dict]):
250+
request (Optional[Union[google.cloud.ids_v1.types.ListEndpointsRequest, dict]]):
241251
The request object.
242252
parent (:class:`str`):
243253
Required. The parent, which owns this
@@ -321,11 +331,11 @@ async def sample_list_endpoints():
321331

322332
async def get_endpoint(
323333
self,
324-
request: Union[ids.GetEndpointRequest, dict] = None,
334+
request: Optional[Union[ids.GetEndpointRequest, dict]] = None,
325335
*,
326-
name: str = None,
336+
name: Optional[str] = None,
327337
retry: OptionalRetry = gapic_v1.method.DEFAULT,
328-
timeout: float = None,
338+
timeout: Optional[float] = None,
329339
metadata: Sequence[Tuple[str, str]] = (),
330340
) -> ids.Endpoint:
331341
r"""Gets details of a single Endpoint.
@@ -357,7 +367,7 @@ async def sample_get_endpoint():
357367
print(response)
358368
359369
Args:
360-
request (Union[google.cloud.ids_v1.types.GetEndpointRequest, dict]):
370+
request (Optional[Union[google.cloud.ids_v1.types.GetEndpointRequest, dict]]):
361371
The request object.
362372
name (:class:`str`):
363373
Required. The name of the endpoint to retrieve. Format:
@@ -433,13 +443,13 @@ async def sample_get_endpoint():
433443

434444
async def create_endpoint(
435445
self,
436-
request: Union[ids.CreateEndpointRequest, dict] = None,
446+
request: Optional[Union[ids.CreateEndpointRequest, dict]] = None,
437447
*,
438-
parent: str = None,
439-
endpoint: ids.Endpoint = None,
440-
endpoint_id: str = None,
448+
parent: Optional[str] = None,
449+
endpoint: Optional[ids.Endpoint] = None,
450+
endpoint_id: Optional[str] = None,
441451
retry: OptionalRetry = gapic_v1.method.DEFAULT,
442-
timeout: float = None,
452+
timeout: Optional[float] = None,
443453
metadata: Sequence[Tuple[str, str]] = (),
444454
) -> operation_async.AsyncOperation:
445455
r"""Creates a new Endpoint in a given project and
@@ -482,7 +492,7 @@ async def sample_create_endpoint():
482492
print(response)
483493
484494
Args:
485-
request (Union[google.cloud.ids_v1.types.CreateEndpointRequest, dict]):
495+
request (Optional[Union[google.cloud.ids_v1.types.CreateEndpointRequest, dict]]):
486496
The request object.
487497
parent (:class:`str`):
488498
Required. The endpoint's parent.
@@ -575,11 +585,11 @@ async def sample_create_endpoint():
575585

576586
async def delete_endpoint(
577587
self,
578-
request: Union[ids.DeleteEndpointRequest, dict] = None,
588+
request: Optional[Union[ids.DeleteEndpointRequest, dict]] = None,
579589
*,
580-
name: str = None,
590+
name: Optional[str] = None,
581591
retry: OptionalRetry = gapic_v1.method.DEFAULT,
582-
timeout: float = None,
592+
timeout: Optional[float] = None,
583593
metadata: Sequence[Tuple[str, str]] = (),
584594
) -> operation_async.AsyncOperation:
585595
r"""Deletes a single Endpoint.
@@ -615,7 +625,7 @@ async def sample_delete_endpoint():
615625
print(response)
616626
617627
Args:
618-
request (Union[google.cloud.ids_v1.types.DeleteEndpointRequest, dict]):
628+
request (Optional[Union[google.cloud.ids_v1.types.DeleteEndpointRequest, dict]]):
619629
The request object.
620630
name (:class:`str`):
621631
Required. The name of the endpoint to

google/cloud/ids_v1/services/ids/client.py

Lines changed: 31 additions & 19 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
@@ -61,7 +72,7 @@ class IDSClientMeta(type):
6172

6273
def get_transport_class(
6374
cls,
64-
label: str = None,
75+
label: Optional[str] = None,
6576
) -> Type[IDSTransport]:
6677
"""Returns an appropriate transport class.
6778
@@ -336,8 +347,8 @@ def __init__(
336347
self,
337348
*,
338349
credentials: Optional[ga_credentials.Credentials] = None,
339-
transport: Union[str, IDSTransport, None] = None,
340-
client_options: Optional[client_options_lib.ClientOptions] = None,
350+
transport: Optional[Union[str, IDSTransport]] = None,
351+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
341352
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
342353
) -> None:
343354
"""Instantiates the ids client.
@@ -351,7 +362,7 @@ def __init__(
351362
transport (Union[str, IDSTransport]): The
352363
transport to use. If set to None, a transport is chosen
353364
automatically.
354-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
365+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
355366
client. It won't take effect if a ``transport`` instance is provided.
356367
(1) The ``api_endpoint`` property can be used to override the
357368
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -381,6 +392,7 @@ def __init__(
381392
client_options = client_options_lib.from_dict(client_options)
382393
if client_options is None:
383394
client_options = client_options_lib.ClientOptions()
395+
client_options = cast(client_options_lib.ClientOptions, client_options)
384396

385397
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
386398
client_options
@@ -433,11 +445,11 @@ def __init__(
433445

434446
def list_endpoints(
435447
self,
436-
request: Union[ids.ListEndpointsRequest, dict] = None,
448+
request: Optional[Union[ids.ListEndpointsRequest, dict]] = None,
437449
*,
438-
parent: str = None,
450+
parent: Optional[str] = None,
439451
retry: OptionalRetry = gapic_v1.method.DEFAULT,
440-
timeout: float = None,
452+
timeout: Optional[float] = None,
441453
metadata: Sequence[Tuple[str, str]] = (),
442454
) -> pagers.ListEndpointsPager:
443455
r"""Lists Endpoints in a given project and location.
@@ -545,11 +557,11 @@ def sample_list_endpoints():
545557

546558
def get_endpoint(
547559
self,
548-
request: Union[ids.GetEndpointRequest, dict] = None,
560+
request: Optional[Union[ids.GetEndpointRequest, dict]] = None,
549561
*,
550-
name: str = None,
562+
name: Optional[str] = None,
551563
retry: OptionalRetry = gapic_v1.method.DEFAULT,
552-
timeout: float = None,
564+
timeout: Optional[float] = None,
553565
metadata: Sequence[Tuple[str, str]] = (),
554566
) -> ids.Endpoint:
555567
r"""Gets details of a single Endpoint.
@@ -648,13 +660,13 @@ def sample_get_endpoint():
648660

649661
def create_endpoint(
650662
self,
651-
request: Union[ids.CreateEndpointRequest, dict] = None,
663+
request: Optional[Union[ids.CreateEndpointRequest, dict]] = None,
652664
*,
653-
parent: str = None,
654-
endpoint: ids.Endpoint = None,
655-
endpoint_id: str = None,
665+
parent: Optional[str] = None,
666+
endpoint: Optional[ids.Endpoint] = None,
667+
endpoint_id: Optional[str] = None,
656668
retry: OptionalRetry = gapic_v1.method.DEFAULT,
657-
timeout: float = None,
669+
timeout: Optional[float] = None,
658670
metadata: Sequence[Tuple[str, str]] = (),
659671
) -> operation.Operation:
660672
r"""Creates a new Endpoint in a given project and
@@ -790,11 +802,11 @@ def sample_create_endpoint():
790802

791803
def delete_endpoint(
792804
self,
793-
request: Union[ids.DeleteEndpointRequest, dict] = None,
805+
request: Optional[Union[ids.DeleteEndpointRequest, dict]] = None,
794806
*,
795-
name: str = None,
807+
name: Optional[str] = None,
796808
retry: OptionalRetry = gapic_v1.method.DEFAULT,
797-
timeout: float = None,
809+
timeout: Optional[float] = None,
798810
metadata: Sequence[Tuple[str, str]] = (),
799811
) -> operation.Operation:
800812
r"""Deletes a single Endpoint.

google/cloud/ids_v1/services/ids/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,

google/cloud/ids_v1/services/ids/transports/grpc.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def __init__(
4747
self,
4848
*,
4949
host: str = "ids.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,
@@ -182,8 +182,8 @@ def __init__(
182182
def create_channel(
183183
cls,
184184
host: str = "ids.googleapis.com",
185-
credentials: ga_credentials.Credentials = None,
186-
credentials_file: str = None,
185+
credentials: Optional[ga_credentials.Credentials] = None,
186+
credentials_file: Optional[str] = None,
187187
scopes: Optional[Sequence[str]] = None,
188188
quota_project_id: Optional[str] = None,
189189
**kwargs,

0 commit comments

Comments
 (0)