public static final class Rollout.TrafficPercentStrategy.Builder extends GeneratedMessageV3.Builder<Rollout.TrafficPercentStrategy.Builder> implements Rollout.TrafficPercentStrategyOrBuilder
Strategy that specifies how clients of Google Service Controller want to
send traffic to use different config versions. This is generally
used by API proxy to split traffic based on your configured percentage for
each config version.
One example of how to gradually rollout a new service configuration using
this
strategy:
Day 1
Rollout {
id: "example.googleapis.com/rollout_20160206"
traffic_percent_strategy {
percentages: {
"example.googleapis.com/20160201": 70.00
"example.googleapis.com/20160206": 30.00
}
}
}
Day 2
Rollout {
id: "example.googleapis.com/rollout_20160207"
traffic_percent_strategy: {
percentages: {
"example.googleapis.com/20160206": 100.00
}
}
}
Protobuf type google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Rollout.TrafficPercentStrategy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public Rollout.TrafficPercentStrategy build()
Returns
buildPartial()
public Rollout.TrafficPercentStrategy buildPartial()
Returns
clear()
public Rollout.TrafficPercentStrategy.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Rollout.TrafficPercentStrategy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Rollout.TrafficPercentStrategy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearPercentages()
public Rollout.TrafficPercentStrategy.Builder clearPercentages()
Returns
clone()
public Rollout.TrafficPercentStrategy.Builder clone()
Returns
Overrides
containsPercentages(String key)
public boolean containsPercentages(String key)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter
Returns
getDefaultInstanceForType()
public Rollout.TrafficPercentStrategy getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMutablePercentages()
public Map<String,Double> getMutablePercentages()
Use alternate mutation accessors instead.
Returns
getPercentages()
public Map<String,Double> getPercentages()
Returns
getPercentagesCount()
public int getPercentagesCount()
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Returns
getPercentagesMap()
public Map<String,Double> getPercentagesMap()
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Returns
getPercentagesOrDefault(String key, double defaultValue)
public double getPercentagesOrDefault(String key, double defaultValue)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameters
Returns
getPercentagesOrThrow(String key)
public double getPercentagesOrThrow(String key)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Rollout.TrafficPercentStrategy other)
public Rollout.TrafficPercentStrategy.Builder mergeFrom(Rollout.TrafficPercentStrategy other)
Parameter
Returns
public Rollout.TrafficPercentStrategy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Rollout.TrafficPercentStrategy.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Rollout.TrafficPercentStrategy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllPercentages(Map<String,Double> values)
public Rollout.TrafficPercentStrategy.Builder putAllPercentages(Map<String,Double> values)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter
Name | Description |
values | Map<String,java.lang.Double>
|
Returns
putPercentages(String key, double value)
public Rollout.TrafficPercentStrategy.Builder putPercentages(String key, double value)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameters
Returns
removePercentages(String key)
public Rollout.TrafficPercentStrategy.Builder removePercentages(String key)
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Rollout.TrafficPercentStrategy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Rollout.TrafficPercentStrategy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Rollout.TrafficPercentStrategy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides