public static final class Rollout.TrafficPercentStrategy extends GeneratedMessageV3 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
Static Fields
PERCENTAGES_FIELD_NUMBER
public static final int PERCENTAGES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static Rollout.TrafficPercentStrategy getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Rollout.TrafficPercentStrategy.Builder newBuilder()
newBuilder(Rollout.TrafficPercentStrategy prototype)
public static Rollout.TrafficPercentStrategy.Builder newBuilder(Rollout.TrafficPercentStrategy prototype)
public static Rollout.TrafficPercentStrategy parseDelimitedFrom(InputStream input)
public static Rollout.TrafficPercentStrategy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Rollout.TrafficPercentStrategy parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Rollout.TrafficPercentStrategy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Rollout.TrafficPercentStrategy parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Rollout.TrafficPercentStrategy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Rollout.TrafficPercentStrategy parseFrom(CodedInputStream input)
public static Rollout.TrafficPercentStrategy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Rollout.TrafficPercentStrategy parseFrom(InputStream input)
public static Rollout.TrafficPercentStrategy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Rollout.TrafficPercentStrategy parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Rollout.TrafficPercentStrategy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Rollout.TrafficPercentStrategy> parser()
Methods
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
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public Rollout.TrafficPercentStrategy getDefaultInstanceForType()
getParserForType()
public Parser<Rollout.TrafficPercentStrategy> getParserForType()
Overrides
getPercentages()
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
|
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Rollout.TrafficPercentStrategy.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Rollout.TrafficPercentStrategy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public Rollout.TrafficPercentStrategy.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides