Class CostProjection.Builder

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

    public static final class CostProjection.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CostProjection.Builder>
    implements CostProjectionOrBuilder
     Contains metadata about how much money a recommendation can save or incur.
     
    Protobuf type google.cloud.recommender.v1beta1.CostProjection
    • 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<CostProjection.Builder>
      • clear

        public CostProjection.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<CostProjection.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<CostProjection.Builder>
      • getDefaultInstanceForType

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

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

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

        public CostProjection.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<CostProjection.Builder>
      • setField

        public CostProjection.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<CostProjection.Builder>
      • clearField

        public CostProjection.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<CostProjection.Builder>
      • clearOneof

        public CostProjection.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<CostProjection.Builder>
      • setRepeatedField

        public CostProjection.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<CostProjection.Builder>
      • addRepeatedField

        public CostProjection.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<CostProjection.Builder>
      • mergeFrom

        public CostProjection.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<CostProjection.Builder>
      • isInitialized

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

        public CostProjection.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<CostProjection.Builder>
        Throws:
        IOException
      • hasCost

        public boolean hasCost()
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
        Specified by:
        hasCost in interface CostProjectionOrBuilder
        Returns:
        Whether the cost field is set.
      • getCost

        public com.google.type.Money getCost()
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
        Specified by:
        getCost in interface CostProjectionOrBuilder
        Returns:
        The cost.
      • setCost

        public CostProjection.Builder setCost​(com.google.type.Money value)
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
      • setCost

        public CostProjection.Builder setCost​(com.google.type.Money.Builder builderForValue)
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
      • mergeCost

        public CostProjection.Builder mergeCost​(com.google.type.Money value)
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
      • clearCost

        public CostProjection.Builder clearCost()
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
      • getCostBuilder

        public com.google.type.Money.Builder getCostBuilder()
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
      • getCostOrBuilder

        public com.google.type.MoneyOrBuilder getCostOrBuilder()
         An approximate projection on amount saved or amount incurred. Negative cost
         units indicate cost savings and positive cost units indicate increase.
         See google.type.Money documentation for positive/negative units.
        
         A user's permissions may affect whether the cost is computed using list
         prices or custom contract prices.
         
        .google.type.Money cost = 1;
        Specified by:
        getCostOrBuilder in interface CostProjectionOrBuilder
      • hasDuration

        public boolean hasDuration()
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
        Specified by:
        hasDuration in interface CostProjectionOrBuilder
        Returns:
        Whether the duration field is set.
      • getDuration

        public com.google.protobuf.Duration getDuration()
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
        Specified by:
        getDuration in interface CostProjectionOrBuilder
        Returns:
        The duration.
      • setDuration

        public CostProjection.Builder setDuration​(com.google.protobuf.Duration value)
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
      • setDuration

        public CostProjection.Builder setDuration​(com.google.protobuf.Duration.Builder builderForValue)
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
      • mergeDuration

        public CostProjection.Builder mergeDuration​(com.google.protobuf.Duration value)
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
      • clearDuration

        public CostProjection.Builder clearDuration()
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
      • getDurationBuilder

        public com.google.protobuf.Duration.Builder getDurationBuilder()
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
      • getDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
         Duration for which this cost applies.
         
        .google.protobuf.Duration duration = 2;
        Specified by:
        getDurationOrBuilder in interface CostProjectionOrBuilder
      • setUnknownFields

        public final CostProjection.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<CostProjection.Builder>
      • mergeUnknownFields

        public final CostProjection.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<CostProjection.Builder>