A RemoteConfig represents a Remote Config template.
A project's Remote Config template is evaluated during each application instance's fetch.
Note: Server templates currently support percentage conditions. Publishing a server template with unsupported conditional values will return a validation error. See Remote Config in Server Environments for more information.
The resolved value of a parameter is determined as follows:
Given the conditional values
that refer to true
conditions
for the application instance, the parameter's resolved value is the conditional value whose name
is the earliest in the conditions list
.
Else, if the parameter has a default value
, the resolved value is set to the default value.
Else, the parameter has no value and is omitted from the result that the application instance fetches.
For example, assume we have parameter key fruit
, with default value pear
and conditional value submap {"is_ios": "apple", "is_in_20_percent":
"banana"}
where "is_ios"
and "is_20_percent"
are names of conditions in the ordered condition list. The value of fruit
would evaluate to apple
if is_ios
is true. Otherwise, if is_in_20_percent
is true
, fruit
would evaluate to banana
, and if is_ios
and is_in_20_percent
are both false, fruit
would evaluate to pear
. If no default value were specified, and is_ios
and is_in_20_percent
were both false, no value for fruit
would be returned from the Remote Config server to the client.
Once a project's Remote Config template has been published via a successful projects.updateRemoteConfig
call, clients can fetch these parameter values and display them to users.
JSON representation |
---|
{ "conditions": [ { object ( |
Fields | |
---|---|
conditions[] |
A list of conditions in descending order by priority. The values of the |
parameters |
Map of parameter keys to their optional default values and optional conditional values. An object containing a list of |
version |
Output only, except for the version |
parameterGroups |
Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. For example, a parameter group with the name "Search V2" may have the An object containing a list of |
RemoteConfigCondition
A condition targeting a specific group of users. A list of these conditions make up part of a RemoteConfig object.
JSON representation |
---|
{
"name": string,
"expression": string,
"tagColor": enum ( |
Fields | |
---|---|
name |
Required. A non-empty and unique name of this condition. |
expression |
Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
tagColor |
Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION_DISPLAY_COLOR_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |
ConditionDisplayColor
List of colors that are associated with Conditions for display purposes.
Enums | |
---|---|
CONDITION_DISPLAY_COLOR_UNSPECIFIED |
|
BLUE |
Blue |
BROWN |
Brown |
CYAN |
Cyan |
DEEP_ORANGE |
aka "Red Orange" |
GREEN |
Green |
INDIGO |
Indigo |
LIME |
Lime |
ORANGE |
Orange |
PINK |
Pink |
PURPLE |
Purple |
TEAL |
Teal |
RemoteConfigParameter
A parameter value associated with a parameter key in google.firebase.remoteconfig.v1.RemoteConfig.parameters
.
At minimum, a defaultValue
or a conditionalValues
entry should be present for the parameter to have any effect.
JSON representation |
---|
{ "defaultValue": { object ( |
Fields | |
---|---|
defaultValue |
Optional - value to set the parameter to, when none of the named conditions evaluate to |
conditionalValues |
Optional - a ( An object containing a list of |
description |
Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |
valueType |
The data type for all values of this parameter in the current version of the template. Defaults to |
RemoteConfigParameterValue
A RemoteConfigParameterValue resource contains the value that a parameter may have.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field value_option . A RemoteConfigParameterValue consists of either a string (value) or a boolean (use_in_app_default, set to true if applicable). value_option can be only one of the following: |
|
value |
The string value that the parameter is set to. |
useInAppDefault |
If true, the parameter is omitted from the parameter values returned to a client. |
personalizationValue |
A dynamic, user-specific value computed when config is fetched. |
rolloutValue |
A dynamic Rollout value managed by the Firebase ABT Experiment service. |
PersonalizationValue
Contains the necessary information to fetch a personalized value.
JSON representation |
---|
{ "personalizationId": string } |
Fields | |
---|---|
personalizationId |
Identifier that represents a personalization definition. This definition is used to resolve the value at config fetch time. This system-generated value should not be modified. |
RolloutValue
Information related to a Rollout.
JSON representation |
---|
{ "rolloutId": string, "value": string, "percent": number } |
Fields | |
---|---|
rolloutId |
The identifier that associates a parameter value to a Rollout experiment. |
value |
The user-specified value to be rolled out. |
percent |
The percentage of users that will receive the rollout value. |
ParameterValueType
Accepted data types for parameter values.
Enums | |
---|---|
PARAMETER_VALUE_TYPE_UNSPECIFIED |
Catch-all for unrecognized enum values. |
STRING |
Represents String values. |
BOOLEAN |
Represents Boolean values ("true" or "false"). |
NUMBER |
Represents both positive and negative integer and float values. |
JSON |
Represents JSON values. |
RemoteConfigParameterGroup
A named group of parameters. Grouping parameters is only for management purposes and does not affect client-side fetching of parameter values.
JSON representation |
---|
{
"description": string,
"parameters": {
string: {
object ( |
Fields | |
---|---|
description |
Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
parameters |
Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. An object containing a list of |