package com.martsnew.data.model.response;

import B6.v;
import P6.g;
import d5.AbstractC0844a;
import e0.C0853a;
import o6.AbstractC1391k;
import o6.AbstractC1394n;
import o6.AbstractC1397q;
import o6.x;
import p6.AbstractC1439e;

/* JADX INFO: loaded from: classes.dex */
public final class TopicReportResponseJsonAdapter extends AbstractC1391k {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final C0853a f10977a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final AbstractC1391k f10978b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final AbstractC1391k f10979c;

    public TopicReportResponseJsonAdapter(x xVar) {
        g.e(xVar, "moshi");
        this.f10977a = C0853a.B("id", "title");
        v vVar = v.f1034q;
        this.f10978b = xVar.b(Long.TYPE, vVar, "id");
        this.f10979c = xVar.b(String.class, vVar, "title");
    }

    @Override // o6.AbstractC1391k
    public final Object b(AbstractC1394n abstractC1394n) {
        g.e(abstractC1394n, "reader");
        abstractC1394n.b();
        Long l8 = null;
        String str = null;
        while (abstractC1394n.n()) {
            int iQ = abstractC1394n.Q(this.f10977a);
            if (iQ == -1) {
                abstractC1394n.V();
                abstractC1394n.f0();
            } else if (iQ == 0) {
                l8 = (Long) this.f10978b.b(abstractC1394n);
                if (l8 == null) {
                    throw AbstractC1439e.j("id", "id", abstractC1394n);
                }
            } else if (iQ == 1) {
                str = (String) this.f10979c.b(abstractC1394n);
            }
        }
        abstractC1394n.j();
        if (l8 != null) {
            return new TopicReportResponse(l8.longValue(), str);
        }
        throw AbstractC1439e.e("id", "id", abstractC1394n);
    }

    @Override // o6.AbstractC1391k
    public final void e(AbstractC1397q abstractC1397q, Object obj) {
        TopicReportResponse topicReportResponse = (TopicReportResponse) obj;
        g.e(abstractC1397q, "writer");
        if (topicReportResponse == null) {
            throw new NullPointerException("value_ was null! Wrap in .nullSafe() to write nullable values.");
        }
        abstractC1397q.b();
        abstractC1397q.m("id");
        this.f10978b.e(abstractC1397q, Long.valueOf(topicReportResponse.f10975a));
        abstractC1397q.m("title");
        this.f10979c.e(abstractC1397q, topicReportResponse.f10976b);
        abstractC1397q.g();
    }

    public final String toString() {
        return AbstractC0844a.h(41, "GeneratedJsonAdapter(TopicReportResponse)");
    }
}
