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 (#130)
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] committed Nov 1, 2021
1 parent 25aa395 commit 11ee1bf
Show file tree
Hide file tree
Showing 13 changed files with 267 additions and 289 deletions.
64 changes: 33 additions & 31 deletions google/cloud/billing_v1/services/cloud_billing/async_client.py
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.cloud.billing_v1.services.cloud_billing import pagers
from google.cloud.billing_v1.types import cloud_billing
from google.iam.v1 import iam_policy_pb2 # type: ignore
Expand Down Expand Up @@ -161,10 +163,10 @@ def __init__(

async def get_billing_account(
self,
request: cloud_billing.GetBillingAccountRequest = None,
request: Union[cloud_billing.GetBillingAccountRequest, 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]] = (),
) -> cloud_billing.BillingAccount:
Expand All @@ -173,7 +175,7 @@ async def get_billing_account(
account <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
Args:
request (:class:`google.cloud.billing_v1.types.GetBillingAccountRequest`):
request (Union[google.cloud.billing_v1.types.GetBillingAccountRequest, dict]):
The request object. Request message for
`GetBillingAccount`.
name (:class:`str`):
Expand Down Expand Up @@ -246,9 +248,9 @@ async def get_billing_account(

async def list_billing_accounts(
self,
request: cloud_billing.ListBillingAccountsRequest = None,
request: Union[cloud_billing.ListBillingAccountsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListBillingAccountsAsyncPager:
Expand All @@ -257,7 +259,7 @@ async def list_billing_accounts(
`view <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
Args:
request (:class:`google.cloud.billing_v1.types.ListBillingAccountsRequest`):
request (Union[google.cloud.billing_v1.types.ListBillingAccountsRequest, dict]):
The request object. Request message for
`ListBillingAccounts`.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -309,11 +311,11 @@ async def list_billing_accounts(

async def update_billing_account(
self,
request: cloud_billing.UpdateBillingAccountRequest = None,
request: Union[cloud_billing.UpdateBillingAccountRequest, dict] = None,
*,
name: str = None,
account: cloud_billing.BillingAccount = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.BillingAccount:
Expand All @@ -325,7 +327,7 @@ async def update_billing_account(
of the billing account.
Args:
request (:class:`google.cloud.billing_v1.types.UpdateBillingAccountRequest`):
request (Union[google.cloud.billing_v1.types.UpdateBillingAccountRequest, dict]):
The request object. Request message for
`UpdateBillingAccount`.
name (:class:`str`):
Expand Down Expand Up @@ -407,10 +409,10 @@ async def update_billing_account(

async def create_billing_account(
self,
request: cloud_billing.CreateBillingAccountRequest = None,
request: Union[cloud_billing.CreateBillingAccountRequest, dict] = None,
*,
billing_account: cloud_billing.BillingAccount = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.BillingAccount:
Expand All @@ -426,7 +428,7 @@ async def create_billing_account(
been provisioned as a reseller account.
Args:
request (:class:`google.cloud.billing_v1.types.CreateBillingAccountRequest`):
request (Union[google.cloud.billing_v1.types.CreateBillingAccountRequest, dict]):
The request object. Request message for
`CreateBillingAccount`.
billing_account (:class:`google.cloud.billing_v1.types.BillingAccount`):
Expand Down Expand Up @@ -486,10 +488,10 @@ async def create_billing_account(

async def list_project_billing_info(
self,
request: cloud_billing.ListProjectBillingInfoRequest = None,
request: Union[cloud_billing.ListProjectBillingInfoRequest, 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]] = (),
) -> pagers.ListProjectBillingInfoAsyncPager:
Expand All @@ -500,7 +502,7 @@ async def list_project_billing_info(
`viewers <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
Args:
request (:class:`google.cloud.billing_v1.types.ListProjectBillingInfoRequest`):
request (Union[google.cloud.billing_v1.types.ListProjectBillingInfoRequest, dict]):
The request object. Request message for
`ListProjectBillingInfo`.
name (:class:`str`):
Expand Down Expand Up @@ -580,10 +582,10 @@ async def list_project_billing_info(

async def get_project_billing_info(
self,
request: cloud_billing.GetProjectBillingInfoRequest = None,
request: Union[cloud_billing.GetProjectBillingInfoRequest, 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]] = (),
) -> cloud_billing.ProjectBillingInfo:
Expand All @@ -592,7 +594,7 @@ async def get_project_billing_info(
project <https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo>`__.
Args:
request (:class:`google.cloud.billing_v1.types.GetProjectBillingInfoRequest`):
request (Union[google.cloud.billing_v1.types.GetProjectBillingInfoRequest, dict]):
The request object. Request message for
`GetProjectBillingInfo`.
name (:class:`str`):
Expand Down Expand Up @@ -667,11 +669,11 @@ async def get_project_billing_info(

async def update_project_billing_info(
self,
request: cloud_billing.UpdateProjectBillingInfoRequest = None,
request: Union[cloud_billing.UpdateProjectBillingInfoRequest, dict] = None,
*,
name: str = None,
project_billing_info: cloud_billing.ProjectBillingInfo = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.ProjectBillingInfo:
Expand Down Expand Up @@ -713,7 +715,7 @@ async def update_project_billing_info(
account.
Args:
request (:class:`google.cloud.billing_v1.types.UpdateProjectBillingInfoRequest`):
request (Union[google.cloud.billing_v1.types.UpdateProjectBillingInfoRequest, dict]):
The request object. Request message for
`UpdateProjectBillingInfo`.
name (:class:`str`):
Expand Down Expand Up @@ -798,10 +800,10 @@ async def update_project_billing_info(

async def get_iam_policy(
self,
request: iam_policy_pb2.GetIamPolicyRequest = None,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
resource: str = 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 @@ -811,7 +813,7 @@ async def get_iam_policy(
`viewers <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
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.
resource (:class:`str`):
Expand Down Expand Up @@ -937,10 +939,10 @@ async def get_iam_policy(

async def set_iam_policy(
self,
request: iam_policy_pb2.SetIamPolicyRequest = None,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
resource: str = 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 @@ -951,7 +953,7 @@ async def set_iam_policy(
`administrators <https://cloud.google.com/billing/docs/how-to/billing-access>`__.
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.
resource (:class:`str`):
Expand Down Expand Up @@ -1077,11 +1079,11 @@ async def set_iam_policy(

async def test_iam_permissions(
self,
request: iam_policy_pb2.TestIamPermissionsRequest = None,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
resource: str = None,
permissions: Sequence[str] = 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 @@ -1092,7 +1094,7 @@ async def test_iam_permissions(
resource.
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.
resource (:class:`str`):
Expand Down
22 changes: 12 additions & 10 deletions google/cloud/billing_v1/services/cloud_billing/client.py
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.cloud.billing_v1.services.cloud_billing import pagers
from google.cloud.billing_v1.types import cloud_billing
from google.iam.v1 import iam_policy_pb2 # type: ignore
Expand Down Expand Up @@ -338,7 +340,7 @@ def get_billing_account(
request: Union[cloud_billing.GetBillingAccountRequest, 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]] = (),
) -> cloud_billing.BillingAccount:
Expand Down Expand Up @@ -412,7 +414,7 @@ def list_billing_accounts(
self,
request: Union[cloud_billing.ListBillingAccountsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListBillingAccountsPager:
Expand Down Expand Up @@ -468,7 +470,7 @@ def update_billing_account(
*,
name: str = None,
account: cloud_billing.BillingAccount = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.BillingAccount:
Expand Down Expand Up @@ -555,7 +557,7 @@ def create_billing_account(
request: Union[cloud_billing.CreateBillingAccountRequest, dict] = None,
*,
billing_account: cloud_billing.BillingAccount = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.BillingAccount:
Expand Down Expand Up @@ -634,7 +636,7 @@ def list_project_billing_info(
request: Union[cloud_billing.ListProjectBillingInfoRequest, 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]] = (),
) -> pagers.ListProjectBillingInfoPager:
Expand Down Expand Up @@ -720,7 +722,7 @@ def get_project_billing_info(
request: Union[cloud_billing.GetProjectBillingInfoRequest, 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]] = (),
) -> cloud_billing.ProjectBillingInfo:
Expand Down Expand Up @@ -798,7 +800,7 @@ def update_project_billing_info(
*,
name: str = None,
project_billing_info: cloud_billing.ProjectBillingInfo = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> cloud_billing.ProjectBillingInfo:
Expand Down Expand Up @@ -920,7 +922,7 @@ def get_iam_policy(
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
resource: str = 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 @@ -1048,7 +1050,7 @@ def set_iam_policy(
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
resource: str = 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 @@ -1178,7 +1180,7 @@ def test_iam_permissions(
*,
resource: str = None,
permissions: Sequence[str] = 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

0 comments on commit 11ee1bf

Please sign in to comment.