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