diff --git a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/client.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/client.py index d1c3c0097fd0..685d25e50f1e 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/client.py +++ b/packages/google-cloud-billing-budgets/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/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/types/budget_model.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/types/budget_model.py index 99593b939b9d..d509a883df8e 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/types/budget_model.py +++ b/packages/google-cloud-billing-budgets/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/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py index a54fd7daf5d6..b1473fe6eae4 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py +++ b/packages/google-cloud-billing-budgets/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/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/types/budget_model.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/types/budget_model.py index 695a5c78b764..4ed436298d06 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/types/budget_model.py +++ b/packages/google-cloud-billing-budgets/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/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json index 9e8bd9967c19..9f6a8ee49f17 100644 --- a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/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/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json index b1e7f94ee1d6..33b9f5b1220a 100644 --- a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/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": [ {