diff --git a/google/cloud/billing/budgets_v1/services/budget_service/client.py b/google/cloud/billing/budgets_v1/services/budget_service/client.py index d1c3c00..685d25e 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/client.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/client.py @@ -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): diff --git a/google/cloud/billing/budgets_v1/types/budget_model.py b/google/cloud/billing/budgets_v1/types/budget_model.py index 99593b9..d509a88 100644 --- a/google/cloud/billing/budgets_v1/types/budget_model.py +++ b/google/cloud/billing/budgets_v1/types/budget_model.py @@ -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 @@ -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 @@ -363,6 +390,24 @@ class CreditTypesTreatment(proto.Enum): applicable selected credits. `See the documentation for a list of credit types `__. + + 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 `__ + 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 diff --git a/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py index a54fd7d..b1473fe 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py @@ -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): diff --git a/google/cloud/billing/budgets_v1beta1/types/budget_model.py b/google/cloud/billing/budgets_v1beta1/types/budget_model.py index 695a5c7..4ed4362 100644 --- a/google/cloud/billing/budgets_v1beta1/types/budget_model.py +++ b/google/cloud/billing/budgets_v1beta1/types/budget_model.py @@ -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 @@ -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 @@ -381,6 +410,24 @@ class CreditTypesTreatment(proto.Enum): applicable selected credits. `See the documentation for a list of credit types `__. + + 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 `__ + 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 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json index 9e8bd99..9f6a8ee 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-billing-budgets", - "version": "1.9.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json index b1e7f94..33b9f5b 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-billing-budgets", - "version": "1.9.0" + "version": "0.1.0" }, "snippets": [ {