All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.servicemanagement.model.TrafficPercentStrategy.html Maven / Gradle / Ivy

There is a newer version: v1-rev20241106-2.0.0
Show newest version






TrafficPercentStrategy (Service Management API v1-rev20240920-2.0.0)












com.google.api.services.servicemanagement.model

Class TrafficPercentStrategy

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class TrafficPercentStrategy
    extends com.google.api.client.json.GenericJson
    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 } } }

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Service Management API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Constructor Detail

      • TrafficPercentStrategy

        public TrafficPercentStrategy()
    • Method Detail

      • getPercentages

        public Map<String,Double> getPercentages()
        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.
        Returns:
        value or null for none
      • setPercentages

        public TrafficPercentStrategy setPercentages(Map<String,Double> percentages)
        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.
        Parameters:
        percentages - percentages or null for none
      • clone

        public TrafficPercentStrategy clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy