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

Commit 5e02634

Browse files
chore: use gapic-generator-python 0.63.1 (#173)
- [x] Regenerate this pull request now. docs: add autogenerated code snippets PiperOrigin-RevId: 426256923 Source-Link: googleapis/googleapis@9ebabfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/a88175263e60a1d45d3a447848652b0f670b2cb8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9
1 parent be9f15e commit 5e02634

26 files changed

Lines changed: 2156 additions & 0 deletions

File tree

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,26 @@ async def create_budget(
222222
information on the limits of the number of budgets you can
223223
create.
224224
225+
226+
.. code-block::
227+
228+
from google.cloud.billing import budgets_v1
229+
230+
def sample_create_budget():
231+
# Create a client
232+
client = budgets_v1.BudgetServiceClient()
233+
234+
# Initialize request argument(s)
235+
request = budgets_v1.CreateBudgetRequest(
236+
parent="parent_value",
237+
)
238+
239+
# Make the request
240+
response = client.create_budget(request=request)
241+
242+
# Handle response
243+
print(response)
244+
225245
Args:
226246
request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]):
227247
The request object. Request for CreateBudget
@@ -312,6 +332,25 @@ async def update_budget(
312332
fields that are not exposed in this API will not be
313333
changed by this method.
314334
335+
336+
.. code-block::
337+
338+
from google.cloud.billing import budgets_v1
339+
340+
def sample_update_budget():
341+
# Create a client
342+
client = budgets_v1.BudgetServiceClient()
343+
344+
# Initialize request argument(s)
345+
request = budgets_v1.UpdateBudgetRequest(
346+
)
347+
348+
# Make the request
349+
response = client.update_budget(request=request)
350+
351+
# Handle response
352+
print(response)
353+
315354
Args:
316355
request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]):
317356
The request object. Request for UpdateBudget
@@ -420,6 +459,26 @@ async def get_budget(
420459
the return value, though they may have been set in the
421460
Cloud Console.
422461
462+
463+
.. code-block::
464+
465+
from google.cloud.billing import budgets_v1
466+
467+
def sample_get_budget():
468+
# Create a client
469+
client = budgets_v1.BudgetServiceClient()
470+
471+
# Initialize request argument(s)
472+
request = budgets_v1.GetBudgetRequest(
473+
name="name_value",
474+
)
475+
476+
# Make the request
477+
response = client.get_budget(request=request)
478+
479+
# Handle response
480+
print(response)
481+
423482
Args:
424483
request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]):
425484
The request object. Request for GetBudget
@@ -512,6 +571,25 @@ async def list_budgets(
512571
the return value, though they may have been set in the
513572
Cloud Console.
514573
574+
575+
.. code-block::
576+
577+
from google.cloud.billing import budgets_v1
578+
579+
def sample_list_budgets():
580+
# Create a client
581+
client = budgets_v1.BudgetServiceClient()
582+
583+
# Initialize request argument(s)
584+
request = budgets_v1.ListBudgetsRequest(
585+
parent="parent_value",
586+
)
587+
588+
# Make the request
589+
page_result = client.list_budgets(request=request)
590+
for response in page_result:
591+
print(response)
592+
515593
Args:
516594
request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]):
517595
The request object. Request for ListBudgets
@@ -602,6 +680,23 @@ async def delete_budget(
602680
r"""Deletes a budget. Returns successfully if already
603681
deleted.
604682
683+
684+
.. code-block::
685+
686+
from google.cloud.billing import budgets_v1
687+
688+
def sample_delete_budget():
689+
# Create a client
690+
client = budgets_v1.BudgetServiceClient()
691+
692+
# Initialize request argument(s)
693+
request = budgets_v1.DeleteBudgetRequest(
694+
name="name_value",
695+
)
696+
697+
# Make the request
698+
response = client.delete_budget(request=request)
699+
605700
Args:
606701
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
607702
The request object. Request for DeleteBudget

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

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,27 @@ def create_budget(
416416
information on the limits of the number of budgets you can
417417
create.
418418
419+
420+
421+
.. code-block::
422+
423+
from google.cloud.billing import budgets_v1
424+
425+
def sample_create_budget():
426+
# Create a client
427+
client = budgets_v1.BudgetServiceClient()
428+
429+
# Initialize request argument(s)
430+
request = budgets_v1.CreateBudgetRequest(
431+
parent="parent_value",
432+
)
433+
434+
# Make the request
435+
response = client.create_budget(request=request)
436+
437+
# Handle response
438+
print(response)
439+
419440
Args:
420441
request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]):
421442
The request object. Request for CreateBudget
@@ -506,6 +527,26 @@ def update_budget(
506527
fields that are not exposed in this API will not be
507528
changed by this method.
508529
530+
531+
532+
.. code-block::
533+
534+
from google.cloud.billing import budgets_v1
535+
536+
def sample_update_budget():
537+
# Create a client
538+
client = budgets_v1.BudgetServiceClient()
539+
540+
# Initialize request argument(s)
541+
request = budgets_v1.UpdateBudgetRequest(
542+
)
543+
544+
# Make the request
545+
response = client.update_budget(request=request)
546+
547+
# Handle response
548+
print(response)
549+
509550
Args:
510551
request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]):
511552
The request object. Request for UpdateBudget
@@ -604,6 +645,27 @@ def get_budget(
604645
the return value, though they may have been set in the
605646
Cloud Console.
606647
648+
649+
650+
.. code-block::
651+
652+
from google.cloud.billing import budgets_v1
653+
654+
def sample_get_budget():
655+
# Create a client
656+
client = budgets_v1.BudgetServiceClient()
657+
658+
# Initialize request argument(s)
659+
request = budgets_v1.GetBudgetRequest(
660+
name="name_value",
661+
)
662+
663+
# Make the request
664+
response = client.get_budget(request=request)
665+
666+
# Handle response
667+
print(response)
668+
607669
Args:
608670
request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]):
609671
The request object. Request for GetBudget
@@ -686,6 +748,26 @@ def list_budgets(
686748
the return value, though they may have been set in the
687749
Cloud Console.
688750
751+
752+
753+
.. code-block::
754+
755+
from google.cloud.billing import budgets_v1
756+
757+
def sample_list_budgets():
758+
# Create a client
759+
client = budgets_v1.BudgetServiceClient()
760+
761+
# Initialize request argument(s)
762+
request = budgets_v1.ListBudgetsRequest(
763+
parent="parent_value",
764+
)
765+
766+
# Make the request
767+
page_result = client.list_budgets(request=request)
768+
for response in page_result:
769+
print(response)
770+
689771
Args:
690772
request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]):
691773
The request object. Request for ListBudgets
@@ -766,6 +848,24 @@ def delete_budget(
766848
r"""Deletes a budget. Returns successfully if already
767849
deleted.
768850
851+
852+
853+
.. code-block::
854+
855+
from google.cloud.billing import budgets_v1
856+
857+
def sample_delete_budget():
858+
# Create a client
859+
client = budgets_v1.BudgetServiceClient()
860+
861+
# Initialize request argument(s)
862+
request = budgets_v1.DeleteBudgetRequest(
863+
name="name_value",
864+
)
865+
866+
# Make the request
867+
response = client.delete_budget(request=request)
868+
769869
Args:
770870
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
771871
The request object. Request for DeleteBudget

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,26 @@ async def create_budget(
219219
and limits</a> for more information on the limits of the
220220
number of budgets you can create.
221221
222+
223+
.. code-block::
224+
225+
from google.cloud.billing import budgets_v1beta1
226+
227+
def sample_create_budget():
228+
# Create a client
229+
client = budgets_v1beta1.BudgetServiceClient()
230+
231+
# Initialize request argument(s)
232+
request = budgets_v1beta1.CreateBudgetRequest(
233+
parent="parent_value",
234+
)
235+
236+
# Make the request
237+
response = client.create_budget(request=request)
238+
239+
# Handle response
240+
print(response)
241+
222242
Args:
223243
request (Union[google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest, dict]):
224244
The request object. Request for CreateBudget
@@ -278,6 +298,25 @@ async def update_budget(
278298
fields that are not exposed in this API will not be
279299
changed by this method.
280300
301+
302+
.. code-block::
303+
304+
from google.cloud.billing import budgets_v1beta1
305+
306+
def sample_update_budget():
307+
# Create a client
308+
client = budgets_v1beta1.BudgetServiceClient()
309+
310+
# Initialize request argument(s)
311+
request = budgets_v1beta1.UpdateBudgetRequest(
312+
)
313+
314+
# Make the request
315+
response = client.update_budget(request=request)
316+
317+
# Handle response
318+
print(response)
319+
281320
Args:
282321
request (Union[google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest, dict]):
283322
The request object. Request for UpdateBudget
@@ -350,6 +389,26 @@ async def get_budget(
350389
the return value, though they may have been set in the
351390
Cloud Console.
352391
392+
393+
.. code-block::
394+
395+
from google.cloud.billing import budgets_v1beta1
396+
397+
def sample_get_budget():
398+
# Create a client
399+
client = budgets_v1beta1.BudgetServiceClient()
400+
401+
# Initialize request argument(s)
402+
request = budgets_v1beta1.GetBudgetRequest(
403+
name="name_value",
404+
)
405+
406+
# Make the request
407+
response = client.get_budget(request=request)
408+
409+
# Handle response
410+
print(response)
411+
353412
Args:
354413
request (Union[google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest, dict]):
355414
The request object. Request for GetBudget
@@ -420,6 +479,25 @@ async def list_budgets(
420479
the return value, though they may have been set in the
421480
Cloud Console.
422481
482+
483+
.. code-block::
484+
485+
from google.cloud.billing import budgets_v1beta1
486+
487+
def sample_list_budgets():
488+
# Create a client
489+
client = budgets_v1beta1.BudgetServiceClient()
490+
491+
# Initialize request argument(s)
492+
request = budgets_v1beta1.ListBudgetsRequest(
493+
parent="parent_value",
494+
)
495+
496+
# Make the request
497+
page_result = client.list_budgets(request=request)
498+
for response in page_result:
499+
print(response)
500+
423501
Args:
424502
request (Union[google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest, dict]):
425503
The request object. Request for ListBudgets
@@ -487,6 +565,23 @@ async def delete_budget(
487565
r"""Deletes a budget. Returns successfully if already
488566
deleted.
489567
568+
569+
.. code-block::
570+
571+
from google.cloud.billing import budgets_v1beta1
572+
573+
def sample_delete_budget():
574+
# Create a client
575+
client = budgets_v1beta1.BudgetServiceClient()
576+
577+
# Initialize request argument(s)
578+
request = budgets_v1beta1.DeleteBudgetRequest(
579+
name="name_value",
580+
)
581+
582+
# Make the request
583+
response = client.delete_budget(request=request)
584+
490585
Args:
491586
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):
492587
The request object. Request for DeleteBudget

0 commit comments

Comments
 (0)