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

Commit eaa109d

Browse files
docs: Formatting change from HTML to markdown; Additional clarifications (#174)
* 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md docs: Formatting change from HTML to markdown; Additional clarifications PiperOrigin-RevId: 427761663 Source-Link: googleapis/googleapis@46c5d65 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f86bdde29db53037289ac2daa2047779d891d34e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjg2YmRkZTI5ZGI1MzAzNzI4OWFjMmRhYTIwNDc3NzlkODkxZDM0ZSJ9 * 🦉 Updates from OwlBot 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 5e02634 commit eaa109d

File tree

29 files changed

+120
-78
lines changed

29 files changed

+120
-78
lines changed

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def sample_create_budget():
239239
# Make the request
240240
response = client.create_budget(request=request)
241241
242-
# Handle response
242+
# Handle the response
243243
print(response)
244244
245245
Args:
@@ -348,7 +348,7 @@ def sample_update_budget():
348348
# Make the request
349349
response = client.update_budget(request=request)
350350
351-
# Handle response
351+
# Handle the response
352352
print(response)
353353
354354
Args:
@@ -476,7 +476,7 @@ def sample_get_budget():
476476
# Make the request
477477
response = client.get_budget(request=request)
478478
479-
# Handle response
479+
# Handle the response
480480
print(response)
481481
482482
Args:
@@ -587,6 +587,8 @@ def sample_list_budgets():
587587
588588
# Make the request
589589
page_result = client.list_budgets(request=request)
590+
591+
# Handle the response
590592
for response in page_result:
591593
print(response)
592594
@@ -695,7 +697,7 @@ def sample_delete_budget():
695697
)
696698
697699
# Make the request
698-
response = client.delete_budget(request=request)
700+
client.delete_budget(request=request)
699701
700702
Args:
701703
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def sample_create_budget():
434434
# Make the request
435435
response = client.create_budget(request=request)
436436
437-
# Handle response
437+
# Handle the response
438438
print(response)
439439
440440
Args:
@@ -544,7 +544,7 @@ def sample_update_budget():
544544
# Make the request
545545
response = client.update_budget(request=request)
546546
547-
# Handle response
547+
# Handle the response
548548
print(response)
549549
550550
Args:
@@ -663,7 +663,7 @@ def sample_get_budget():
663663
# Make the request
664664
response = client.get_budget(request=request)
665665
666-
# Handle response
666+
# Handle the response
667667
print(response)
668668
669669
Args:
@@ -765,6 +765,8 @@ def sample_list_budgets():
765765
766766
# Make the request
767767
page_result = client.list_budgets(request=request)
768+
769+
# Handle the response
768770
for response in page_result:
769771
print(response)
770772
@@ -864,7 +866,7 @@ def sample_delete_budget():
864866
)
865867
866868
# Make the request
867-
response = client.delete_budget(request=request)
869+
client.delete_budget(request=request)
868870
869871
Args:
870872
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):

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

+10-8
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ async def create_budget(
214214
timeout: float = None,
215215
metadata: Sequence[Tuple[str, str]] = (),
216216
) -> budget_model.Budget:
217-
r"""Creates a new budget. See
218-
<a href="https://cloud.google.com/billing/quotas">Quotas
219-
and limits</a> for more information on the limits of the
220-
number of budgets you can create.
217+
r"""Creates a new budget. See `Quotas and
218+
limits <https://cloud.google.com/billing/quotas>`__ for more
219+
information on the limits of the number of budgets you can
220+
create.
221221
222222
223223
.. code-block::
@@ -236,7 +236,7 @@ def sample_create_budget():
236236
# Make the request
237237
response = client.create_budget(request=request)
238238
239-
# Handle response
239+
# Handle the response
240240
print(response)
241241
242242
Args:
@@ -314,7 +314,7 @@ def sample_update_budget():
314314
# Make the request
315315
response = client.update_budget(request=request)
316316
317-
# Handle response
317+
# Handle the response
318318
print(response)
319319
320320
Args:
@@ -406,7 +406,7 @@ def sample_get_budget():
406406
# Make the request
407407
response = client.get_budget(request=request)
408408
409-
# Handle response
409+
# Handle the response
410410
print(response)
411411
412412
Args:
@@ -495,6 +495,8 @@ def sample_list_budgets():
495495
496496
# Make the request
497497
page_result = client.list_budgets(request=request)
498+
499+
# Handle the response
498500
for response in page_result:
499501
print(response)
500502
@@ -580,7 +582,7 @@ def sample_delete_budget():
580582
)
581583
582584
# Make the request
583-
response = client.delete_budget(request=request)
585+
client.delete_budget(request=request)
584586
585587
Args:
586588
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):

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

