public static final class

FirebaseOptions.Builder

extends Object
java.lang.Object
   ↳ com.google.firebase.FirebaseOptions.Builder

Class Overview

Builder for constructing FirebaseOptions.

Summary

Public Constructors
FirebaseOptions.Builder()
Constructs an empty builder.
FirebaseOptions.Builder(FirebaseOptions options)
Initializes the builder's values from the options object.
Public Methods
FirebaseOptions build()
FirebaseOptions.Builder setDatabaseAuthVariableOverride(Map<String, Object> databaseAuthVariableOverride)
Sets the auth variable to be used by database rules.
FirebaseOptions.Builder setDatabaseUrl(String databaseUrl)
FirebaseOptions.Builder setServiceAccount(InputStream stream)
Sets the Service Account associated with these FirebaseOptions.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FirebaseOptions.Builder ()

Constructs an empty builder.

public FirebaseOptions.Builder (FirebaseOptions options)

Initializes the builder's values from the options object.

The new builder is not backed by this objects values, that is changes made to the new builder don't change the values of the origin object.

Public Methods

public FirebaseOptions build ()

public FirebaseOptions.Builder setDatabaseAuthVariableOverride (Map<String, Object> databaseAuthVariableOverride)

Sets the auth variable to be used by database rules. When set, security rules for database actions are evaluated using the provided auth object. During evaluation the object is available on the auth variable. Use this option to enforce schema validation and additional security for this app instance. If this option is not provided, security rules are bypassed entirely for this app instance.

Parameters
databaseAuthVariableOverride UID.
Returns
  • This Builder instance is returned so subsequent calls can be chained.

public FirebaseOptions.Builder setDatabaseUrl (String databaseUrl)

public FirebaseOptions.Builder setServiceAccount (InputStream stream)

Sets the Service Account associated with these FirebaseOptions.

Parameters
stream A stream containing the service account contents as JSON.
Returns
  • This Builder instance is returned so subsequent calls can be chained.