Class Budget.Builder (2.32.0)

public static final class Budget.Builder extends GeneratedMessageV3.Builder<Budget.Builder> 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.v1.Budget

Implements

BudgetOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllThresholdRules(Iterable<? extends ThresholdRule> values)

public Budget.Builder addAllThresholdRules(Iterable<? extends ThresholdRule> values)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.billing.budgets.v1.ThresholdRule>
Returns
TypeDescription
Budget.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Budget.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Budget.Builder
Overrides

addThresholdRules(ThresholdRule value)

public Budget.Builder addThresholdRules(ThresholdRule value)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueThresholdRule
Returns
TypeDescription
Budget.Builder

addThresholdRules(ThresholdRule.Builder builderForValue)

public Budget.Builder addThresholdRules(ThresholdRule.Builder builderForValue)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueThresholdRule.Builder
Returns
TypeDescription
Budget.Builder

addThresholdRules(int index, ThresholdRule value)

public Budget.Builder addThresholdRules(int index, ThresholdRule value)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueThresholdRule
Returns
TypeDescription
Budget.Builder

addThresholdRules(int index, ThresholdRule.Builder builderForValue)

public Budget.Builder addThresholdRules(int index, ThresholdRule.Builder builderForValue)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueThresholdRule.Builder
Returns
TypeDescription
Budget.Builder

addThresholdRulesBuilder()

public ThresholdRule.Builder addThresholdRulesBuilder()

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ThresholdRule.Builder

addThresholdRulesBuilder(int index)