+10-8
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,10 @@ def create_budget(
408408
timeout: float = None,
409409
metadata: Sequence[Tuple[str, str]] = (),
410410
) -> budget_model.Budget:
411-
r"""Creates a new budget. See
412-
<a href="https://cloud.google.com/billing/quotas">Quotas
413-
and limits</a> for more information on the limits of the
414-
number of budgets you can create.
411+
r"""Creates a new budget. See `Quotas and
412+
limits <https://cloud.google.com/billing/quotas>`__ for more
413+
information on the limits of the number of budgets you can
414+
create.
415415
416416
417417
@@ -431,7 +431,7 @@ def sample_create_budget():
431431
# Make the request
432432
response = client.create_budget(request=request)
433433
434-
# Handle response
434+
# Handle the response
435435
print(response)
436436
437437
Args:
@@ -511,7 +511,7 @@ def sample_update_budget():
511511
# Make the request
512512
response = client.update_budget(request=request)
513513
514-
# Handle response
514+
# Handle the response
515515
print(response)
516516
517517
Args:
@@ -595,7 +595,7 @@ def sample_get_budget():
595595
# Make the request
596596
response = client.get_budget(request=request)
597597
598-
# Handle response
598+
# Handle the response
599599
print(response)
600600
601601
Args:
@@ -676,6 +676,8 @@ def sample_list_budgets():
676676
677677
# Make the request
678678
page_result = client.list_budgets(request=request)
679+
680+
# Handle the response
679681
for response in page_result:
680682
print(response)
681683
@@ -753,7 +755,7 @@ def sample_delete_budget():
753755
)
754756
755757
# Make the request
756-
response = client.delete_budget(request=request)
758+
client.delete_budget(request=request)
757759
758760
Args:
759761
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ def create_budget(
238238
) -> Callable[[budget_service.CreateBudgetRequest], budget_model.Budget]:
239239
r"""Return a callable for the create budget method over gRPC.
240240
241-
Creates a new budget. See
242-
<a href="https://cloud.google.com/billing/quotas">Quotas
243-
and limits</a> for more information on the limits of the
244-
number of budgets you can create.
241+
Creates a new budget. See `Quotas and
242+
limits <https://cloud.google.com/billing/quotas>`__ for more
243+
information on the limits of the number of budgets you can
244+
create.
245245
246246
Returns:
247247
Callable[[~.CreateBudgetRequest],

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ def create_budget(
240240
) -> Callable[[budget_service.CreateBudgetRequest], Awaitable[budget_model.Budget]]:
241241
r"""Return a callable for the create budget method over gRPC.
242242
243-
Creates a new budget. See
244-
<a href="https://cloud.google.com/billing/quotas">Quotas
245-
and limits</a> for more information on the limits of the
246-
number of budgets you can create.
243+
Creates a new budget. See `Quotas and
244+
limits <https://cloud.google.com/billing/quotas>`__ for more
245+
information on the limits of the number of budgets you can
246+
create.
247247
248248
Returns:
249249
Callable[[~.CreateBudgetRequest],

google/cloud/billing/budgets_v1beta1/types/budget_model.py

+36-18
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ class Budget(proto.Message):
7272
amount (google.cloud.billing.budgets_v1beta1.types.BudgetAmount):
7373
Required. Budgeted amount.
7474
threshold_rules (Sequence[google.cloud.billing.budgets_v1beta1.types.ThresholdRule]):
75-
Optional. Rules that trigger alerts
76-
(notifications of thresholds being crossed) when
77-
spend exceeds the specified percentages of the
78-
budget.
75+
Optional. Rules that trigger alerts (notifications of
76+
thresholds being crossed) when spend exceeds the specified
77+
percentages of the budget.
78+
79+
Optional for ``pubsubTopic`` notifications.
80+
81+
Required if using email notifications.
7982
all_updates_rule (google.cloud.billing.budgets_v1beta1.types.AllUpdatesRule):
8083
Optional. Rules to apply to notifications
8184
sent based on budget spend and thresholds.
@@ -150,13 +153,25 @@ class LastPeriodAmount(proto.Message):
150153

151154

152155
class ThresholdRule(proto.Message):
153-
r"""ThresholdRule contains a definition of a threshold which triggers an
154-
alert (a notification of a threshold being crossed) to be sent when
155-
spend goes above the specified amount. Alerts are automatically
156-
e-mailed to users with the Billing Account Administrator role or the
157-
Billing Account User role. The thresholds here have no effect on
158-
notifications sent to anything configured under
159-
``Budget.all_updates_rule``.
156+
r"""ThresholdRule contains the definition of a threshold. Threshold
157+
rules define the triggering events used to generate a budget
158+
notification email. When a threshold is crossed (spend exceeds the
159+
specified percentages of the budget), budget alert emails are sent
160+
to the email recipients you specify in the
161+
`NotificationsRule <#notificationsrule>`__.
162+
163+
Threshold rules also affect the fields included in the `JSON data
164+
object <https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format>`__
165+
sent to a Pub/Sub topic.
166+
167+
Threshold rules are *required* if using email notifications.
168+
169+
Threshold rules are *optional* if only setting a ```pubsubTopic``
170+
NotificationsRule <#NotificationsRule>`__, unless you want your JSON
171+
data object to include data about the thresholds you set.
172+
173+
For more information, see `set budget threshold rules and
174+
actions <https://cloud.google.com/billing/docs/how-to/budgets#budget-actions>`__.
160175
161176
Attributes:
162177
threshold_percent (float):
@@ -282,13 +297,16 @@ class Filter(proto.Message):
282297
omitted, the report will include usage from the parent
283298
account and all subaccounts, if they exist.
284299
labels (Sequence[google.cloud.billing.budgets_v1beta1.types.Filter.LabelsEntry]):
285-
Optional. A single label and value pair
286-
specifying that usage from only this set of
287-
labeled resources should be included in the
288-
budget. Currently, multiple entries or multiple
289-
values per entry are not allowed. If omitted,
290-
the report will include all labeled and
291-
unlabeled usage.
300+
Optional. A single label and value pair specifying that
301+
usage from only this set of labeled resources should be
302+
included in the budget. If omitted, the report will include
303+
all labeled and unlabeled usage.
304+
305+
An object containing a single ``"key": value`` pair.
306+
Example: ``{ "name": "wrench" }``.
307+
308+
*Currently, multiple entries or multiple values per entry
309+
are not allowed.*
292310
calendar_period (google.cloud.billing.budgets_v1beta1.types.CalendarPeriod):
293311
Optional. Specifies to track usage for
294312
recurring calendar period. For example, assume

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_create_budget_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def sample_create_budget():
3939
# Make the request
4040
response = await client.create_budget(request=request)
4141

42-
# Handle response
42+
# Handle the response
4343
print(response)
4444

4545
# [END billingbudgets_generated_budgets_v1_BudgetService_CreateBudget_async]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_create_budget_sync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def sample_create_budget():
3939
# Make the request
4040
response = client.create_budget(request=request)
4141

42-
# Handle response
42+
# Handle the response
4343
print(response)
4444

4545
# [END billingbudgets_generated_budgets_v1_BudgetService_CreateBudget_sync]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_delete_budget_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def sample_delete_budget():
3737
)
3838

