target.apidocs.com.google.api.services.servicemanagement.model.TrafficPercentStrategy.html Maven / Gradle / Ivy
TrafficPercentStrategy (Service Management API v1-rev20240823-2.0.0)
com.google.api.services.servicemanagement.model
Class TrafficPercentStrategy
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.servicemanagement.model.TrafficPercentStrategy
-
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
TrafficPercentStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
TrafficPercentStrategy
clone()
Map<String,Double>
getPercentages()
Maps service configuration IDs to their corresponding traffic percentage.
TrafficPercentStrategy
set(String fieldName,
Object value)
TrafficPercentStrategy
setPercentages(Map<String,Double> percentages)
Maps service configuration IDs to their corresponding traffic percentage.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
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
-
set
public TrafficPercentStrategy set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
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