Skip to content

Commit ad08285

Browse files
chore: use gapic-generator-python 0.65.2 (#203)
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: googleapis/googleapis-gen@16eb360 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b5f077e commit ad08285

File tree

4 files changed

+72
-72
lines changed

4 files changed

+72
-72
lines changed

packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/async_client.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,17 @@ async def create_budget(
227227
228228
from google.cloud.billing import budgets_v1
229229
230-
def sample_create_budget():
230+
async def sample_create_budget():
231231
# Create a client
232-
client = budgets_v1.BudgetServiceClient()
232+
client = budgets_v1.BudgetServiceAsyncClient()
233233
234234
# Initialize request argument(s)
235235
request = budgets_v1.CreateBudgetRequest(
236236
parent="parent_value",
237237
)
238238
239239
# Make the request
240-
response = client.create_budget(request=request)
240+
response = await client.create_budget(request=request)
241241
242242
# Handle the response
243243
print(response)
@@ -341,16 +341,16 @@ async def update_budget(
341341
342342
from google.cloud.billing import budgets_v1
343343
344-
def sample_update_budget():
344+
async def sample_update_budget():
345345
# Create a client
346-
client = budgets_v1.BudgetServiceClient()
346+
client = budgets_v1.BudgetServiceAsyncClient()
347347
348348
# Initialize request argument(s)
349349
request = budgets_v1.UpdateBudgetRequest(
350350
)
351351
352352
# Make the request
353-
response = client.update_budget(request=request)
353+
response = await client.update_budget(request=request)
354354
355355
# Handle the response
356356
print(response)
@@ -472,17 +472,17 @@ async def get_budget(
472472
473473
from google.cloud.billing import budgets_v1
474474
475-
def sample_get_budget():
475+
async def sample_get_budget():
476476
# Create a client
477-
client = budgets_v1.BudgetServiceClient()
477+
client = budgets_v1.BudgetServiceAsyncClient()
478478
479479
# Initialize request argument(s)
480480
request = budgets_v1.GetBudgetRequest(
481481
name="name_value",
482482
)
483483
484484
# Make the request
485-
response = client.get_budget(request=request)
485+
response = await client.get_budget(request=request)
486486
487487
# Handle the response
488488
print(response)
@@ -588,9 +588,9 @@ async def list_budgets(
588588
589589
from google.cloud.billing import budgets_v1
590590
591-
def sample_list_budgets():
591+
async def sample_list_budgets():
592592
# Create a client
593-
client = budgets_v1.BudgetServiceClient()
593+
client = budgets_v1.BudgetServiceAsyncClient()
594594
595595
# Initialize request argument(s)
596596
request = budgets_v1.ListBudgetsRequest(
@@ -601,7 +601,7 @@ def sample_list_budgets():
601601
page_result = client.list_budgets(request=request)
602602
603603
# Handle the response
604-
for response in page_result:
604+
async for response in page_result:
605605
print(response)
606606
607607
Args:
@@ -706,17 +706,17 @@ async def delete_budget(
706706
707707
from google.cloud.billing import budgets_v1
708708
709-
def sample_delete_budget():
709+
async def sample_delete_budget():
710710
# Create a client
711-
client = budgets_v1.BudgetServiceClient()
711+
client = budgets_v1.BudgetServiceAsyncClient()
712712
713713
# Initialize request argument(s)
714714
request = budgets_v1.DeleteBudgetRequest(
715715
name="name_value",
716716
)
717717
718718
# Make the request
719-
client.delete_budget(request=request)
719+
await client.delete_budget(request=request)
720720
721721
Args:
722722
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):

packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/async_client.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,17 @@ async def create_budget(
223223
224224
from google.cloud.billing import budgets_v1beta1
225225
226-
def sample_create_budget():
226+
async def sample_create_budget():
227227
# Create a client
228-
client = budgets_v1beta1.BudgetServiceClient()
228+
client = budgets_v1beta1.BudgetServiceAsyncClient()
229229
230230
# Initialize request argument(s)
231231
request = budgets_v1beta1.CreateBudgetRequest(
232232
parent="parent_value",
233233
)
234234
235235
# Make the request
236-
response = client.create_budget(request=request)
236+
response = await client.create_budget(request=request)
237237
238238
# Handle the response
239239
print(response)
@@ -306,16 +306,16 @@ async def update_budget(
306306
307307
from google.cloud.billing import budgets_v1beta1
308308
309-
def sample_update_budget():
309+
async def sample_update_budget():
310310
# Create a client
311-
client = budgets_v1beta1.BudgetServiceClient()
311+
client = budgets_v1beta1.BudgetServiceAsyncClient()
312312
313313
# Initialize request argument(s)
314314
request = budgets_v1beta1.UpdateBudgetRequest(
315315
)
316316
317317
# Make the request
318-
response = client.update_budget(request=request)
318+
response = await client.update_budget(request=request)
319319
320320
# Handle the response
321321
print(response)
@@ -401,17 +401,17 @@ async def get_budget(
401401
402402
from google.cloud.billing import budgets_v1beta1
403403
404-
def sample_get_budget():
404+
async def sample_get_budget():
405405
# Create a client
406-
client = budgets_v1beta1.BudgetServiceClient()
406+
client = budgets_v1beta1.BudgetServiceAsyncClient()
407407
408408
# Initialize request argument(s)
409409
request = budgets_v1beta1.GetBudgetRequest(
410410
name="name_value",
411411
)
412412
413413
# Make the request
414-
response = client.get_budget(request=request)
414+
response = await client.get_budget(request=request)
415415
416416
# Handle the response
417417
print(response)
@@ -495,9 +495,9 @@ async def list_budgets(
495495
496496
from google.cloud.billing import budgets_v1beta1
497497
498-
def sample_list_budgets():
498+
async def sample_list_budgets():
499499
# Create a client
500-
client = budgets_v1beta1.BudgetServiceClient()
500+
client = budgets_v1beta1.BudgetServiceAsyncClient()
501501
502502
# Initialize request argument(s)
503503
request = budgets_v1beta1.ListBudgetsRequest(
@@ -508,7 +508,7 @@ def sample_list_budgets():
508508
page_result = client.list_budgets(request=request)
509509
510510
# Handle the response
511-
for response in page_result:
511+
async for response in page_result:
512512
print(response)
513513
514514
Args:
@@ -590,17 +590,17 @@ async def delete_budget(
590590
591591
from google.cloud.billing import budgets_v1beta1
592592
593-
def sample_delete_budget():
593+
async def sample_delete_budget():
594594
# Create a client
595-
client = budgets_v1beta1.BudgetServiceClient()
595+
client = budgets_v1beta1.BudgetServiceAsyncClient()
596596
597597
# Initialize request argument(s)
598598
request = budgets_v1beta1.DeleteBudgetRequest(
599599
name="name_value",
600600
)
601601
602602
# Make the request
603-
client.delete_budget(request=request)
603+
await client.delete_budget(request=request)
604604
605605
Args:
606606
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):

packages/google-cloud-billing-budgets/tests/unit/gapic/budgets_v1/test_budget_service.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ def test_create_budget_field_headers():
756756
# a field header. Set these to a non-empty value.
757757
request = budget_service.CreateBudgetRequest()
758758

759-
request.parent = "parent/value"
759+
request.parent = "parent_value"
760760

761761
# Mock the actual call within the gRPC stub, and fake the request.
762762
with mock.patch.object(type(client.transport.create_budget), "__call__") as call:
@@ -772,7 +772,7 @@ def test_create_budget_field_headers():
772772
_, _, kw = call.mock_calls[0]
773773
assert (
774774
"x-goog-request-params",
775-
"parent=parent/value",
775+
"parent=parent_value",
776776
) in kw["metadata"]
777777

778778

@@ -786,7 +786,7 @@ async def test_create_budget_field_headers_async():
786786
# a field header. Set these to a non-empty value.
787787
request = budget_service.CreateBudgetRequest()
788788

789-
request.parent = "parent/value"
789+
request.parent = "parent_value"
790790

791791
# Mock the actual call within the gRPC stub, and fake the request.
792792
with mock.patch.object(type(client.transport.create_budget), "__call__") as call:
@@ -802,7 +802,7 @@ async def test_create_budget_field_headers_async():
802802
_, _, kw = call.mock_calls[0]
803803
assert (
804804
"x-goog-request-params",
805-
"parent=parent/value",
805+
"parent=parent_value",
806806
) in kw["metadata"]
807807

808808

@@ -1002,7 +1002,7 @@ def test_update_budget_field_headers():
10021002
# a field header. Set these to a non-empty value.
10031003
request = budget_service.UpdateBudgetRequest()
10041004

1005-
request.budget.name = "budget.name/value"
1005+
request.budget.name = "name_value"
10061006

10071007
# Mock the actual call within the gRPC stub, and fake the request.
10081008
with mock.patch.object(type(client.transport.update_budget), "__call__") as call:
@@ -1018,7 +1018,7 @@ def test_update_budget_field_headers():
10181018
_, _, kw = call.mock_calls[0]
10191019
assert (
10201020
"x-goog-request-params",
1021-
"budget.name=budget.name/value",
1021+
"budget.name=name_value",
10221022
) in kw["metadata"]
10231023

10241024

@@ -1032,7 +1032,7 @@ async def test_update_budget_field_headers_async():
10321032
# a field header. Set these to a non-empty value.
10331033
request = budget_service.UpdateBudgetRequest()
10341034

1035-
request.budget.name = "budget.name/value"
1035+
request.budget.name = "name_value"
10361036

10371037
# Mock the actual call within the gRPC stub, and fake the request.
10381038
with mock.patch.object(type(client.transport.update_budget), "__call__") as call:
@@ -1048,7 +1048,7 @@ async def test_update_budget_field_headers_async():
10481048
_, _, kw = call.mock_calls[0]
10491049
assert (
10501050
"x-goog-request-params",
1051-
"budget.name=budget.name/value",
1051+
"budget.name=name_value",
10521052
) in kw["metadata"]
10531053

10541054

@@ -1248,7 +1248,7 @@ def test_get_budget_field_headers():
12481248
# a field header. Set these to a non-empty value.
12491249
request = budget_service.GetBudgetRequest()
12501250

1251-
request.name = "name/value"
1251+
request.name = "name_value"
12521252

12531253
# Mock the actual call within the gRPC stub, and fake the request.
12541254
with mock.patch.object(type(client.transport.get_budget), "__call__") as call:
@@ -1264,7 +1264,7 @@ def test_get_budget_field_headers():
12641264
_, _, kw = call.mock_calls[0]
12651265
assert (
12661266
"x-goog-request-params",
1267-
"name=name/value",
1267+
"name=name_value",
12681268
) in kw["metadata"]
12691269

12701270

@@ -1278,7 +1278,7 @@ async def test_get_budget_field_headers_async():
12781278
# a field header. Set these to a non-empty value.
12791279
request = budget_service.GetBudgetRequest()
12801280

1281-
request.name = "name/value"
1281+
request.name = "name_value"
12821282

12831283
# Mock the actual call within the gRPC stub, and fake the request.
12841284
with mock.patch.object(type(client.transport.get_budget), "__call__") as call:
@@ -1294,7 +1294,7 @@ async def test_get_budget_field_headers_async():
12941294
_, _, kw = call.mock_calls[0]
12951295
assert (
12961296
"x-goog-request-params",
1297-
"name=name/value",
1297+
"name=name_value",
12981298
) in kw["metadata"]
12991299

13001300

@@ -1476,7 +1476,7 @@ def test_list_budgets_field_headers():
14761476
# a field header. Set these to a non-empty value.
14771477
request = budget_service.ListBudgetsRequest()
14781478

1479-
request.parent = "parent/value"
1479+
request.parent = "parent_value"
14801480

14811481
# Mock the actual call within the gRPC stub, and fake the request.
14821482
with mock.patch.object(type(client.transport.list_budgets), "__call__") as call:
@@ -1492,7 +1492,7 @@ def test_list_budgets_field_headers():
14921492
_, _, kw = call.mock_calls[0]
14931493
assert (
14941494
"x-goog-request-params",
1495-
"parent=parent/value",
1495+
"parent=parent_value",
14961496
) in kw["metadata"]
14971497

14981498

@@ -1506,7 +1506,7 @@ async def test_list_budgets_field_headers_async():
15061506
# a field header. Set these to a non-empty value.
15071507
request = budget_service.ListBudgetsRequest()
15081508

1509-
request.parent = "parent/value"
1509+
request.parent = "parent_value"
15101510

15111511
# Mock the actual call within the gRPC stub, and fake the request.
15121512
with mock.patch.object(type(client.transport.list_budgets), "__call__") as call:
@@ -1524,7 +1524,7 @@ async def test_list_budgets_field_headers_async():
15241524
_, _, kw = call.mock_calls[0]
15251525
assert (
15261526
"x-goog-request-params",
1527-
"parent=parent/value",
1527+
"parent=parent_value",
15281528
) in kw["metadata"]
15291529

15301530

@@ -1655,7 +1655,7 @@ def test_list_budgets_pager(transport_name: str = "grpc"):
16551655

16561656
assert pager._metadata == metadata
16571657

1658-
results = [i for i in pager]
1658+
results = list(pager)
16591659
assert len(results) == 6
16601660
assert all(isinstance(i, budget_model.Budget) for i in results)
16611661

@@ -1888,7 +1888,7 @@ def test_delete_budget_field_headers():
18881888
# a field header. Set these to a non-empty value.
18891889
request = budget_service.DeleteBudgetRequest()
18901890

1891-
request.name = "name/value"
1891+
request.name = "name_value"
18921892

18931893
# Mock the actual call within the gRPC stub, and fake the request.
18941894
with mock.patch.object(type(client.transport.delete_budget), "__call__") as call:
@@ -1904,7 +1904,7 @@ def test_delete_budget_field_headers():
19041904
_, _, kw = call.mock_calls[0]
19051905
assert (
19061906
"x-goog-request-params",
1907-
"name=name/value",
1907+
"name=name_value",
19081908
) in kw["metadata"]
19091909

19101910

@@ -1918,7 +1918,7 @@ async def test_delete_budget_field_headers_async():
19181918
# a field header. Set these to a non-empty value.
19191919
request = budget_service.DeleteBudgetRequest()
19201920

1921-
request.name = "name/value"
1921+
request.name = "name_value"
19221922

19231923
# Mock the actual call within the gRPC stub, and fake the request.
19241924
with mock.patch.object(type(client.transport.delete_budget), "__call__") as call:
@@ -1934,7 +1934,7 @@ async def test_delete_budget_field_headers_async():
19341934
_, _, kw = call.mock_calls[0]
19351935
assert (
19361936
"x-goog-request-params",
1937-
"name=name/value",
1937+
"name=name_value",
19381938
) in kw["metadata"]
19391939

19401940

0 commit comments

Comments
 (0)