package cb;

import com.google.firebase.encoders.EncodingException;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public final /* synthetic */ class a implements ab.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f4941a;

    @Override // ab.a
    public final void a(Object obj, Object obj2) throws IOException {
        switch (this.f4941a) {
            case 0:
                throw new EncodingException("Couldn't find encoder for type " + obj.getClass().getCanonicalName());
            case 1:
                Map.Entry entry = (Map.Entry) obj;
                ab.d dVar = (ab.d) obj2;
                Charset charset = com.google.firebase.encoders.proto.d.f24067f;
                dVar.add(com.google.firebase.encoders.proto.d.f24068g, entry.getKey());
                dVar.add(com.google.firebase.encoders.proto.d.f24069h, entry.getValue());
                return;
            default:
                throw new EncodingException("Couldn't find encoder for type " + obj.getClass().getCanonicalName());
        }
    }
}
