public final class Budget extends GeneratedMessageV3 implements BudgetOrBuilder
A budget is a plan that describes what you expect to spend on Cloud
projects, plus the rules to execute as spend is tracked against that plan,
(for example, send an alert when 90% of the target spend is met).
The budget time period is configurable, with options such as month (default),
quarter, year, or custom time period.
Protobuf type google.cloud.billing.budgets.v1beta1.Budget
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
ALL_UPDATES_RULE_FIELD_NUMBER
public static final int ALL_UPDATES_RULE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
AMOUNT_FIELD_NUMBER
public static final int AMOUNT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
BUDGET_FILTER_FIELD_NUMBER
public static final int BUDGET_FILTER_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
THRESHOLD_RULES_FIELD_NUMBER
public static final int THRESHOLD_RULES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static Budget getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Budget.Builder newBuilder()
newBuilder(Budget prototype)
public static Budget.Builder newBuilder(Budget prototype)
Parameter |
---|
Name | Description |
prototype | Budget
|
public static Budget parseDelimitedFrom(InputStream input)
public static Budget parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Budget parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Budget parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Budget parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Budget parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Budget parseFrom(CodedInputStream input)
public static Budget parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Budget parseFrom(InputStream input)
public static Budget parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Budget parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Budget parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Budget> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getAllUpdatesRule()
public AllUpdatesRule getAllUpdatesRule()
Optional. Rules to apply to notifications sent based on budget spend and
thresholds.
.google.cloud.billing.budgets.v1beta1.AllUpdatesRule all_updates_rule = 6 [(.google.api.field_behavior) = OPTIONAL];
getAllUpdatesRuleOrBuilder()
public AllUpdatesRuleOrBuilder getAllUpdatesRuleOrBuilder()
Optional. Rules to apply to notifications sent based on budget spend and
thresholds.
.google.cloud.billing.budgets.v1beta1.AllUpdatesRule all_updates_rule = 6 [(.google.api.field_behavior) = OPTIONAL];
getAmount()
public BudgetAmount getAmount()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1beta1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
getAmountOrBuilder()
public BudgetAmountOrBuilder getAmountOrBuilder()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1beta1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
getBudgetFilter()
public Filter getBudgetFilter()
Optional. Filters that define which resources are used to compute the
actual spend against the budget amount, such as projects, services, and the
budget's time period, as well as other filters.
.google.cloud.billing.budgets.v1beta1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
Filter | The budgetFilter.
|
getBudgetFilterOrBuilder()
public FilterOrBuilder getBudgetFilterOrBuilder()
Optional. Filters that define which resources are used to compute the
actual spend against the budget amount, such as projects, services, and the
budget's time period, as well as other filters.
.google.cloud.billing.budgets.v1beta1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];
getDefaultInstanceForType()
public Budget getDefaultInstanceForType()
getDisplayName()
public String getDisplayName()
User data for display name in UI.
Validation: <= 60 chars.
string display_name = 2;
Returns |
---|
Type | Description |
String | The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
User data for display name in UI.
Validation: <= 60 chars.
string display_name = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for displayName.
|
getEtag()
Optional. Etag to validate that the object is unchanged for a
read-modify-write operation.
An empty etag will cause an update to overwrite other changes.
string etag = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
String | The etag.
|
getEtagBytes()
public ByteString getEtagBytes()
Optional. Etag to validate that the object is unchanged for a
read-modify-write operation.
An empty etag will cause an update to overwrite other changes.
string etag = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
ByteString | The bytes for etag.
|
getName()
Output only. Resource name of the budget.
The resource name implies the scope of a budget. Values are of the form
billingAccounts/{billingAccountId}/budgets/{budgetId}
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Output only. Resource name of the budget.
The resource name implies the scope of a budget. Values are of the form
billingAccounts/{billingAccountId}/budgets/{budgetId}
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
ByteString | The bytes for name.
|
getParserForType()
public Parser<Budget> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getThresholdRules(int index)
public ThresholdRule getThresholdRules(int index)
Optional. Rules that trigger alerts (notifications of thresholds
being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
repeated .google.cloud.billing.budgets.v1beta1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
index | int
|
getThresholdRulesCount()
public int getThresholdRulesCount()
Optional. Rules that trigger alerts (notifications of thresholds
being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
repeated .google.cloud.billing.budgets.v1beta1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
int | |
getThresholdRulesList()
public List<ThresholdRule> getThresholdRulesList()
Optional. Rules that trigger alerts (notifications of thresholds
being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
repeated .google.cloud.billing.budgets.v1beta1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];
getThresholdRulesOrBuilder(int index)
public ThresholdRuleOrBuilder getThresholdRulesOrBuilder(int index)
Optional. Rules that trigger alerts (notifications of thresholds
being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
repeated .google.cloud.billing.budgets.v1beta1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
index | int
|
getThresholdRulesOrBuilderList()
public List<? extends ThresholdRuleOrBuilder> getThresholdRulesOrBuilderList()
Optional. Rules that trigger alerts (notifications of thresholds
being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
repeated .google.cloud.billing.budgets.v1beta1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
List<? extends com.google.cloud.billing.budgets.v1beta1.ThresholdRuleOrBuilder> | |
hasAllUpdatesRule()
public boolean hasAllUpdatesRule()
Optional. Rules to apply to notifications sent based on budget spend and
thresholds.
.google.cloud.billing.budgets.v1beta1.AllUpdatesRule all_updates_rule = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
boolean | Whether the allUpdatesRule field is set.
|
hasAmount()
public boolean hasAmount()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1beta1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
boolean | Whether the amount field is set.
|
hasBudgetFilter()
public boolean hasBudgetFilter()
Optional. Filters that define which resources are used to compute the
actual spend against the budget amount, such as projects, services, and the
budget's time period, as well as other filters.
.google.cloud.billing.budgets.v1beta1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
boolean | Whether the budgetFilter field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Budget.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Budget.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public Budget.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides