Class Budget

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
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

@Generated public final class Budget extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • BUDGET_FILTER_FIELD_NUMBER

      public static final int BUDGET_FILTER_FIELD_NUMBER
      See Also:
    • AMOUNT_FIELD_NUMBER

      public static final int AMOUNT_FIELD_NUMBER
      See Also:
    • THRESHOLD_RULES_FIELD_NUMBER

      public static final int THRESHOLD_RULES_FIELD_NUMBER
      See Also:
    • NOTIFICATIONS_RULE_FIELD_NUMBER

      public static final int NOTIFICATIONS_RULE_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
    • hasAmount

      public boolean hasAmount()
       Required. Budgeted amount.
       
      .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasAmount in interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
    • 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 interface BudgetOrBuilder
      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 interface BudgetOrBuilder
      Returns:
      The bytes for etag.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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 interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.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 interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Budget.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • 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 interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Budget getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder