package com.google.android.gms.internal.ads;

import java.io.IOException;

/* JADX INFO: loaded from: classes2.dex */
public abstract class m92 {
    public String c() {
        throw new UnsupportedOperationException(getClass().getSimpleName());
    }

    public final o92 f() {
        if (this instanceof o92) {
            return (o92) this;
        }
        throw new IllegalStateException("Not a JSON Object: ".concat(toString()));
    }

    public final p92 g() {
        if (this instanceof p92) {
            return (p92) this;
        }
        throw new IllegalStateException("Not a JSON Primitive: ".concat(toString()));
    }

    public final String toString() {
        try {
            StringBuilder sb = new StringBuilder();
            aa2 aa2Var = new aa2(new androidx.fragment.app.b2(sb));
            aa2Var.f8606h = zzhyq.f19851a;
            y92.f18767a.z(aa2Var, this);
            return sb.toString();
        } catch (IOException e10) {
            throw new AssertionError(e10);
        }
    }
}
