Skip to content

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#229)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2022
1 parent 25fb110 commit 7bd8488
Show file tree
Hide file tree
Showing 33 changed files with 636 additions and 467 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-functions/.github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions packages/google-cloud-functions/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.8.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Functions v1 API

.. automodule:: google.cloud.functions_v1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Functions v2 API

.. automodule:: google.cloud.functions_v2.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.functions import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.functions_v1.services.cloud_functions_service.async_client import (
CloudFunctionsServiceAsyncClient,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.8.3" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.functions import gapic_version as package_version

__version__ = package_version.__version__


from .services.cloud_functions_service import (
CloudFunctionsServiceAsyncClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
Expand Down Expand Up @@ -182,9 +192,9 @@ def transport(self) -> CloudFunctionsServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, CloudFunctionsServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the cloud functions service client.
Expand Down Expand Up @@ -228,10 +238,10 @@ def __init__(

async def list_functions(
self,
request: Union[functions.ListFunctionsRequest, dict] = None,
request: Optional[Union[functions.ListFunctionsRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListFunctionsAsyncPager:
r"""Returns a list of functions that belong to the
Expand Down Expand Up @@ -264,7 +274,7 @@ async def sample_list_functions():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.ListFunctionsRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.ListFunctionsRequest, dict]]):
The request object. Request for the `ListFunctions`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -330,11 +340,11 @@ async def sample_list_functions():

async def get_function(
self,
request: Union[functions.GetFunctionRequest, dict] = None,
request: Optional[Union[functions.GetFunctionRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CloudFunction:
r"""Returns a function with the given name from the
Expand Down Expand Up @@ -367,7 +377,7 @@ async def sample_get_function():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.GetFunctionRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.GetFunctionRequest, dict]]):
The request object. Request for the `GetFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -445,12 +455,12 @@ async def sample_get_function():

async def create_function(
self,
request: Union[functions.CreateFunctionRequest, dict] = None,
request: Optional[Union[functions.CreateFunctionRequest, dict]] = None,
*,
location: str = None,
function: functions.CloudFunction = None,
location: Optional[str] = None,
function: Optional[functions.CloudFunction] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Creates a new function. If a function with the given name
Expand Down Expand Up @@ -492,7 +502,7 @@ async def sample_create_function():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.CreateFunctionRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.CreateFunctionRequest, dict]]):
The request object. Request for the `CreateFunction`
method.
location (:class:`str`):
Expand Down Expand Up @@ -577,11 +587,11 @@ async def sample_create_function():

async def update_function(
self,
request: Union[functions.UpdateFunctionRequest, dict] = None,
request: Optional[Union[functions.UpdateFunctionRequest, dict]] = None,
*,
function: functions.CloudFunction = None,
function: Optional[functions.CloudFunction] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Updates existing function.
Expand Down Expand Up @@ -620,7 +630,7 @@ async def sample_update_function():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.UpdateFunctionRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.UpdateFunctionRequest, dict]]):
The request object. Request for the `UpdateFunction`
method.
function (:class:`google.cloud.functions_v1.types.CloudFunction`):
Expand Down Expand Up @@ -709,11 +719,11 @@ async def sample_update_function():

async def delete_function(
self,
request: Union[functions.DeleteFunctionRequest, dict] = None,
request: Optional[Union[functions.DeleteFunctionRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Deletes a function with the given name from the
Expand Down Expand Up @@ -752,7 +762,7 @@ async def sample_delete_function():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.DeleteFunctionRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.DeleteFunctionRequest, dict]]):
The request object. Request for the `DeleteFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -846,12 +856,12 @@ async def sample_delete_function():

async def call_function(
self,
request: Union[functions.CallFunctionRequest, dict] = None,
request: Optional[Union[functions.CallFunctionRequest, dict]] = None,
*,
name: str = None,
data: str = None,
name: Optional[str] = None,
data: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CallFunctionResponse:
r"""Synchronously invokes a deployed Cloud Function. To be used for
Expand Down Expand Up @@ -887,7 +897,7 @@ async def sample_call_function():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.CallFunctionRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.CallFunctionRequest, dict]]):
The request object. Request for the `CallFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -960,10 +970,10 @@ async def sample_call_function():

async def generate_upload_url(
self,
request: Union[functions.GenerateUploadUrlRequest, dict] = None,
request: Optional[Union[functions.GenerateUploadUrlRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateUploadUrlResponse:
r"""Returns a signed URL for uploading a function source code. For
Expand Down Expand Up @@ -1021,7 +1031,7 @@ async def sample_generate_upload_url():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.GenerateUploadUrlRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.GenerateUploadUrlRequest, dict]]):
The request object. Request of `GenerateSourceUploadUrl`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1064,10 +1074,10 @@ async def sample_generate_upload_url():

async def generate_download_url(
self,
request: Union[functions.GenerateDownloadUrlRequest, dict] = None,
request: Optional[Union[functions.GenerateDownloadUrlRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateDownloadUrlResponse:
r"""Returns a signed URL for downloading deployed
Expand Down Expand Up @@ -1103,7 +1113,7 @@ async def sample_generate_download_url():
print(response)
Args:
request (Union[google.cloud.functions_v1.types.GenerateDownloadUrlRequest, dict]):
request (Optional[Union[google.cloud.functions_v1.types.GenerateDownloadUrlRequest, dict]]):
The request object. Request of `GenerateDownloadUrl`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1146,10 +1156,10 @@ async def sample_generate_download_url():

async def set_iam_policy(
self,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Sets the IAM access control policy on the specified
Expand Down Expand Up @@ -1183,7 +1193,7 @@ async def sample_set_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]):
The request object. Request message for `SetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1290,10 +1300,10 @@ async def sample_set_iam_policy():

async def get_iam_policy(
self,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Gets the IAM access control policy for a function.
Expand Down Expand Up @@ -1328,7 +1338,7 @@ async def sample_get_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]):
The request object. Request message for `GetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1435,10 +1445,10 @@ async def sample_get_iam_policy():

async def test_iam_permissions(
self,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
r"""Tests the specified permissions against the IAM access control
Expand Down Expand Up @@ -1474,7 +1484,7 @@ async def sample_test_iam_permissions():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]):
The request object. Request message for
`TestIamPermissions` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Loading

0 comments on commit 7bd8488

Please sign in to comment.