Class Budget
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.billing.budgets.v1.Budget
-
- All Implemented Interfaces:
BudgetOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class Budget extends com.google.protobuf.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 typegoogle.cloud.billing.budgets.v1.Budget
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Budget.Builder
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).-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
AMOUNT_FIELD_NUMBER
static int
BUDGET_FILTER_FIELD_NUMBER
static int
DISPLAY_NAME_FIELD_NUMBER
static int
ETAG_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
NOTIFICATIONS_RULE_FIELD_NUMBER
static int
THRESHOLD_RULES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
BudgetAmount
getAmount()
Required.BudgetAmountOrBuilder
getAmountOrBuilder()
Required.Filter
getBudgetFilter()
Optional.FilterOrBuilder
getBudgetFilterOrBuilder()
Optional.static Budget
getDefaultInstance()
Budget
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getDisplayName()
User data for display name in UI.com.google.protobuf.ByteString
getDisplayNameBytes()
User data for display name in UI.String
getEtag()
Optional.com.google.protobuf.ByteString
getEtagBytes()
Optional.String
getName()
Output only.com.google.protobuf.ByteString
getNameBytes()
Output only.NotificationsRule
getNotificationsRule()
Optional.NotificationsRuleOrBuilder
getNotificationsRuleOrBuilder()
Optional.com.google.protobuf.Parser<Budget>
getParserForType()
int
getSerializedSize()
ThresholdRule
getThresholdRules(int index)
Optional.int
getThresholdRulesCount()
Optional.List<ThresholdRule>
getThresholdRulesList()
Optional.ThresholdRuleOrBuilder
getThresholdRulesOrBuilder(int index)
Optional.List<? extends ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList()
Optional.boolean
hasAmount()
Required.boolean
hasBudgetFilter()
Optional.int
hashCode()
boolean
hasNotificationsRule()
Optional.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Budget.Builder
newBuilder()
static Budget.Builder
newBuilder(Budget prototype)
Budget.Builder
newBuilderForType()
protected Budget.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Budget
parseDelimitedFrom(InputStream input)
static Budget
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Budget
parseFrom(byte[] data)
static Budget
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Budget
parseFrom(com.google.protobuf.ByteString data)
static Budget
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Budget
parseFrom(com.google.protobuf.CodedInputStream input)
static Budget
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Budget
parseFrom(InputStream input)
static Budget
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Budget
parseFrom(ByteBuffer data)
static Budget
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Budget>
parser()
Budget.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BUDGET_FILTER_FIELD_NUMBER
public static final int BUDGET_FILTER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
AMOUNT_FIELD_NUMBER
public static final int AMOUNT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
THRESHOLD_RULES_FIELD_NUMBER
public static final int THRESHOLD_RULES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NOTIFICATIONS_RULE_FIELD_NUMBER
public static final int NOTIFICATIONS_RULE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
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];
- Specified by:
getName
in interfaceBudgetOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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];
- Specified by:
getNameBytes
in interfaceBudgetOrBuilder
- Returns:
- The bytes for name.
-
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;
- Specified by:
getDisplayName
in interfaceBudgetOrBuilder
- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()
User data for display name in UI. The name must be less than or equal to 60 characters.
string display_name = 2;
- Specified by:
getDisplayNameBytes
in interfaceBudgetOrBuilder
- Returns:
- The bytes for displayName.
-
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];
- Specified by:
hasBudgetFilter
in interfaceBudgetOrBuilder
- Returns:
- Whether the budgetFilter field is set.
-
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];
- Specified by:
getBudgetFilter
in interfaceBudgetOrBuilder
- Returns:
- 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.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getBudgetFilterOrBuilder
in interfaceBudgetOrBuilder
-
hasAmount
public boolean hasAmount()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
hasAmount
in interfaceBudgetOrBuilder
- Returns:
- Whether the amount field is set.
-
getAmount
public BudgetAmount getAmount()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getAmount
in interfaceBudgetOrBuilder
- Returns:
- The amount.
-
getAmountOrBuilder
public BudgetAmountOrBuilder getAmountOrBuilder()
Required. Budgeted amount.
.google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getAmountOrBuilder
in interfaceBudgetOrBuilder
-
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];
- Specified by:
getThresholdRulesList
in interfaceBudgetOrBuilder
-
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];
- Specified by:
getThresholdRulesOrBuilderList
in interfaceBudgetOrBuilder
-
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];
- Specified by:
getThresholdRulesCount
in interfaceBudgetOrBuilder
-
getThresholdRules
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];
- Specified by:
getThresholdRules
in interfaceBudgetOrBuilder
-
getThresholdRulesOrBuilder
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];
- Specified by:
getThresholdRulesOrBuilder
in interfaceBudgetOrBuilder
-
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];
- Specified by:
hasNotificationsRule
in interfaceBudgetOrBuilder
- Returns:
- Whether the notificationsRule field is set.
-
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];
- Specified by:
getNotificationsRule
in interfaceBudgetOrBuilder
- Returns:
- The notificationsRule.
-
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];
- Specified by:
getNotificationsRuleOrBuilder
in interfaceBudgetOrBuilder
-
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];
- Specified by:
getEtag
in interfaceBudgetOrBuilder
- Returns:
- The etag.
-
getEtagBytes
public com.google.protobuf.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];
- Specified by:
getEtagBytes
in interfaceBudgetOrBuilder
- Returns:
- The bytes for etag.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Budget parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Budget parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Budget parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Budget parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Budget parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Budget parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Budget parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Budget.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Budget.Builder newBuilder()
-
newBuilder
public static Budget.Builder newBuilder(Budget prototype)
-
toBuilder
public Budget.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Budget.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Budget getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Budget> parser()
-
getParserForType
public com.google.protobuf.Parser<Budget> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Budget getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-