package com.google.android.gms.auth.blockstore;

import android.os.Parcel;
import android.os.Parcelable;
import androidx.credentials.provider.CredentialEntry;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import defpackage.vo6;

/* JADX INFO: loaded from: classes2.dex */
@SafeParcelable.Class(creator = "StoreBytesDataCreator")
public class StoreBytesData extends AbstractSafeParcelable {

    @vo6
    public static final Parcelable.Creator<StoreBytesData> CREATOR = new zze();

    @SafeParcelable.Field(getter = "getBytes", id = 1)
    private final byte[] zza;

    @SafeParcelable.Field(defaultValue = CredentialEntry.FALSE_STRING, getter = "shouldBackupToCloud", id = 2)
    private final boolean zzb;

    @SafeParcelable.Field(defaultValue = BlockstoreClient.DEFAULT_BYTES_DATA_KEY, getter = "getKey", id = 3)
    private final String zzc;

    public static final class Builder {
        private byte[] zza;
        private boolean zzb;
        private String zzc = BlockstoreClient.DEFAULT_BYTES_DATA_KEY;

        @vo6
        public StoreBytesData build() {
            return new StoreBytesData(this.zza, this.zzb, this.zzc);
        }

        @vo6
        public Builder setBytes(@vo6 byte[] bArr) {
            this.zza = bArr;
            return this;
        }

        @vo6
        public Builder setKey(@vo6 String str) {
            Preconditions.checkNotEmpty(str, "key cannot be null or empty");
            this.zzc = str;
            return this;
        }

        @vo6
        public Builder setShouldBackupToCloud(boolean z) {
            this.zzb = z;
            return this;
        }
    }

    @SafeParcelable.Constructor
    public StoreBytesData(@SafeParcelable.Param(id = 1) byte[] bArr, @SafeParcelable.Param(id = 2) boolean z, @SafeParcelable.Param(id = 3) String str) {
        this.zza = bArr;
        this.zzb = z;
        this.zzc = str;
    }

    @vo6
    public byte[] getBytes() {
        return this.zza;
    }

    @vo6
    public String getKey() {
        return this.zzc;
    }

    public boolean shouldBackupToCloud() {
        return this.zzb;
    }

    @Override // android.os.Parcelable
    public void writeToParcel(@vo6 Parcel parcel, int i) {
        int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
        SafeParcelWriter.writeByteArray(parcel, 1, getBytes(), false);
        SafeParcelWriter.writeBoolean(parcel, 2, shouldBackupToCloud());
        SafeParcelWriter.writeString(parcel, 3, getKey(), false);
        SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
    }
}
