public static final class Rollout.TrafficPercentStrategy.Builder extends GeneratedMessage.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.GeneratedMessage.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
build()
public Rollout.TrafficPercentStrategy build()
buildPartial()
public Rollout.TrafficPercentStrategy buildPartial()
clear()
public Rollout.TrafficPercentStrategy.Builder clear()
Overrides
clearPercentages()
public Rollout.TrafficPercentStrategy.Builder clearPercentages()
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 |
| Name |
Description |
key |
String
|
getDefaultInstanceForType()
public Rollout.TrafficPercentStrategy getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getMutablePercentages() (deprecated)
public Map<String,Double> getMutablePercentages()
Use alternate mutation accessors instead.
| Returns |
| Type |
Description |
Map<String,java.lang.Double> |
|
getPercentages() (deprecated)
public Map<String,Double> getPercentages()
| Returns |
| Type |
Description |
Map<String,java.lang.Double> |
|
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 |
| Type |
Description |
int |
|
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 |
| Type |
Description |
Map<String,java.lang.Double> |
|
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;
| Returns |
| Type |
Description |
double |
|
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 |
| Name |
Description |
key |
String
|
| Returns |
| Type |
Description |
double |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
| Parameter |
| Name |
Description |
number |
int
|
| Returns |
| Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
| Parameter |
| Name |
Description |
number |
int
|
| Returns |
| Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Rollout.TrafficPercentStrategy other)
public Rollout.TrafficPercentStrategy.Builder mergeFrom(Rollout.TrafficPercentStrategy other)
public Rollout.TrafficPercentStrategy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Rollout.TrafficPercentStrategy.Builder mergeFrom(Message other)
| Parameter |
| Name |
Description |
other |
Message
|
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>
|
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;
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 |
| Name |
Description |
key |
String
|