Class PriceByResource.Builder

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

    public static final class PriceByResource.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<PriceByResource.Builder>
    implements PriceByResourceOrBuilder
     Represents price by resource type.
     
    Protobuf type google.cloud.channel.v1.PriceByResource
    • 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<PriceByResource.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public PriceByResource.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<PriceByResource.Builder>
        Throws:
        IOException
      • getResourceTypeValue

        public int getResourceTypeValue()
         Resource Type. Example: SEAT
         
        .google.cloud.channel.v1.ResourceType resource_type = 1;
        Specified by:
        getResourceTypeValue in interface PriceByResourceOrBuilder
        Returns:
        The enum numeric value on the wire for resourceType.
      • setResourceTypeValue

        public PriceByResource.Builder setResourceTypeValue​(int value)
         Resource Type. Example: SEAT
         
        .google.cloud.channel.v1.ResourceType resource_type = 1;
        Parameters:
        value - The enum numeric value on the wire for resourceType to set.
        Returns:
        This builder for chaining.
      • setResourceType

        public PriceByResource.Builder setResourceType​(ResourceType value)
         Resource Type. Example: SEAT
         
        .google.cloud.channel.v1.ResourceType resource_type = 1;
        Parameters:
        value - The resourceType to set.
        Returns:
        This builder for chaining.
      • clearResourceType

        public PriceByResource.Builder clearResourceType()
         Resource Type. Example: SEAT
         
        .google.cloud.channel.v1.ResourceType resource_type = 1;
        Returns:
        This builder for chaining.
      • hasPrice

        public boolean hasPrice()
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
        Specified by:
        hasPrice in interface PriceByResourceOrBuilder
        Returns:
        Whether the price field is set.
      • getPrice

        public Price getPrice()
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
        Specified by:
        getPrice in interface PriceByResourceOrBuilder
        Returns:
        The price.
      • setPrice

        public PriceByResource.Builder setPrice​(Price value)
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
      • setPrice

        public PriceByResource.Builder setPrice​(Price.Builder builderForValue)
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
      • mergePrice

        public PriceByResource.Builder mergePrice​(Price value)
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
      • clearPrice

        public PriceByResource.Builder clearPrice()
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
      • getPriceBuilder

        public Price.Builder getPriceBuilder()
         Price of the Offer. Present if there are no price phases.
         
        .google.cloud.channel.v1.Price price = 2;
      • getPricePhasesCount

        public int getPricePhasesCount()
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
        Specified by:
        getPricePhasesCount in interface PriceByResourceOrBuilder
      • setPricePhases

        public PriceByResource.Builder setPricePhases​(int index,
                                                      PricePhase value)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • setPricePhases

        public PriceByResource.Builder setPricePhases​(int index,
                                                      PricePhase.Builder builderForValue)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addPricePhases

        public PriceByResource.Builder addPricePhases​(PricePhase value)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addPricePhases

        public PriceByResource.Builder addPricePhases​(int index,
                                                      PricePhase value)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addPricePhases

        public PriceByResource.Builder addPricePhases​(int index,
                                                      PricePhase.Builder builderForValue)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addAllPricePhases

        public PriceByResource.Builder addAllPricePhases​(Iterable<? extends PricePhase> values)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • clearPricePhases

        public PriceByResource.Builder clearPricePhases()
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • removePricePhases

        public PriceByResource.Builder removePricePhases​(int index)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • getPricePhasesBuilder

        public PricePhase.Builder getPricePhasesBuilder​(int index)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addPricePhasesBuilder

        public PricePhase.Builder addPricePhasesBuilder()
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • addPricePhasesBuilder

        public PricePhase.Builder addPricePhasesBuilder​(int index)
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • getPricePhasesBuilderList

        public List<PricePhase.Builder> getPricePhasesBuilderList()
         Specifies the price by time range.
         
        repeated .google.cloud.channel.v1.PricePhase price_phases = 3;
      • setUnknownFields

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

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