package com.google.firebase; import android.content.Context; import android.text.TextUtils; import com.google.android.gms.common.internal.Objects; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.internal.StringResourceValueReader; import com.google.android.gms.common.util.Strings; /* loaded from: classes.dex */ public final class FirebaseOptions { private final String apiKey; private final String applicationId; private final String databaseUrl; private final String gaTrackingId; private final String gcmSenderId; private final String projectId; private final String storageBucket; private FirebaseOptions(String str, String str2, String str3, String str4, String str5, String str6, String str7) { Preconditions.checkState(!Strings.isEmptyOrWhitespace(str), "ApplicationId must be set."); this.applicationId = str; this.apiKey = str2; this.databaseUrl = str3; this.gaTrackingId = str4; this.gcmSenderId = str5; this.storageBucket = str6; this.projectId = str7; } public static FirebaseOptions fromResource(Context context) { StringResourceValueReader stringResourceValueReader = new StringResourceValueReader(context); String string = stringResourceValueReader.getString("google_app_id"); if (TextUtils.isEmpty(string)) { return null; } return new FirebaseOptions(string, stringResourceValueReader.getString("google_api_key"), stringResourceValueReader.getString("firebase_database_url"), stringResourceValueReader.getString("ga_trackingId"), stringResourceValueReader.getString("gcm_defaultSenderId"), stringResourceValueReader.getString("google_storage_bucket"), stringResourceValueReader.getString("project_id")); } public final boolean equals(Object obj) { if (!(obj instanceof FirebaseOptions)) { return false; } FirebaseOptions firebaseOptions = (FirebaseOptions) obj; return Objects.equal(this.applicationId, firebaseOptions.applicationId) && Objects.equal(this.apiKey, firebaseOptions.apiKey) && Objects.equal(this.databaseUrl, firebaseOptions.databaseUrl) && Objects.equal(this.gaTrackingId, firebaseOptions.gaTrackingId) && Objects.equal(this.gcmSenderId, firebaseOptions.gcmSenderId) && Objects.equal(this.storageBucket, firebaseOptions.storageBucket) && Objects.equal(this.projectId, firebaseOptions.projectId); } public final int hashCode() { return Objects.hashCode(this.applicationId, this.apiKey, this.databaseUrl, this.gaTrackingId, this.gcmSenderId, this.storageBucket, this.projectId); } public final String toString() { return Objects.toStringHelper(this).add("applicationId", this.applicationId).add("apiKey", this.apiKey).add("databaseUrl", this.databaseUrl).add("gcmSenderId", this.gcmSenderId).add("storageBucket", this.storageBucket).add("projectId", this.projectId).toString(); } public final String getProjectId() { return this.projectId; } public final String getGcmSenderId() { return this.gcmSenderId; } public final String getApplicationId() { return this.applicationId; } public final String getApiKey() { return this.apiKey; } }