public final class

Template

extends Object
java.lang.Object
   ↳ com.google.firebase.remoteconfig.Template

Class Overview

Represents a Remote Config template.

Summary

Public Constructors
Template(String etag)
Creates a new Template.
Public Methods
boolean equals(Object o)
static Template fromJSON(String json)
Creates and returns a new Remote Config template from a JSON string.
List<Condition> getConditions()
Gets the list of conditions of the template.
String getETag()
Gets the ETag of the template.
Map<String, ParameterGroup> getParameterGroups()
Gets the map of parameter groups of the template.
Map<String, Parameter> getParameters()
Gets the map of parameters of the template.
Version getVersion()
Gets the version information of the template.
int hashCode()
Template setConditions(List<Condition> conditions)
Sets the list of conditions of the template.
Template setParameterGroups(Map<String, ParameterGroup> parameterGroups)
Sets the map of parameter groups of the template.
Template setParameters(Map<String, Parameter> parameters)
Sets the map of parameters of the template.
Template setVersion(Version version)
Sets the version information of the template.
String toJSON()
Gets the JSON-serializable representation of this template.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Template (String etag)

Creates a new Template.

Parameters
etag The ETag of this template.

Public Methods

public boolean equals (Object o)

public static Template fromJSON (String json)

Creates and returns a new Remote Config template from a JSON string. Input JSON string must contain an etag property to create a valid template.

Parameters
json A non-null JSON string to populate a Remote Config template.
Returns
Throws
FirebaseRemoteConfigException If the input JSON string is not parsable.

public List<Condition> getConditions ()

Gets the list of conditions of the template.

Returns
  • A non-null list of conditions.

public String getETag ()

Gets the ETag of the template.

Returns
  • The ETag of the template.

public Map<String, ParameterGroup> getParameterGroups ()

Gets the map of parameter groups of the template.

Returns
  • A non-null map of parameter group names to their parameter group instances.

public Map<String, Parameter> getParameters ()

Gets the map of parameters of the template.

Returns
  • A non-null map of parameter keys to their optional default values and optional conditional values.

public Version getVersion ()

Gets the version information of the template.

Returns
  • The version information of the template.

public int hashCode ()

public Template setConditions (List<Condition> conditions)

Sets the list of conditions of the template.

Parameters
conditions A non-null list of conditions in descending order by priority.
Returns

public Template setParameterGroups (Map<String, ParameterGroup> parameterGroups)

Sets the map of parameter groups of the template.

Parameters
parameterGroups A non-null map of parameter group names to their parameter group instances.
Returns

public Template setParameters (Map<String, Parameter> parameters)

Sets the map of parameters of the template.

Parameters
parameters A non-null map of parameter keys to their optional default values and optional conditional values.
Returns

public Template setVersion (Version version)

Sets the version information of the template. Only the version's description field can be specified here.

Parameters
version A Version instance.
Returns

public String toJSON ()

Gets the JSON-serializable representation of this template.

Returns
  • A JSON-serializable representation of this Template instance.