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.51.2 (#138)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent 4293bb3 commit 746a7a1
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 48 deletions.
22 changes: 11 additions & 11 deletions google/cloud/billing/budgets_v1/services/budget_service/client.py
Expand Up @@ -17,7 +17,7 @@
from distutils import util
import os
import re
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
Expand Down Expand Up @@ -354,7 +354,7 @@ def __init__(

def create_budget(
self,
request: budget_service.CreateBudgetRequest = None,
request: Union[budget_service.CreateBudgetRequest, dict] = None,
*,
parent: str = None,
budget: budget_model.Budget = None,
Expand All @@ -368,7 +368,7 @@ def create_budget(
create.
Args:
request (google.cloud.billing.budgets_v1.types.CreateBudgetRequest):
request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]):
The request object. Request for CreateBudget
parent (str):
Required. The name of the billing account to create the
Expand Down Expand Up @@ -443,7 +443,7 @@ def create_budget(

def update_budget(
self,
request: budget_service.UpdateBudgetRequest = None,
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
*,
budget: budget_model.Budget = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -458,7 +458,7 @@ def update_budget(
changed by this method.
Args:
request (google.cloud.billing.budgets_v1.types.UpdateBudgetRequest):
request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]):
The request object. Request for UpdateBudget
budget (google.cloud.billing.budgets_v1.types.Budget):
Required. The updated budget object.
Expand Down Expand Up @@ -541,7 +541,7 @@ def update_budget(

def get_budget(
self,
request: budget_service.GetBudgetRequest = None,
request: Union[budget_service.GetBudgetRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -556,7 +556,7 @@ def get_budget(
Cloud Console.
Args:
request (google.cloud.billing.budgets_v1.types.GetBudgetRequest):
request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]):
The request object. Request for GetBudget
name (str):
Required. Name of budget to get. Values are of the form
Expand Down Expand Up @@ -623,7 +623,7 @@ def get_budget(

def list_budgets(
self,
request: budget_service.ListBudgetsRequest = None,
request: Union[budget_service.ListBudgetsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -638,7 +638,7 @@ def list_budgets(
Cloud Console.
Args:
request (google.cloud.billing.budgets_v1.types.ListBudgetsRequest):
request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]):
The request object. Request for ListBudgets
parent (str):
Required. Name of billing account to list budgets under.
Expand Down Expand Up @@ -707,7 +707,7 @@ def list_budgets(

def delete_budget(
self,
request: budget_service.DeleteBudgetRequest = None,
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -718,7 +718,7 @@ def delete_budget(
deleted.
Args:
request (google.cloud.billing.budgets_v1.types.DeleteBudgetRequest):
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
The request object. Request for DeleteBudget
name (str):
Required. Name of the budget to delete. Values are of
Expand Down
Expand Up @@ -122,7 +122,7 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
Expand Down
Expand Up @@ -84,16 +84,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Expand Up @@ -131,16 +131,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Expand Up @@ -17,7 +17,7 @@
from distutils import util
import os
import re
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
Expand Down Expand Up @@ -353,7 +353,7 @@ def __init__(

def create_budget(
self,
request: budget_service.CreateBudgetRequest = None,
request: Union[budget_service.CreateBudgetRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -365,7 +365,7 @@ def create_budget(
number of budgets you can create.
Args:
request (google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest):
request (Union[google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest, dict]):
The request object. Request for CreateBudget
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -412,7 +412,7 @@ def create_budget(

def update_budget(
self,
request: budget_service.UpdateBudgetRequest = None,
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -425,7 +425,7 @@ def update_budget(
changed by this method.
Args:
request (google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest):
request (Union[google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest, dict]):
The request object. Request for UpdateBudget
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -474,7 +474,7 @@ def update_budget(

def get_budget(
self,
request: budget_service.GetBudgetRequest = None,
request: Union[budget_service.GetBudgetRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -488,7 +488,7 @@ def get_budget(
Cloud Console.
Args:
request (google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest):
request (Union[google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest, dict]):
The request object. Request for GetBudget
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -535,7 +535,7 @@ def get_budget(

def list_budgets(
self,
request: budget_service.ListBudgetsRequest = None,
request: Union[budget_service.ListBudgetsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -549,7 +549,7 @@ def list_budgets(
Cloud Console.
Args:
request (google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest):
request (Union[google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest, dict]):
The request object. Request for ListBudgets
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -597,7 +597,7 @@ def list_budgets(

def delete_budget(
self,
request: budget_service.DeleteBudgetRequest = None,
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -607,7 +607,7 @@ def delete_budget(
deleted.
Args:
request (google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest):
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):
The request object. Request for DeleteBudget
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down
Expand Up @@ -122,7 +122,7 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
Expand Down
Expand Up @@ -84,16 +84,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Expand Up @@ -131,16 +131,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
12 changes: 6 additions & 6 deletions scripts/fixup_budgets_v1_keywords.py
Expand Up @@ -39,11 +39,11 @@ def partition(
class budgetsCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_budget': ('parent', 'budget', ),
'delete_budget': ('name', ),
'get_budget': ('name', ),
'list_budgets': ('parent', 'page_size', 'page_token', ),
'update_budget': ('budget', 'update_mask', ),
'create_budget': ('parent', 'budget', ),
'delete_budget': ('name', ),
'get_budget': ('name', ),
'list_budgets': ('parent', 'page_size', 'page_token', ),
'update_budget': ('budget', 'update_mask', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -62,7 +62,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
return updated

kwargs, ctrl_kwargs = partition(
lambda a: not a.keyword.value in self.CTRL_PARAMS,
lambda a: a.keyword.value not in self.CTRL_PARAMS,
kwargs
)

Expand Down
12 changes: 6 additions & 6 deletions scripts/fixup_budgets_v1beta1_keywords.py
Expand Up @@ -39,11 +39,11 @@ def partition(
class budgetsCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_budget': ('parent', 'budget', ),
'delete_budget': ('name', ),
'get_budget': ('name', ),
'list_budgets': ('parent', 'page_size', 'page_token', ),
'update_budget': ('budget', 'update_mask', ),
'create_budget': ('parent', 'budget', ),
'delete_budget': ('name', ),
'get_budget': ('name', ),
'list_budgets': ('parent', 'page_size', 'page_token', ),
'update_budget': ('budget', 'update_mask', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -62,7 +62,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
return updated

kwargs, ctrl_kwargs = partition(
lambda a: not a.keyword.value in self.CTRL_PARAMS,
lambda a: a.keyword.value not in self.CTRL_PARAMS,
kwargs
)

Expand Down

0 comments on commit 746a7a1

Please sign in to comment.