public ThresholdRule.Builder addThresholdRulesBuilder(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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
ThresholdRule.Builder

build()

public Budget build()
Returns
TypeDescription
Budget

buildPartial()

public Budget buildPartial()
Returns
TypeDescription
Budget

clear()

public Budget.Builder clear()
Returns
TypeDescription
Budget.Builder
Overrides

clearAmount()

public Budget.Builder clearAmount()

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Budget.Builder

clearBudgetFilter()

public Budget.Builder clearBudgetFilter()

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Budget.Builder

clearDisplayName()

public Budget.Builder clearDisplayName()

User data for display name in UI. The name must be less than or equal to 60 characters.

string display_name = 2;

Returns
TypeDescription
Budget.Builder

This builder for chaining.

clearEtag()

public Budget.Builder clearEtag()

Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes.

string etag = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Budget.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Budget.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Budget.Builder
Overrides

clearName()

public Budget.Builder clearName()

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
TypeDescription
Budget.Builder

This builder for chaining.

clearNotificationsRule()

public Budget.Builder clearNotificationsRule()

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Budget.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Budget.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Budget.Builder
Overrides

clearThresholdRules()

public Budget.Builder clearThresholdRules()

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Budget.Builder

clone()

public Budget.Builder clone()
Returns
TypeDescription
Budget.Builder
Overrides

getAmount()

public BudgetAmount getAmount()

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BudgetAmount

The amount.

getAmountBuilder()

public BudgetAmount.Builder getAmountBuilder()

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BudgetAmount.Builder

getAmountOrBuilder()

public BudgetAmountOrBuilder getAmountOrBuilder()

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BudgetAmountOrBuilder

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Filter

The budgetFilter.

getBudgetFilterBuilder()

public Filter.Builder getBudgetFilterBuilder()

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Filter.Builder

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FilterOrBuilder

getDefaultInstanceForType()

public Budget getDefaultInstanceForType()
Returns
TypeDescription
Budget

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

User data for display name in UI. The name must be less than or equal to 60 characters.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

User data for display name in UI. The name must be less than or equal to 60 characters.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getEtag()

public String getEtag()

Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes.

string etag = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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 causes an update to overwrite other changes.

string etag = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for etag.

getName()

public String 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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getNotificationsRule()

public NotificationsRule getNotificationsRule()

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
NotificationsRule

The notificationsRule.

getNotificationsRuleBuilder()

public NotificationsRule.Builder getNotificationsRuleBuilder()

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
NotificationsRule.Builder

getNotificationsRuleOrBuilder()

public NotificationsRuleOrBuilder getNotificationsRuleOrBuilder()

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
NotificationsRuleOrBuilder

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
ThresholdRule

getThresholdRulesBuilder(int index)

public ThresholdRule.Builder getThresholdRulesBuilder(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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
ThresholdRule.Builder

getThresholdRulesBuilderList()

public List<ThresholdRule.Builder> getThresholdRulesBuilderList()

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Builder>

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<ThresholdRule>

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
ThresholdRuleOrBuilder

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder>

hasAmount()

public boolean hasAmount()

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the budgetFilter field is set.

hasNotificationsRule()

public boolean hasNotificationsRule()

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the notificationsRule field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAmount(BudgetAmount value)

public Budget.Builder mergeAmount(BudgetAmount value)

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueBudgetAmount
Returns
TypeDescription
Budget.Builder

mergeBudgetFilter(Filter value)

public Budget.Builder mergeBudgetFilter(Filter value)

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFilter
Returns
TypeDescription
Budget.Builder

mergeFrom(Budget other)

public Budget.Builder mergeFrom(Budget other)
Parameter
NameDescription
otherBudget
Returns
TypeDescription
Budget.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Budget.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Budget.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Budget.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Budget.Builder
Overrides

mergeNotificationsRule(NotificationsRule value)

public Budget.Builder mergeNotificationsRule(NotificationsRule value)

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueNotificationsRule
Returns
TypeDescription
Budget.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Budget.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Budget.Builder
Overrides

removeThresholdRules(int index)

public Budget.Builder removeThresholdRules(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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Budget.Builder

setAmount(BudgetAmount value)

public Budget.Builder setAmount(BudgetAmount value)

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueBudgetAmount
Returns
TypeDescription
Budget.Builder

setAmount(BudgetAmount.Builder builderForValue)

public Budget.Builder setAmount(BudgetAmount.Builder builderForValue)

Required. Budgeted amount.

.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueBudgetAmount.Builder
Returns
TypeDescription
Budget.Builder

setBudgetFilter(Filter value)

public Budget.Builder setBudgetFilter(Filter value)

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFilter
Returns
TypeDescription
Budget.Builder

setBudgetFilter(Filter.Builder builderForValue)

public Budget.Builder setBudgetFilter(Filter.Builder builderForValue)

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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueFilter.Builder
Returns
TypeDescription
Budget.Builder

setDisplayName(String value)

public Budget.Builder setDisplayName(String value)

User data for display name in UI. The name must be less than or equal to 60 characters.

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Budget.Builder setDisplayNameBytes(ByteString value)

User data for display name in UI. The name must be less than or equal to 60 characters.

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setEtag(String value)

public Budget.Builder setEtag(String value)

Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes.

string etag = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The etag to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Budget.Builder setEtagBytes(ByteString value)

Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag causes an update to overwrite other changes.

string etag = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Budget.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Budget.Builder
Overrides

setName(String value)

public Budget.Builder setName(String value)

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];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Budget.Builder setNameBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Budget.Builder

This builder for chaining.

setNotificationsRule(NotificationsRule value)

public Budget.Builder setNotificationsRule(NotificationsRule value)

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueNotificationsRule
Returns
TypeDescription
Budget.Builder

setNotificationsRule(NotificationsRule.Builder builderForValue)

public Budget.Builder setNotificationsRule(NotificationsRule.Builder builderForValue)

Optional. Rules to apply to notifications sent based on budget spend and thresholds.

.google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueNotificationsRule.Builder
Returns
TypeDescription
Budget.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Budget.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Budget.Builder
Overrides

setThresholdRules(int index, ThresholdRule value)

public Budget.Builder setThresholdRules(int index, ThresholdRule value)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueThresholdRule
Returns
TypeDescription
Budget.Builder

setThresholdRules(int index, ThresholdRule.Builder builderForValue)

public Budget.Builder setThresholdRules(int index, ThresholdRule.Builder builderForValue)

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.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueThresholdRule.Builder
Returns
TypeDescription
Budget.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Budget.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Budget.Builder
Overrides