Struct google_firebaseremoteconfig1::api::RemoteConfig [−][src]
pub struct RemoteConfig {
pub parameters: Option<HashMap<String, RemoteConfigParameter>>,
pub conditions: Option<Vec<RemoteConfigCondition>>,
}
Expand description
The RemoteConfig consists of a list of conditions (which can be thought of as named “if” statements) and a map of parameters (parameter key to a structure containing an optional default value, as well as a optional submap of (condition name to value when that condition is true).
Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- get remote config projects (response)
- update remote config projects (request|response)
Fields
parameters: Option<HashMap<String, RemoteConfigParameter>>
Map of parameter keys to their optional default values and optional submap of (condition name : value). Order doesn’t affect semantics, and so is sorted by the server. The ‘key’ values of the params must be unique.
conditions: Option<Vec<RemoteConfigCondition>>
The list of named conditions. The order does affect the semantics. The condition_name values of these entries must be unique.
The resolved value of a config parameter P is determined as follow:
- Let Y be the set of values from the submap of P that refer to conditions
that evaluate to
true
. - If Y is non empty, the value is taken from the specific submap in Y whose condition_name is the earliest in this condition list.
- Else, if P has a default value option (condition_name is empty) then the value is taken from that option.
- Else, parameter P has no value and is omitted from the config result.
Example: parameter key “p1”, default value “v1”, submap specified as {“c1”: v2, “c2”: v3} where “c1” and “c2” are names of conditions in the condition list (where “c1” in this example appears before “c2”). The value of p1 would be v2 as long as c1 is true. Otherwise, if c2 is true, p1 would evaluate to v3, and if c1 and c2 are both false, p1 would evaluate to v1. If no default value was specified, and c1 and c2 were both false, no value for p1 would be generated.
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for RemoteConfig
impl Send for RemoteConfig
impl Sync for RemoteConfig
impl Unpin for RemoteConfig
impl UnwindSafe for RemoteConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more