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

Commit 746a7a1

Browse files
chore: use gapic-generator-python 0.51.2 (#138)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent 4293bb3 commit 746a7a1

File tree

10 files changed

+48
-48
lines changed

10 files changed

+48
-48
lines changed

google/cloud/billing/budgets_v1/services/budget_service/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

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

355355
def create_budget(
356356
self,
357-
request: budget_service.CreateBudgetRequest = None,
357+
request: Union[budget_service.CreateBudgetRequest, dict] = None,
358358
*,
359359
parent: str = None,
360360
budget: budget_model.Budget = None,
@@ -368,7 +368,7 @@ def create_budget(
368368
create.
369369
370370
Args:
371-
request (google.cloud.billing.budgets_v1.types.CreateBudgetRequest):
371+
request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]):
372372
The request object. Request for CreateBudget
373373
parent (str):
374374
Required. The name of the billing account to create the
@@ -443,7 +443,7 @@ def create_budget(
443443

444444
def update_budget(
445445
self,
446-
request: budget_service.UpdateBudgetRequest = None,
446+
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
447447
*,
448448
budget: budget_model.Budget = None,
449449
update_mask: field_mask_pb2.FieldMask = None,
@@ -458,7 +458,7 @@ def update_budget(
458458
changed by this method.
459459
460460
Args:
461-
request (google.cloud.billing.budgets_v1.types.UpdateBudgetRequest):
461+
request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]):
462462
The request object. Request for UpdateBudget
463463
budget (google.cloud.billing.budgets_v1.types.Budget):
464464
Required. The updated budget object.
@@ -541,7 +541,7 @@ def update_budget(
541541

542542
def get_budget(
543543
self,
544-
request: budget_service.GetBudgetRequest = None,
544+
request: Union[budget_service.GetBudgetRequest, dict] = None,
545545
*,
546546
name: str = None,
547547
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -556,7 +556,7 @@ def get_budget(
556556
Cloud Console.
557557
558558
Args:
559-
request (google.cloud.billing.budgets_v1.types.GetBudgetRequest):
559+
request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]):
560560
The request object. Request for GetBudget
561561
name (str):
562562
Required. Name of budget to get. Values are of the form
@@ -623,7 +623,7 @@ def get_budget(
623623

624624
def list_budgets(
625625
self,
626-
request: budget_service.ListBudgetsRequest = None,
626+
request: Union[budget_service.ListBudgetsRequest, dict] = None,
627627
*,
628628
parent: str = None,
629629
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -638,7 +638,7 @@ def list_budgets(
638638
Cloud Console.
639639
640640
Args:
641-
request (google.cloud.billing.budgets_v1.types.ListBudgetsRequest):
641+
request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]):
642642
The request object. Request for ListBudgets
643643
parent (str):
644644
Required. Name of billing account to list budgets under.
@@ -707,7 +707,7 @@ def list_budgets(
707707

708708
def delete_budget(
709709
self,
710-
request: budget_service.DeleteBudgetRequest = None,
710+
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
711711
*,
712712
name: str = None,
713713
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -718,7 +718,7 @@ def delete_budget(
718718
deleted.
719719
720720
Args:
721-
request (google.cloud.billing.budgets_v1.types.DeleteBudgetRequest):
721+
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
722722
The request object. Request for DeleteBudget
723723
name (str):
724724
Required. Name of the budget to delete. Values are of

google/cloud/billing/budgets_v1/services/budget_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(
122122
**scopes_kwargs, quota_project_id=quota_project_id
123123
)
124124

125-
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
# If the credentials are service account credentials, then always try to use self signed JWT.
126126
if (
127127
always_use_jwt_access
128128
and isinstance(credentials, service_account.Credentials)

google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def __init__(
8484
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8585
If provided, it overrides the ``host`` argument and tries to create
8686
a mutual TLS channel with client SSL credentials from
87-
``client_cert_source`` or applicatin default SSL credentials.
87+
``client_cert_source`` or application default SSL credentials.
8888
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8989
Deprecated. A callback to provide client SSL certificate bytes and
9090
private key bytes, both in PEM format. It is ignored if
9191
``api_mtls_endpoint`` is None.
9292
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
93-
for grpc channel. It is ignored if ``channel`` is provided.
93+
for the grpc channel. It is ignored if ``channel`` is provided.
9494
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9595
A callback to provide client certificate bytes and private key bytes,
96-
both in PEM format. It is used to configure mutual TLS channel. It is
96+
both in PEM format. It is used to configure a mutual TLS channel. It is
9797
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9898
quota_project_id (Optional[str]): An optional project to use for billing
9999
and quota.

google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ def __init__(
131131
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
132132
If provided, it overrides the ``host`` argument and tries to create
133133
a mutual TLS channel with client SSL credentials from
134-
``client_cert_source`` or applicatin default SSL credentials.
134+
``client_cert_source`` or application default SSL credentials.
135135
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
136136
Deprecated. A callback to provide client SSL certificate bytes and
137137
private key bytes, both in PEM format. It is ignored if
138138
``api_mtls_endpoint`` is None.
139139
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
140-
for grpc channel. It is ignored if ``channel`` is provided.
140+
for the grpc channel. It is ignored if ``channel`` is provided.
141141
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
142142
A callback to provide client certificate bytes and private key bytes,
143-
both in PEM format. It is used to configure mutual TLS channel. It is
143+
both in PEM format. It is used to configure a mutual TLS channel. It is
144144
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
145145
quota_project_id (Optional[str]): An optional project to use for billing
146146
and quota.

google/cloud/billing/budgets_v1beta1/services/budget_service/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

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

354354
def create_budget(
355355
self,
356-
request: budget_service.CreateBudgetRequest = None,
356+
request: Union[budget_service.CreateBudgetRequest, dict] = None,
357357
*,
358358
retry: retries.Retry = gapic_v1.method.DEFAULT,
359359
timeout: float = None,
@@ -365,7 +365,7 @@ def create_budget(
365365
number of budgets you can create.
366366
367367
Args:
368-
request (google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest):
368+
request (Union[google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest, dict]):
369369
The request object. Request for CreateBudget
370370
retry (google.api_core.retry.Retry): Designation of what errors, if any,
371371
should be retried.
@@ -412,7 +412,7 @@ def create_budget(
412412

413413
def update_budget(
414414
self,
415-
request: budget_service.UpdateBudgetRequest = None,
415+
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
416416
*,
417417
retry: retries.Retry = gapic_v1.method.DEFAULT,
418418
timeout: float = None,
@@ -425,7 +425,7 @@ def update_budget(
425425
changed by this method.
426426
427427
Args:
428-
request (google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest):
428+
request (Union[google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest, dict]):
429429
The request object. Request for UpdateBudget
430430
retry (google.api_core.retry.Retry): Designation of what errors, if any,
431431
should be retried.
@@ -474,7 +474,7 @@ def update_budget(
474474

475475
def get_budget(
476476
self,
477-
request: budget_service.GetBudgetRequest = None,
477+
request: Union[budget_service.GetBudgetRequest, dict] = None,
478478
*,
479479
retry: retries.Retry = gapic_v1.method.DEFAULT,
480480
timeout: float = None,
@@ -488,7 +488,7 @@ def get_budget(
488488
Cloud Console.
489489
490490
Args:
491-
request (google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest):
491+
request (Union[google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest, dict]):
492492
The request object. Request for GetBudget
493493
retry (google.api_core.retry.Retry): Designation of what errors, if any,
494494
should be retried.
@@ -535,7 +535,7 @@ def get_budget(
535535

536536
def list_budgets(
537537
self,
538-
request: budget_service.ListBudgetsRequest = None,
538+
request: Union[budget_service.ListBudgetsRequest, dict] = None,
539539
*,
540540
retry: retries.Retry = gapic_v1.method.DEFAULT,
541541
timeout: float = None,
@@ -549,7 +549,7 @@ def list_budgets(
549549
Cloud Console.
550550
551551
Args:
552-
request (google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest):
552+
request (Union[google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest, dict]):
553553
The request object. Request for ListBudgets
554554
retry (google.api_core.retry.Retry): Designation of what errors, if any,
555555
should be retried.
@@ -597,7 +597,7 @@ def list_budgets(
597597

598598
def delete_budget(
599599
self,
600-
request: budget_service.DeleteBudgetRequest = None,
600+
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
601601
*,
602602
retry: retries.Retry = gapic_v1.method.DEFAULT,
603603
timeout: float = None,
@@ -607,7 +607,7 @@ def delete_budget(
607607
deleted.
608608
609609
Args:
610-
request (google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest):
610+
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):
611611
The request object. Request for DeleteBudget
612612
retry (google.api_core.retry.Retry): Designation of what errors, if any,
613613
should be retried.

google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(
122122
**scopes_kwargs, quota_project_id=quota_project_id
123123
)
124124

125-
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
# If the credentials are service account credentials, then always try to use self signed JWT.
126126
if (
127127
always_use_jwt_access
128128
and isinstance(credentials, service_account.Credentials)

google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def __init__(
8484
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8585
If provided, it overrides the ``host`` argument and tries to create
8686
a mutual TLS channel with client SSL credentials from
87-
``client_cert_source`` or applicatin default SSL credentials.
87+
``client_cert_source`` or application default SSL credentials.
8888
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8989
Deprecated. A callback to provide client SSL certificate bytes and
9090
private key bytes, both in PEM format. It is ignored if
9191
``api_mtls_endpoint`` is None.
9292
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
93-
for grpc channel. It is ignored if ``channel`` is provided.
93+
for the grpc channel. It is ignored if ``channel`` is provided.
9494
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9595
A callback to provide client certificate bytes and private key bytes,
96-
both in PEM format. It is used to configure mutual TLS channel. It is
96+
both in PEM format. It is used to configure a mutual TLS channel. It is
9797
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9898
quota_project_id (Optional[str]): An optional project to use for billing
9999
and quota.

google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ def __init__(
131131
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
132132
If provided, it overrides the ``host`` argument and tries to create
133133
a mutual TLS channel with client SSL credentials from
134-
``client_cert_source`` or applicatin default SSL credentials.
134+
``client_cert_source`` or application default SSL credentials.
135135
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
136136
Deprecated. A callback to provide client SSL certificate bytes and
137137
private key bytes, both in PEM format. It is ignored if
138138
``api_mtls_endpoint`` is None.
139139
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
140-
for grpc channel. It is ignored if ``channel`` is provided.
140+
for the grpc channel. It is ignored if ``channel`` is provided.
141141
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
142142
A callback to provide client certificate bytes and private key bytes,
143-
both in PEM format. It is used to configure mutual TLS channel. It is
143+
both in PEM format. It is used to configure a mutual TLS channel. It is
144144
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
145145
quota_project_id (Optional[str]): An optional project to use for billing
146146
and quota.

scripts/fixup_budgets_v1_keywords.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def partition(
3939
class budgetsCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_budget': ('parent', 'budget', ),
43-
'delete_budget': ('name', ),
44-
'get_budget': ('name', ),
45-
'list_budgets': ('parent', 'page_size', 'page_token', ),
46-
'update_budget': ('budget', 'update_mask', ),
42+
'create_budget': ('parent', 'budget', ),
43+
'delete_budget': ('name', ),
44+
'get_budget': ('name', ),
45+
'list_budgets': ('parent', 'page_size', 'page_token', ),
46+
'update_budget': ('budget', 'update_mask', ),
4747
}
4848

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

6464
kwargs, ctrl_kwargs = partition(
65-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
65+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6666
kwargs
6767
)
6868

scripts/fixup_budgets_v1beta1_keywords.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def partition(
3939
class budgetsCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_budget': ('parent', 'budget', ),
43-
'delete_budget': ('name', ),
44-
'get_budget': ('name', ),
45-
'list_budgets': ('parent', 'page_size', 'page_token', ),
46-
'update_budget': ('budget', 'update_mask', ),
42+
'create_budget': ('parent', 'budget', ),
43+
'delete_budget': ('name', ),
44+
'get_budget': ('name', ),
45+
'list_budgets': ('parent', 'page_size', 'page_token', ),
46+
'update_budget': ('budget', 'update_mask', ),
4747
}
4848

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

6464
kwargs, ctrl_kwargs = partition(
65-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
65+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6666
kwargs
6767
)
6868

0 commit comments

Comments
 (0)