package ra;

import com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite$MethodToInvoke;
import com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException;
import java.io.InputStream;

/* JADX INFO: loaded from: classes2.dex */
public final class d1 extends com.google.crypto.tink.shaded.protobuf.x implements com.google.crypto.tink.shaded.protobuf.p0 {
    private static final d1 DEFAULT_INSTANCE;
    public static final int KEY_FIELD_NUMBER = 2;
    private static volatile com.google.crypto.tink.shaded.protobuf.v0 PARSER = null;
    public static final int PRIMARY_KEY_ID_FIELD_NUMBER = 1;
    private com.google.crypto.tink.shaded.protobuf.a0 key_ = com.google.crypto.tink.shaded.protobuf.x0.f23987e;
    private int primaryKeyId_;

    static {
        d1 d1Var = new d1();
        DEFAULT_INSTANCE = d1Var;
        com.google.crypto.tink.shaded.protobuf.x.z(d1.class, d1Var);
    }

    public static void D(d1 d1Var, int i10) {
        d1Var.primaryKeyId_ = i10;
    }

    public static void E(d1 d1Var, c1 c1Var) {
        d1Var.getClass();
        com.google.crypto.tink.shaded.protobuf.a0 a0Var = d1Var.key_;
        if (!((com.google.crypto.tink.shaded.protobuf.c) a0Var).f23887a) {
            d1Var.key_ = a0Var.d(a0Var.size() * 2);
        }
        d1Var.key_.add(c1Var);
    }

    public static a1 J() {
        return (a1) DEFAULT_INSTANCE.j();
    }

    public static d1 K(InputStream inputStream, com.google.crypto.tink.shaded.protobuf.q qVar) throws InvalidProtocolBufferException {
        com.google.crypto.tink.shaded.protobuf.l kVar;
        d1 d1Var = DEFAULT_INSTANCE;
        if (inputStream == null) {
            byte[] bArr = com.google.crypto.tink.shaded.protobuf.b0.f23883b;
            kVar = com.google.crypto.tink.shaded.protobuf.l.f(bArr, 0, bArr.length, false);
        } else {
            kVar = new com.google.crypto.tink.shaded.protobuf.k(inputStream);
        }
        com.google.crypto.tink.shaded.protobuf.x xVarY = com.google.crypto.tink.shaded.protobuf.x.y(d1Var, kVar, qVar);
        com.google.crypto.tink.shaded.protobuf.x.g(xVarY);
        return (d1) xVarY;
    }

    public static d1 L(byte[] bArr, com.google.crypto.tink.shaded.protobuf.q qVar) {
        return (d1) com.google.crypto.tink.shaded.protobuf.x.x(DEFAULT_INSTANCE, bArr, qVar);
    }

    public final c1 F(int i10) {
        return (c1) this.key_.get(i10);
    }

    public final int G() {
        return this.key_.size();
    }

    public final com.google.crypto.tink.shaded.protobuf.a0 H() {
        return this.key_;
    }

    public final int I() {
        return this.primaryKeyId_;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.x
    public final Object k(GeneratedMessageLite$MethodToInvoke generatedMessageLite$MethodToInvoke) {
        int iOrdinal = generatedMessageLite$MethodToInvoke.ordinal();
        if (iOrdinal == 0) {
            return (byte) 1;
        }
        if (iOrdinal == 2) {
            return new com.google.crypto.tink.shaded.protobuf.y0(DEFAULT_INSTANCE, "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0001\u0000\u0001\u000b\u0002\u001b", new Object[]{"primaryKeyId_", "key_", c1.class});
        }
        if (iOrdinal == 3) {
            return new d1();
        }
        if (iOrdinal == 4) {
            return new a1(DEFAULT_INSTANCE);
        }
        if (iOrdinal == 5) {
            return DEFAULT_INSTANCE;
        }
        if (iOrdinal != 6) {
            throw null;
        }
        com.google.crypto.tink.shaded.protobuf.v0 wVar = PARSER;
        if (wVar == null) {
            synchronized (d1.class) {
                try {
                    wVar = PARSER;
                    if (wVar == null) {
                        wVar = new com.google.crypto.tink.shaded.protobuf.w();
                        PARSER = wVar;
                    }
                } finally {
                }
            }
        }
        return wVar;
    }
}
