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

Commit

Permalink
docs: Add documentation for enums (#257)
Browse files Browse the repository at this point in the history
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 20, 2023
1 parent a2f3fd3 commit d71d558
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ def sample_delete_budget():
metadata=metadata,
)

def __enter__(self):
def __enter__(self) -> "BudgetServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
45 changes: 45 additions & 0 deletions google/cloud/billing/budgets_v1/types/budget_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ class CalendarPeriod(proto.Enum):
period that has a canonical start. Grammatically, "the start of the
current ``CalendarPeriod``". All calendar times begin at 12 AM US
and Canadian Pacific Time (UTC-8).
Values:
CALENDAR_PERIOD_UNSPECIFIED (0):
MONTH (1):
A month. Month starts on the first day of
each month, such as January 1, February 1, March
1, and so on.
QUARTER (2):
A quarter. Quarters start on dates January 1,
April 1, July 1, and October 1 of each year.
YEAR (3):
A year. Year starts on January 1.
"""
CALENDAR_PERIOD_UNSPECIFIED = 0
MONTH = 1
Expand Down Expand Up @@ -201,6 +214,20 @@ class ThresholdRule(proto.Message):
class Basis(proto.Enum):
r"""The type of basis used to determine if spend has passed the
threshold.
Values:
BASIS_UNSPECIFIED (0):
Unspecified threshold basis.
CURRENT_SPEND (1):
Use current spend as the basis for comparison
against the threshold.
FORECASTED_SPEND (2):
Use forecasted spend for the period as the basis for
comparison against the threshold. FORECASTED_SPEND can only
be set when the budget's time period is a
[Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period].
It cannot be set in combination with
[Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period].
"""
BASIS_UNSPECIFIED = 0
CURRENT_SPEND = 1
Expand Down Expand Up @@ -363,6 +390,24 @@ class CreditTypesTreatment(proto.Enum):
applicable selected credits. `See the documentation for a list of
credit
types <https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type>`__.
Values:
CREDIT_TYPES_TREATMENT_UNSPECIFIED (0):
INCLUDE_ALL_CREDITS (1):
All types of credit are subtracted from the
gross cost to determine the spend for threshold
calculations.
EXCLUDE_ALL_CREDITS (2):
All types of credit are added to the net cost
to determine the spend for threshold
calculations.
INCLUDE_SPECIFIED_CREDITS (3):
`Credit
types <https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type>`__
specified in the credit_types field are subtracted from the
gross cost to determine the spend for threshold
calculations.
"""
CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0
INCLUDE_ALL_CREDITS = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ def sample_delete_budget():
metadata=metadata,
)

def __enter__(self):
def __enter__(self) -> "BudgetServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
47 changes: 47 additions & 0 deletions google/cloud/billing/budgets_v1beta1/types/budget_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ class CalendarPeriod(proto.Enum):
period that has a canonical start. Grammatically, "the start of the
current ``CalendarPeriod``". All calendar times begin at 12 AM US
and Canadian Pacific Time (UTC-8).
Values:
CALENDAR_PERIOD_UNSPECIFIED (0):
Calendar period is unset. This is the default
if the budget is for a custom time period
(CustomPeriod).
MONTH (1):
A month. Month starts on the first day of
each month, such as January 1, February 1, March
1, and so on.
QUARTER (2):
A quarter. Quarters start on dates January 1,
April 1, July 1, and October 1 of each year.
YEAR (3):
A year. Year starts on January 1.
"""
CALENDAR_PERIOD_UNSPECIFIED = 0
MONTH = 1
Expand Down Expand Up @@ -216,6 +231,20 @@ class ThresholdRule(proto.Message):
class Basis(proto.Enum):
r"""The type of basis used to determine if spend has passed the
threshold.
Values:
BASIS_UNSPECIFIED (0):
Unspecified threshold basis.
CURRENT_SPEND (1):
Use current spend as the basis for comparison
against the threshold.
FORECASTED_SPEND (2):
Use forecasted spend for the period as the basis for
comparison against the threshold. FORECASTED_SPEND can only
be set when the budget's time period is a
[Filter.calendar_period][google.cloud.billing.budgets.v1beta1.Filter.calendar_period].
It cannot be set in combination with
[Filter.custom_period][google.cloud.billing.budgets.v1beta1.Filter.custom_period].
"""
BASIS_UNSPECIFIED = 0
CURRENT_SPEND = 1
Expand Down Expand Up @@ -381,6 +410,24 @@ class CreditTypesTreatment(proto.Enum):
applicable selected credits. `See the documentation for a list of
credit
types <https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type>`__.
Values:
CREDIT_TYPES_TREATMENT_UNSPECIFIED (0):
INCLUDE_ALL_CREDITS (1):
All types of credit are subtracted from the
gross cost to determine the spend for threshold
calculations.
EXCLUDE_ALL_CREDITS (2):
All types of credit are added to the net cost
to determine the spend for threshold
calculations.
INCLUDE_SPECIFIED_CREDITS (3):
`Credit
types <https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type>`__
specified in the credit_types field are subtracted from the
gross cost to determine the spend for threshold
calculations.
"""
CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0
INCLUDE_ALL_CREDITS = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-billing-budgets",
"version": "1.9.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-billing-budgets",
"version": "1.9.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit d71d558

Please sign in to comment.