package com.android.billingclient.api; import java.util.HashSet; import java.util.Iterator; import java.util.List; /* loaded from: classes.dex */ public final class QueryProductDetailsParams { public final com.google.android.gms.internal.play_billing.zzu zza; public static class Builder { public com.google.android.gms.internal.play_billing.zzu zza; public /* synthetic */ Builder(zzbm zzbmVar) { } public QueryProductDetailsParams build() { return new QueryProductDetailsParams(this, null); } public Builder setProductList(List list) { if (list == null || list.isEmpty()) { throw new IllegalArgumentException("Product list cannot be empty."); } HashSet hashSet = new HashSet(); Iterator it = list.iterator(); while (it.hasNext()) { Product product = (Product) it.next(); if (!"play_pass_subs".equals(product.zzb())) { hashSet.add(product.zzb()); } } if (hashSet.size() > 1) { throw new IllegalArgumentException("All products should be of the same product type."); } this.zza = com.google.android.gms.internal.play_billing.zzu.zzj(list); return this; } } public static class Product { public final String zza; public final String zzb; public static class Builder { public String zza; public String zzb; public /* synthetic */ Builder(zzbn zzbnVar) { } public Product build() { if ("first_party".equals(this.zzb)) { throw new IllegalArgumentException("Serialized doc id must be provided for first party products."); } if (this.zza == null) { throw new IllegalArgumentException("Product id must be provided."); } if (this.zzb != null) { return new Product(this, null); } throw new IllegalArgumentException("Product type must be provided."); } public Builder setProductId(String str) { this.zza = str; return this; } public Builder setProductType(String str) { this.zzb = str; return this; } } public /* synthetic */ Product(Builder builder, zzbo zzboVar) { this.zza = builder.zza; this.zzb = builder.zzb; } public static Builder newBuilder() { return new Builder(null); } public final String zza() { return this.zza; } public final String zzb() { return this.zzb; } } public /* synthetic */ QueryProductDetailsParams(Builder builder, zzbp zzbpVar) { this.zza = builder.zza; } public static Builder newBuilder() { return new Builder(null); } public final com.google.android.gms.internal.play_billing.zzu zza() { return this.zza; } public final String zzb() { return ((Product) this.zza.get(0)).zzb(); } }