Class TrafficSplit.Builder

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

    public static final class TrafficSplit.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TrafficSplit.Builder>
    implements TrafficSplitOrBuilder
     Traffic routing configuration for versions within a single service. Traffic
     splits define how traffic directed to the service is assigned to versions.
     
    Protobuf type google.appengine.v1.TrafficSplit
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficSplit.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficSplit.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

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

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

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

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

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

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

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

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

        public TrafficSplit.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<TrafficSplit.Builder>
        Throws:
        IOException
      • getShardByValue

        public int getShardByValue()
         Mechanism used to determine which version a request is sent to.
         The traffic selection algorithm will
         be stable for either type until allocations are changed.
         
        .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
        Specified by:
        getShardByValue in interface TrafficSplitOrBuilder
        Returns:
        The enum numeric value on the wire for shardBy.
      • setShardByValue

        public TrafficSplit.Builder setShardByValue​(int value)
         Mechanism used to determine which version a request is sent to.
         The traffic selection algorithm will
         be stable for either type until allocations are changed.
         
        .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
        Parameters:
        value - The enum numeric value on the wire for shardBy to set.
        Returns:
        This builder for chaining.
      • getShardBy

        public TrafficSplit.ShardBy getShardBy()
         Mechanism used to determine which version a request is sent to.
         The traffic selection algorithm will
         be stable for either type until allocations are changed.
         
        .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
        Specified by:
        getShardBy in interface TrafficSplitOrBuilder
        Returns:
        The shardBy.
      • setShardBy

        public TrafficSplit.Builder setShardBy​(TrafficSplit.ShardBy value)
         Mechanism used to determine which version a request is sent to.
         The traffic selection algorithm will
         be stable for either type until allocations are changed.
         
        .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
        Parameters:
        value - The shardBy to set.
        Returns:
        This builder for chaining.
      • clearShardBy

        public TrafficSplit.Builder clearShardBy()
         Mechanism used to determine which version a request is sent to.
         The traffic selection algorithm will
         be stable for either type until allocations are changed.
         
        .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
        Returns:
        This builder for chaining.
      • getAllocationsCount

        public int getAllocationsCount()
        Description copied from interface: TrafficSplitOrBuilder
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
        Specified by:
        getAllocationsCount in interface TrafficSplitOrBuilder
      • containsAllocations

        public boolean containsAllocations​(String key)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
        Specified by:
        containsAllocations in interface TrafficSplitOrBuilder
      • getAllocationsMap

        public Map<String,​Double> getAllocationsMap()
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
        Specified by:
        getAllocationsMap in interface TrafficSplitOrBuilder
      • getAllocationsOrDefault

        public double getAllocationsOrDefault​(String key,
                                              double defaultValue)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
        Specified by:
        getAllocationsOrDefault in interface TrafficSplitOrBuilder
      • getAllocationsOrThrow

        public double getAllocationsOrThrow​(String key)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
        Specified by:
        getAllocationsOrThrow in interface TrafficSplitOrBuilder
      • removeAllocations

        public TrafficSplit.Builder removeAllocations​(String key)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
      • getMutableAllocations

        @Deprecated
        public Map<String,​Double> getMutableAllocations()
        Deprecated.
        Use alternate mutation accessors instead.
      • putAllocations

        public TrafficSplit.Builder putAllocations​(String key,
                                                   double value)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
      • putAllAllocations

        public TrafficSplit.Builder putAllAllocations​(Map<String,​Double> values)
         Mapping from version IDs within the service to fractional
         (0.000, 1] allocations of traffic for that version. Each version can
         be specified only once, but some versions in the service may not
         have any traffic allocation. Services that have traffic allocated
         cannot be deleted until either the service is deleted or
         their traffic allocation is removed. Allocations must sum to 1.
         Up to two decimal place precision is supported for IP-based splits and
         up to three decimal places is supported for cookie-based splits.
         
        map<string, double> allocations = 2;
      • setUnknownFields

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

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