Class BudgetAmount.Builder

  • All Implemented Interfaces:
    BudgetAmountOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    BudgetAmount

    public static final class BudgetAmount.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
    implements BudgetAmountOrBuilder
     The budgeted amount for each usage period.
     
    Protobuf type google.cloud.billing.budgets.v1.BudgetAmount
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • clear

        public BudgetAmount.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • getDefaultInstanceForType

        public BudgetAmount getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public BudgetAmount build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public BudgetAmount buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public BudgetAmount.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • setField

        public BudgetAmount.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • clearField

        public BudgetAmount.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • clearOneof

        public BudgetAmount.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • setRepeatedField

        public BudgetAmount.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • addRepeatedField

        public BudgetAmount.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • mergeFrom

        public BudgetAmount.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BudgetAmount.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • mergeFrom

        public BudgetAmount.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BudgetAmount.Builder>
        Throws:
        IOException
      • hasSpecifiedAmount

        public boolean hasSpecifiedAmount()
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
        Specified by:
        hasSpecifiedAmount in interface BudgetAmountOrBuilder
        Returns:
        Whether the specifiedAmount field is set.
      • getSpecifiedAmount

        public com.google.type.Money getSpecifiedAmount()
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
        Specified by:
        getSpecifiedAmount in interface BudgetAmountOrBuilder
        Returns:
        The specifiedAmount.
      • setSpecifiedAmount

        public BudgetAmount.Builder setSpecifiedAmount​(com.google.type.Money value)
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
      • setSpecifiedAmount

        public BudgetAmount.Builder setSpecifiedAmount​(com.google.type.Money.Builder builderForValue)
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
      • mergeSpecifiedAmount

        public BudgetAmount.Builder mergeSpecifiedAmount​(com.google.type.Money value)
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
      • clearSpecifiedAmount

        public BudgetAmount.Builder clearSpecifiedAmount()
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
      • getSpecifiedAmountBuilder

        public com.google.type.Money.Builder getSpecifiedAmountBuilder()
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
      • getSpecifiedAmountOrBuilder

        public com.google.type.MoneyOrBuilder getSpecifiedAmountOrBuilder()
         A specified amount to use as the budget.
         `currency_code` is optional. If specified when creating a budget, it must
         match the currency of the billing account. If specified when updating a
         budget, it must match the currency_code of the existing budget.
         The `currency_code` is provided on output.
         
        .google.type.Money specified_amount = 1;
        Specified by:
        getSpecifiedAmountOrBuilder in interface BudgetAmountOrBuilder
      • hasLastPeriodAmount

        public boolean hasLastPeriodAmount()
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
        Specified by:
        hasLastPeriodAmount in interface BudgetAmountOrBuilder
        Returns:
        Whether the lastPeriodAmount field is set.
      • getLastPeriodAmount

        public LastPeriodAmount getLastPeriodAmount()
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
        Specified by:
        getLastPeriodAmount in interface BudgetAmountOrBuilder
        Returns:
        The lastPeriodAmount.
      • setLastPeriodAmount

        public BudgetAmount.Builder setLastPeriodAmount​(LastPeriodAmount value)
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
      • setLastPeriodAmount

        public BudgetAmount.Builder setLastPeriodAmount​(LastPeriodAmount.Builder builderForValue)
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
      • mergeLastPeriodAmount

        public BudgetAmount.Builder mergeLastPeriodAmount​(LastPeriodAmount value)
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
      • clearLastPeriodAmount

        public BudgetAmount.Builder clearLastPeriodAmount()
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
      • getLastPeriodAmountBuilder

        public LastPeriodAmount.Builder getLastPeriodAmountBuilder()
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
      • getLastPeriodAmountOrBuilder

        public LastPeriodAmountOrBuilder getLastPeriodAmountOrBuilder()
         Use the last period's actual spend as the budget for the present period.
         LastPeriodAmount 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].
         
        .google.cloud.billing.budgets.v1.LastPeriodAmount last_period_amount = 2;
        Specified by:
        getLastPeriodAmountOrBuilder in interface BudgetAmountOrBuilder
      • setUnknownFields

        public final BudgetAmount.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>
      • mergeUnknownFields

        public final BudgetAmount.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BudgetAmount.Builder>