Class Rollout.TrafficPercentStrategy.Builder (2.1.7)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Rollout.TrafficPercentStrategy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

build()

public Rollout.TrafficPercentStrategy build()
Returns
TypeDescription
Rollout.TrafficPercentStrategy

buildPartial()

public Rollout.TrafficPercentStrategy buildPartial()
Returns
TypeDescription
Rollout.TrafficPercentStrategy

clear()

public Rollout.TrafficPercentStrategy.Builder clear()
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Rollout.TrafficPercentStrategy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Rollout.TrafficPercentStrategy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

clearPercentages()

public Rollout.TrafficPercentStrategy.Builder clearPercentages()
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder

clone()

public Rollout.TrafficPercentStrategy.Builder clone()
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Rollout.TrafficPercentStrategy getDefaultInstanceForType()
Returns
TypeDescription
Rollout.TrafficPercentStrategy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutablePercentages()

public Map<String,Double> getMutablePercentages()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,java.lang.Double>

getPercentages()

public Map<String,Double> getPercentages()

Use #getPercentagesMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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;

Parameters
NameDescription
keyString
defaultValuedouble
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
double

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Rollout.TrafficPercentStrategy other)

public Rollout.TrafficPercentStrategy.Builder mergeFrom(Rollout.TrafficPercentStrategy other)
Parameter
NameDescription
otherRollout.TrafficPercentStrategy
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Rollout.TrafficPercentStrategy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Rollout.TrafficPercentStrategy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Rollout.TrafficPercentStrategy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
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
NameDescription
valuesMap<String,java.lang.Double>
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder

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
NameDescription
keyString
valuedouble
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder

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
NameDescription
keyString
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Rollout.TrafficPercentStrategy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Rollout.TrafficPercentStrategy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Rollout.TrafficPercentStrategy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Rollout.TrafficPercentStrategy.Builder
Overrides