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

Commit

Permalink
chore: use gapic-generator-python 0.53.4 (#128)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

docs: list oneofs in docstring
fix(deps): require google-api-core >= 1.28.0
fix(deps): drop packaging dependency

committer: busunkim96@
PiperOrigin-RevId: 406468269

Source-Link: googleapis/googleapis@83d81b0

Source-Link: googleapis/googleapis-gen@2ff001f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
  • Loading branch information
gcf-owl-bot[bot] authored Nov 1, 2021
1 parent 12acbe3 commit 7076c62
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
from typing import Dict, Sequence, Tuple, Type, Union
import pkg_resources

import google.api_core.client_options as ClientOptions # type: ignore
from google.api_core.client_options import ClientOptions # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.functions_v1.services.cloud_functions_service import pagers
Expand Down Expand Up @@ -178,17 +180,17 @@ def __init__(

async def list_functions(
self,
request: functions.ListFunctionsRequest = None,
request: Union[functions.ListFunctionsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListFunctionsAsyncPager:
r"""Returns a list of functions that belong to the
requested project.
Args:
request (:class:`google.cloud.functions_v1.types.ListFunctionsRequest`):
request (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 @@ -246,18 +248,18 @@ async def list_functions(

async def get_function(
self,
request: functions.GetFunctionRequest = None,
request: Union[functions.GetFunctionRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CloudFunction:
r"""Returns a function with the given name from the
requested project.
Args:
request (:class:`google.cloud.functions_v1.types.GetFunctionRequest`):
request (Union[google.cloud.functions_v1.types.GetFunctionRequest, dict]):
The request object. Request for the `GetFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -330,11 +332,11 @@ async def get_function(

async def create_function(
self,
request: functions.CreateFunctionRequest = None,
request: Union[functions.CreateFunctionRequest, dict] = None,
*,
location: str = None,
function: functions.CloudFunction = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
Expand All @@ -343,7 +345,7 @@ async def create_function(
operation will return ``ALREADY_EXISTS`` error.
Args:
request (:class:`google.cloud.functions_v1.types.CreateFunctionRequest`):
request (Union[google.cloud.functions_v1.types.CreateFunctionRequest, dict]):
The request object. Request for the `CreateFunction`
method.
location (:class:`str`):
Expand Down Expand Up @@ -423,17 +425,17 @@ async def create_function(

async def update_function(
self,
request: functions.UpdateFunctionRequest = None,
request: Union[functions.UpdateFunctionRequest, dict] = None,
*,
function: functions.CloudFunction = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Updates existing function.
Args:
request (:class:`google.cloud.functions_v1.types.UpdateFunctionRequest`):
request (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 @@ -517,10 +519,10 @@ async def update_function(

async def delete_function(
self,
request: functions.DeleteFunctionRequest = None,
request: Union[functions.DeleteFunctionRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
Expand All @@ -530,7 +532,7 @@ async def delete_function(
function.
Args:
request (:class:`google.cloud.functions_v1.types.DeleteFunctionRequest`):
request (Union[google.cloud.functions_v1.types.DeleteFunctionRequest, dict]):
The request object. Request for the `DeleteFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -622,11 +624,11 @@ async def delete_function(

async def call_function(
self,
request: functions.CallFunctionRequest = None,
request: Union[functions.CallFunctionRequest, dict] = None,
*,
name: str = None,
data: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CallFunctionResponse:
Expand All @@ -636,7 +638,7 @@ async def call_function(
Limits <https://cloud.google.com/functions/quotas#rate_limits>`__.
Args:
request (:class:`google.cloud.functions_v1.types.CallFunctionRequest`):
request (Union[google.cloud.functions_v1.types.CallFunctionRequest, dict]):
The request object. Request for the `CallFunction`
method.
name (:class:`str`):
Expand Down Expand Up @@ -704,9 +706,9 @@ async def call_function(

async def generate_upload_url(
self,
request: functions.GenerateUploadUrlRequest = None,
request: Union[functions.GenerateUploadUrlRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateUploadUrlResponse:
Expand Down Expand Up @@ -740,7 +742,7 @@ async def generate_upload_url(
- ``Authorization: Bearer YOUR_TOKEN``
Args:
request (:class:`google.cloud.functions_v1.types.GenerateUploadUrlRequest`):
request (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 @@ -778,9 +780,9 @@ async def generate_upload_url(

async def generate_download_url(
self,
request: functions.GenerateDownloadUrlRequest = None,
request: Union[functions.GenerateDownloadUrlRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateDownloadUrlResponse:
Expand All @@ -793,7 +795,7 @@ async def generate_download_url(
control/signed-urls
Args:
request (:class:`google.cloud.functions_v1.types.GenerateDownloadUrlRequest`):
request (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 @@ -831,17 +833,17 @@ async def generate_download_url(

async def set_iam_policy(
self,
request: iam_policy_pb2.SetIamPolicyRequest = None,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Sets the IAM access control policy on the specified
function. Replaces any existing policy.
Args:
request (:class:`google.iam.v1.iam_policy_pb2.SetIamPolicyRequest`):
request (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 @@ -937,9 +939,9 @@ async def set_iam_policy(

async def get_iam_policy(
self,
request: iam_policy_pb2.GetIamPolicyRequest = None,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
Expand All @@ -948,7 +950,7 @@ async def get_iam_policy(
not have a policy set.
Args:
request (:class:`google.iam.v1.iam_policy_pb2.GetIamPolicyRequest`):
request (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 @@ -1044,9 +1046,9 @@ async def get_iam_policy(

async def test_iam_permissions(
self,
request: iam_policy_pb2.TestIamPermissionsRequest = None,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
Expand All @@ -1055,7 +1057,7 @@ async def test_iam_permissions(
return an empty set of permissions, not a NOT_FOUND error.
Args:
request (:class:`google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest`):
request (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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.functions_v1.services.cloud_functions_service import pagers
Expand Down Expand Up @@ -363,7 +365,7 @@ def list_functions(
self,
request: Union[functions.ListFunctionsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListFunctionsPager:
Expand Down Expand Up @@ -423,7 +425,7 @@ def get_function(
request: Union[functions.GetFunctionRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CloudFunction:
Expand Down Expand Up @@ -498,7 +500,7 @@ def create_function(
*,
location: str = None,
function: functions.CloudFunction = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
Expand Down Expand Up @@ -590,7 +592,7 @@ def update_function(
request: Union[functions.UpdateFunctionRequest, dict] = None,
*,
function: functions.CloudFunction = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
Expand Down Expand Up @@ -674,7 +676,7 @@ def delete_function(
request: Union[functions.DeleteFunctionRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
Expand Down Expand Up @@ -770,7 +772,7 @@ def call_function(
*,
name: str = None,
data: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.CallFunctionResponse:
Expand Down Expand Up @@ -850,7 +852,7 @@ def generate_upload_url(
self,
request: Union[functions.GenerateUploadUrlRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateUploadUrlResponse:
Expand Down Expand Up @@ -925,7 +927,7 @@ def generate_download_url(
self,
request: Union[functions.GenerateDownloadUrlRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> functions.GenerateDownloadUrlResponse:
Expand Down Expand Up @@ -979,7 +981,7 @@ def set_iam_policy(
self,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
Expand Down Expand Up @@ -1084,7 +1086,7 @@ def get_iam_policy(
self,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
Expand Down Expand Up @@ -1190,7 +1192,7 @@ def test_iam_permissions(
self,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
Expand Down
Loading

0 comments on commit 7076c62

Please sign in to comment.