3939
# Make the request
40-
response = await client.delete_budget(request=request)
40+
await client.delete_budget(request=request)
4141

4242

4343
# [END billingbudgets_generated_budgets_v1_BudgetService_DeleteBudget_async]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_delete_budget_sync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def sample_delete_budget():
3737
)
3838

3939
# Make the request
40-
response = client.delete_budget(request=request)
40+
client.delete_budget(request=request)
4141

4242

4343
# [END billingbudgets_generated_budgets_v1_BudgetService_DeleteBudget_sync]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_get_budget_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def sample_get_budget():
3939
# Make the request
4040
response = await client.get_budget(request=request)
4141

42-
# Handle response
42+
# Handle the response
4343
print(response)
4444

4545
# [END billingbudgets_generated_budgets_v1_BudgetService_GetBudget_async]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_get_budget_sync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def sample_get_budget():
3939
# Make the request
4040
response = client.get_budget(request=request)
4141

42-
# Handle response
42+
# Handle the response
4343
print(response)
4444

4545
# [END billingbudgets_generated_budgets_v1_BudgetService_GetBudget_sync]

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_list_budgets_async.py

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ async def sample_list_budgets():
3838

3939
# Make the request
4040
page_result = client.list_budgets(request=request)
41+
42+
# Handle the response
4143
async for response in page_result:
4244
print(response)
4345

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_list_budgets_sync.py

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def sample_list_budgets():
3838

3939
# Make the request
4040
page_result = client.list_budgets(request=request)
41+
42+
# Handle the response
4143
for response in page_result:
4244
print(response)
4345

samples/generated_samples/billingbudgets_generated_budgets_v1_budget_service_update_budget_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def sample_update_budget():
3838
# Make the request
3939
response = await client.update_budget(request=request)
4040

41-
# Handle response
41+
# Handle the response
4242
print(response)
4343

4444
# [END billingbudgets_generated_budgets_v1_BudgetService_UpdateBudget_async]

0 commit comments

Comments
 (0)