package com.google.android.gms.internal.gtm; import com.google.android.gms.analytics.ecommerce.Product; import com.google.android.gms.analytics.ecommerce.ProductAction; import com.google.android.gms.analytics.ecommerce.Promotion; import com.google.android.gms.analytics.zzi; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /* loaded from: classes.dex */ public final class zzw extends zzi { private ProductAction zzrx; private final List zzsa = new ArrayList(); private final List zzrz = new ArrayList(); private final Map> zzry = new HashMap(); public final String toString() { HashMap hashMap = new HashMap(); if (!this.zzsa.isEmpty()) { hashMap.put("products", this.zzsa); } if (!this.zzrz.isEmpty()) { hashMap.put("promotions", this.zzrz); } if (!this.zzry.isEmpty()) { hashMap.put("impressions", this.zzry); } hashMap.put("productAction", this.zzrx); return zza((Object) hashMap); } public final List zzbo() { return Collections.unmodifiableList(this.zzsa); } public final List zzbq() { return Collections.unmodifiableList(this.zzrz); } @Override // com.google.android.gms.analytics.zzi public final /* synthetic */ void zzb(zzw zzwVar) { zzw zzwVar2 = zzwVar; zzwVar2.zzsa.addAll(this.zzsa); zzwVar2.zzrz.addAll(this.zzrz); for (Map.Entry> entry : this.zzry.entrySet()) { String key = entry.getKey(); for (Product product : entry.getValue()) { if (product != null) { String str = key == null ? "" : key; if (!zzwVar2.zzry.containsKey(str)) { zzwVar2.zzry.put(str, new ArrayList()); } zzwVar2.zzry.get(str).add(product); } } } ProductAction productAction = this.zzrx; if (productAction != null) { zzwVar2.zzrx = productAction; } } public final Map> zzbp() { return this.zzry; } public final ProductAction zzbn() { return this.zzrx; } }