Skip to content

Commit 7bd8488

Browse files
chore: Update gapic-generator-python to v1.6.1 (#229)
* 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: googleapis/googleapis-gen@c8aa327 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 * add release-please-config.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 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: googleapis/googleapis-gen@61ef576 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: googleapis/googleapis-gen@ab0e217 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: googleapis/googleapis-gen@555c094 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 setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 25fb110 commit 7bd8488

33 files changed

Lines changed: 636 additions & 467 deletions

packages/google-cloud-functions/.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:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.8.3"
3+
}

packages/google-cloud-functions/docs/functions_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 Functions v1 API
33

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

packages/google-cloud-functions/docs/functions_v2/types.rst

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

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

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

1721
from google.cloud.functions_v1.services.cloud_functions_service.async_client import (
1822
CloudFunctionsServiceAsyncClient,
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.8.3" # {x-release-please-version}

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

1721
from .services.cloud_functions_service import (
1822
CloudFunctionsServiceAsyncClient,

packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py

Lines changed: 53 additions & 43 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
@@ -182,9 +192,9 @@ def transport(self) -> CloudFunctionsServiceTransport:
182192
def __init__(
183193
self,
184194
*,
185-
credentials: ga_credentials.Credentials = None,
195+
credentials: Optional[ga_credentials.Credentials] = None,
186196
transport: Union[str, CloudFunctionsServiceTransport] = "grpc_asyncio",
187-
client_options: ClientOptions = None,
197+
client_options: Optional[ClientOptions] = None,
188198
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
189199
) -> None:
190200
"""Instantiates the cloud functions service client.
@@ -228,10 +238,10 @@ def __init__(
228238

229239
async def list_functions(
230240
self,
231-
request: Union[functions.ListFunctionsRequest, dict] = None,
241+
request: Optional[Union[functions.ListFunctionsRequest, dict]] = None,
232242
*,
233243
retry: OptionalRetry = gapic_v1.method.DEFAULT,
234-
timeout: float = None,
244+
timeout: Optional[float] = None,
235245
metadata: Sequence[Tuple[str, str]] = (),
236246
) -> pagers.ListFunctionsAsyncPager:
237247
r"""Returns a list of functions that belong to the
@@ -264,7 +274,7 @@ async def sample_list_functions():
264274
print(response)
265275
266276
Args:
267-
request (Union[google.cloud.functions_v1.types.ListFunctionsRequest, dict]):
277+
request (Optional[Union[google.cloud.functions_v1.types.ListFunctionsRequest, dict]]):
268278
The request object. Request for the `ListFunctions`
269279
method.
270280
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -330,11 +340,11 @@ async def sample_list_functions():
330340

331341
async def get_function(
332342
self,
333-
request: Union[functions.GetFunctionRequest, dict] = None,
343+
request: Optional[Union[functions.GetFunctionRequest, 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
) -> functions.CloudFunction:
340350
r"""Returns a function with the given name from the
@@ -367,7 +377,7 @@ async def sample_get_function():
367377
print(response)
368378
369379
Args:
370-
request (Union[google.cloud.functions_v1.types.GetFunctionRequest, dict]):
380+
request (Optional[Union[google.cloud.functions_v1.types.GetFunctionRequest, dict]]):
371381
The request object. Request for the `GetFunction`
372382
method.
373383
name (:class:`str`):
@@ -445,12 +455,12 @@ async def sample_get_function():
445455

446456
async def create_function(
447457
self,
448-
request: Union[functions.CreateFunctionRequest, dict] = None,
458+
request: Optional[Union[functions.CreateFunctionRequest, dict]] = None,
449459
*,
450-
location: str = None,
451-
function: functions.CloudFunction = None,
460+
location: Optional[str] = None,
461+
function: Optional[functions.CloudFunction] = None,
452462
retry: OptionalRetry = gapic_v1.method.DEFAULT,
453-
timeout: float = None,
463+
timeout: Optional[float] = None,
454464
metadata: Sequence[Tuple[str, str]] = (),
455465
) -> operation_async.AsyncOperation:
456466
r"""Creates a new function. If a function with the given name
@@ -492,7 +502,7 @@ async def sample_create_function():
492502
print(response)
493503
494504
Args:
495-
request (Union[google.cloud.functions_v1.types.CreateFunctionRequest, dict]):
505+
request (Optional[Union[google.cloud.functions_v1.types.CreateFunctionRequest, dict]]):
496506
The request object. Request for the `CreateFunction`
497507
method.
498508
location (:class:`str`):
@@ -577,11 +587,11 @@ async def sample_create_function():
577587

578588
async def update_function(
579589
self,
580-
request: Union[functions.UpdateFunctionRequest, dict] = None,
590+
request: Optional[Union[functions.UpdateFunctionRequest, dict]] = None,
581591
*,
582-
function: functions.CloudFunction = None,
592+
function: Optional[functions.CloudFunction] = None,
583593
retry: OptionalRetry = gapic_v1.method.DEFAULT,
584-
timeout: float = None,
594+
timeout: Optional[float] = None,
585595
metadata: Sequence[Tuple[str, str]] = (),
586596
) -> operation_async.AsyncOperation:
587597
r"""Updates existing function.
@@ -620,7 +630,7 @@ async def sample_update_function():
620630
print(response)
621631
622632
Args:
623-
request (Union[google.cloud.functions_v1.types.UpdateFunctionRequest, dict]):
633+
request (Optional[Union[google.cloud.functions_v1.types.UpdateFunctionRequest, dict]]):
624634
The request object. Request for the `UpdateFunction`
625635
method.
626636
function (:class:`google.cloud.functions_v1.types.CloudFunction`):
@@ -709,11 +719,11 @@ async def sample_update_function():
709719

710720
async def delete_function(
711721
self,
712-
request: Union[functions.DeleteFunctionRequest, dict] = None,
722+
request: Optional[Union[functions.DeleteFunctionRequest, dict]] = None,
713723
*,
714-
name: str = None,
724+
name: Optional[str] = None,
715725
retry: OptionalRetry = gapic_v1.method.DEFAULT,
716-
timeout: float = None,
726+
timeout: Optional[float] = None,
717727
metadata: Sequence[Tuple[str, str]] = (),
718728
) -> operation_async.AsyncOperation:
719729
r"""Deletes a function with the given name from the
@@ -752,7 +762,7 @@ async def sample_delete_function():
752762
print(response)
753763
754764
Args:
755-
request (Union[google.cloud.functions_v1.types.DeleteFunctionRequest, dict]):
765+
request (Optional[Union[google.cloud.functions_v1.types.DeleteFunctionRequest, dict]]):
756766
The request object. Request for the `DeleteFunction`
757767
method.
758768
name (:class:`str`):
@@ -846,12 +856,12 @@ async def sample_delete_function():
846856

847857
async def call_function(
848858
self,
849-
request: Union[functions.CallFunctionRequest, dict] = None,
859+
request: Optional[Union[functions.CallFunctionRequest, dict]] = None,
850860
*,
851-
name: str = None,
852-
data: str = None,
861+
name: Optional[str] = None,
862+
data: Optional[str] = None,
853863
retry: OptionalRetry = gapic_v1.method.DEFAULT,
854-
timeout: float = None,
864+
timeout: Optional[float] = None,
855865
metadata: Sequence[Tuple[str, str]] = (),
856866
) -> functions.CallFunctionResponse:
857867
r"""Synchronously invokes a deployed Cloud Function. To be used for
@@ -887,7 +897,7 @@ async def sample_call_function():
887897
print(response)
888898
889899
Args:
890-
request (Union[google.cloud.functions_v1.types.CallFunctionRequest, dict]):
900+
request (Optional[Union[google.cloud.functions_v1.types.CallFunctionRequest, dict]]):
891901
The request object. Request for the `CallFunction`
892902
method.
893903
name (:class:`str`):
@@ -960,10 +970,10 @@ async def sample_call_function():
960970

961971
async def generate_upload_url(
962972
self,
963-
request: Union[functions.GenerateUploadUrlRequest, dict] = None,
973+
request: Optional[Union[functions.GenerateUploadUrlRequest, dict]] = None,
964974
*,
965975
retry: OptionalRetry = gapic_v1.method.DEFAULT,
966-
timeout: float = None,
976+
timeout: Optional[float] = None,
967977
metadata: Sequence[Tuple[str, str]] = (),
968978
) -> functions.GenerateUploadUrlResponse:
969979
r"""Returns a signed URL for uploading a function source code. For
@@ -1021,7 +1031,7 @@ async def sample_generate_upload_url():
10211031
print(response)
10221032
10231033
Args:
1024-
request (Union[google.cloud.functions_v1.types.GenerateUploadUrlRequest, dict]):
1034+
request (Optional[Union[google.cloud.functions_v1.types.GenerateUploadUrlRequest, dict]]):
10251035
The request object. Request of `GenerateSourceUploadUrl`
10261036
method.
10271037
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1064,10 +1074,10 @@ async def sample_generate_upload_url():
10641074

10651075
async def generate_download_url(
10661076
self,
1067-
request: Union[functions.GenerateDownloadUrlRequest, dict] = None,
1077+
request: Optional[Union[functions.GenerateDownloadUrlRequest, dict]] = None,
10681078
*,
10691079
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1070-
timeout: float = None,
1080+
timeout: Optional[float] = None,
10711081
metadata: Sequence[Tuple[str, str]] = (),
10721082
) -> functions.GenerateDownloadUrlResponse:
10731083
r"""Returns a signed URL for downloading deployed
@@ -1103,7 +1113,7 @@ async def sample_generate_download_url():
11031113
print(response)
11041114
11051115
Args:
1106-
request (Union[google.cloud.functions_v1.types.GenerateDownloadUrlRequest, dict]):
1116+
request (Optional[Union[google.cloud.functions_v1.types.GenerateDownloadUrlRequest, dict]]):
11071117
The request object. Request of `GenerateDownloadUrl`
11081118
method.
11091119
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1146,10 +1156,10 @@ async def sample_generate_download_url():
11461156

11471157
async def set_iam_policy(
11481158
self,
1149-
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
1159+
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
11501160
*,
11511161
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1152-
timeout: float = None,
1162+
timeout: Optional[float] = None,
11531163
metadata: Sequence[Tuple[str, str]] = (),
11541164
) -> policy_pb2.Policy:
11551165
r"""Sets the IAM access control policy on the specified
@@ -1183,7 +1193,7 @@ async def sample_set_iam_policy():
11831193
print(response)
11841194
11851195
Args:
1186-
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
1196+
request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]):
11871197
The request object. Request message for `SetIamPolicy`
11881198
method.
11891199
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1290,10 +1300,10 @@ async def sample_set_iam_policy():
12901300

12911301
async def get_iam_policy(
12921302
self,
1293-
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
1303+
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
12941304
*,
12951305
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1296-
timeout: float = None,
1306+
timeout: Optional[float] = None,
12971307
metadata: Sequence[Tuple[str, str]] = (),
12981308
) -> policy_pb2.Policy:
12991309
r"""Gets the IAM access control policy for a function.
@@ -1328,7 +1338,7 @@ async def sample_get_iam_policy():
13281338
print(response)
13291339
13301340
Args:
1331-
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
1341+
request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]):
13321342
The request object. Request message for `GetIamPolicy`
13331343
method.
13341344
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1435,10 +1445,10 @@ async def sample_get_iam_policy():
14351445

14361446
async def test_iam_permissions(
14371447
self,
1438-
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
1448+
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
14391449
*,
14401450
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1441-
timeout: float = None,
1451+
timeout: Optional[float] = None,
14421452
metadata: Sequence[Tuple[str, str]] = (),
14431453
) -> iam_policy_pb2.TestIamPermissionsResponse:
14441454
r"""Tests the specified permissions against the IAM access control
@@ -1474,7 +1484,7 @@ async def sample_test_iam_permissions():
14741484
print(response)
14751485
14761486
Args:
1477-
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
1487+
request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]):
14781488
The request object. Request message for
14791489
`TestIamPermissions` method.
14801490
retry (google.api_core.retry.Retry): Designation of what errors, if any,

0 commit comments

Comments
 (0)