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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Rollout.TrafficPercentStrategy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public Rollout.TrafficPercentStrategy build()
buildPartial()
public Rollout.TrafficPercentStrategy buildPartial()
clear()
public Rollout.TrafficPercentStrategy.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public Rollout.TrafficPercentStrategy.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Rollout.TrafficPercentStrategy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPercentages()
public Rollout.TrafficPercentStrategy.Builder clearPercentages()
clone()
public Rollout.TrafficPercentStrategy.Builder clone()
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 |
---|
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;
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
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
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
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Rollout.TrafficPercentStrategy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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
|
setField(Descriptors.FieldDescriptor field, Object value)
public Rollout.TrafficPercentStrategy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Rollout.TrafficPercentStrategy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Rollout.TrafficPercentStrategy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides