package Z;

import androidx.datastore.preferences.protobuf.AbstractC0440s;
import androidx.datastore.preferences.protobuf.AbstractC0442u;
import androidx.datastore.preferences.protobuf.C0429g;
import androidx.datastore.preferences.protobuf.C0441t;
import androidx.datastore.preferences.protobuf.P;
import androidx.datastore.preferences.protobuf.T;
import n4.u0;
import u.AbstractC1563h;

/* JADX INFO: loaded from: classes.dex */
public final class g extends AbstractC0442u {
    public static final int BOOLEAN_FIELD_NUMBER = 1;
    public static final int BYTES_FIELD_NUMBER = 8;
    private static final g DEFAULT_INSTANCE;
    public static final int DOUBLE_FIELD_NUMBER = 7;
    public static final int FLOAT_FIELD_NUMBER = 2;
    public static final int INTEGER_FIELD_NUMBER = 3;
    public static final int LONG_FIELD_NUMBER = 4;
    private static volatile P PARSER = null;
    public static final int STRING_FIELD_NUMBER = 5;
    public static final int STRING_SET_FIELD_NUMBER = 6;
    private int valueCase_ = 0;
    private Object value_;

    static {
        g gVar = new g();
        DEFAULT_INSTANCE = gVar;
        AbstractC0442u.j(g.class, gVar);
    }

    public static f D() {
        return (f) ((AbstractC0440s) DEFAULT_INSTANCE.c(5));
    }

    public static void l(g gVar, long j8) {
        gVar.valueCase_ = 4;
        gVar.value_ = Long.valueOf(j8);
    }

    public static void m(g gVar, String str) {
        gVar.getClass();
        str.getClass();
        gVar.valueCase_ = 5;
        gVar.value_ = str;
    }

    public static void n(g gVar, e eVar) {
        gVar.getClass();
        gVar.value_ = eVar;
        gVar.valueCase_ = 6;
    }

    public static void o(g gVar, double d8) {
        gVar.valueCase_ = 7;
        gVar.value_ = Double.valueOf(d8);
    }

    public static void p(g gVar, C0429g c0429g) {
        gVar.getClass();
        gVar.valueCase_ = 8;
        gVar.value_ = c0429g;
    }

    public static void q(g gVar, boolean z8) {
        gVar.valueCase_ = 1;
        gVar.value_ = Boolean.valueOf(z8);
    }

    public static void r(g gVar, float f3) {
        gVar.valueCase_ = 2;
        gVar.value_ = Float.valueOf(f3);
    }

    public static void s(g gVar, int i) {
        gVar.valueCase_ = 3;
        gVar.value_ = Integer.valueOf(i);
    }

    public static g v() {
        return DEFAULT_INSTANCE;
    }

    public final String A() {
        return this.valueCase_ == 5 ? (String) this.value_ : "";
    }

    public final e B() {
        return this.valueCase_ == 6 ? (e) this.value_ : e.m();
    }

    public final int C() {
        switch (this.valueCase_) {
            case u0.f15495q /* 0 */:
                return 9;
            case 1:
                return 1;
            case 2:
                return 2;
            case 3:
                return 3;
            case 4:
                return 4;
            case 5:
                return 5;
            case STRING_SET_FIELD_NUMBER /* 6 */:
                return 6;
            case DOUBLE_FIELD_NUMBER /* 7 */:
                return 7;
            case BYTES_FIELD_NUMBER /* 8 */:
                return 8;
            default:
                return 0;
        }
    }

    @Override // androidx.datastore.preferences.protobuf.AbstractC0442u
    public final Object c(int i) {
        P c0441t;
        switch (AbstractC1563h.c(i)) {
            case u0.f15495q /* 0 */:
                return (byte) 1;
            case 1:
                return null;
            case 2:
                return new T(DEFAULT_INSTANCE, "\u0001\b\u0001\u0000\u0001\b\b\u0000\u0000\u0000\u0001:\u0000\u00024\u0000\u00037\u0000\u00045\u0000\u0005;\u0000\u0006<\u0000\u00073\u0000\b=\u0000", new Object[]{"value_", "valueCase_", e.class});
            case 3:
                return new g();
            case 4:
                return new f(DEFAULT_INSTANCE);
            case 5:
                return DEFAULT_INSTANCE;
            case STRING_SET_FIELD_NUMBER /* 6 */:
                P p3 = PARSER;
                if (p3 != null) {
                    return p3;
                }
                synchronized (g.class) {
                    try {
                        c0441t = PARSER;
                        if (c0441t == null) {
                            c0441t = new C0441t();
                            PARSER = c0441t;
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                    break;
                }
                return c0441t;
            default:
                throw new UnsupportedOperationException();
        }
    }

    public final boolean t() {
        if (this.valueCase_ == 1) {
            return ((Boolean) this.value_).booleanValue();
        }
        return false;
    }

    public final C0429g u() {
        return this.valueCase_ == 8 ? (C0429g) this.value_ : C0429g.f8069s;
    }

    public final double w() {
        if (this.valueCase_ == 7) {
            return ((Double) this.value_).doubleValue();
        }
        return 0.0d;
    }

    public final float x() {
        if (this.valueCase_ == 2) {
            return ((Float) this.value_).floatValue();
        }
        return 0.0f;
    }

    public final int y() {
        if (this.valueCase_ == 3) {
            return ((Integer) this.value_).intValue();
        }
        return 0;
    }

    public final long z() {
        if (this.valueCase_ == 4) {
            return ((Long) this.value_).longValue();
        }
        return 0L;
    }
}
