Class Rollout.TrafficPercentStrategy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy
All Implemented Interfaces:
Rollout.TrafficPercentStrategyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Rollout

public static final class Rollout.TrafficPercentStrategy extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • PERCENTAGES_FIELD_NUMBER

      public static final int PERCENTAGES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getPercentagesCount

      public int getPercentagesCount()
      Description copied from interface: Rollout.TrafficPercentStrategyOrBuilder
       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;
      Specified by:
      getPercentagesCount in interface Rollout.TrafficPercentStrategyOrBuilder
    • containsPercentages

      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;
      Specified by:
      containsPercentages in interface Rollout.TrafficPercentStrategyOrBuilder
    • getPercentages

      @Deprecated public Map<String,Double> getPercentages()
      Deprecated.
      Use getPercentagesMap() instead.
      Specified by:
      getPercentages in interface Rollout.TrafficPercentStrategyOrBuilder
    • 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;
      Specified by:
      getPercentagesMap in interface Rollout.TrafficPercentStrategyOrBuilder
    • getPercentagesOrDefault

      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;
      Specified by:
      getPercentagesOrDefault in interface Rollout.TrafficPercentStrategyOrBuilder
    • getPercentagesOrThrow

      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;
      Specified by:
      getPercentagesOrThrow in interface Rollout.TrafficPercentStrategyOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Rollout.TrafficPercentStrategy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Rollout.TrafficPercentStrategy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Rollout.TrafficPercentStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Rollout.TrafficPercentStrategy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Rollout.TrafficPercentStrategy.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Rollout.TrafficPercentStrategy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Rollout.TrafficPercentStrategy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Rollout.TrafficPercentStrategy> parser()
    • getParserForType

      public com.google.protobuf.Parser<Rollout.TrafficPercentStrategy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Rollout.TrafficPercentStrategy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder