package vf;

import xyz.stream.api.database.entity.IptvEntity;

/* JADX INFO: loaded from: classes3.dex */
public final class l extends androidx.room.g {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f33979a;

    public final void a(k3.c cVar, IptvEntity iptvEntity) {
        switch (this.f33979a) {
            case 0:
                if (iptvEntity.getId() != null) {
                    cVar.a(1, iptvEntity.getId().intValue());
                } else {
                    cVar.d(1);
                }
                break;
            default:
                if (iptvEntity.getId() == null) {
                    cVar.d(1);
                } else {
                    cVar.a(1, iptvEntity.getId().intValue());
                }
                if (iptvEntity.getName() == null) {
                    cVar.d(2);
                } else {
                    cVar.s(2, iptvEntity.getName());
                }
                if (iptvEntity.getLogo() == null) {
                    cVar.d(3);
                } else {
                    cVar.s(3, iptvEntity.getLogo());
                }
                if (iptvEntity.getUrl() == null) {
                    cVar.d(4);
                } else {
                    cVar.s(4, iptvEntity.getUrl());
                }
                if (iptvEntity.getGroupTitle() == null) {
                    cVar.d(5);
                } else {
                    cVar.s(5, iptvEntity.getGroupTitle());
                }
                if (iptvEntity.getExtra() == null) {
                    cVar.d(6);
                } else {
                    cVar.s(6, iptvEntity.getExtra());
                }
                if (iptvEntity.getServerId() == null) {
                    cVar.d(7);
                } else {
                    cVar.a(7, iptvEntity.getServerId().intValue());
                }
                if (iptvEntity.getCreatedAt() == null) {
                    cVar.d(8);
                } else {
                    cVar.a(8, iptvEntity.getCreatedAt().intValue());
                }
                if (iptvEntity.getUpdatedAt() == null) {
                    cVar.d(9);
                } else {
                    cVar.a(9, iptvEntity.getUpdatedAt().intValue());
                }
                if (iptvEntity.getId() != null) {
                    cVar.a(10, iptvEntity.getId().intValue());
                } else {
                    cVar.d(10);
                }
                break;
        }
    }

    @Override // androidx.room.g
    public final /* bridge */ /* synthetic */ void bind(k3.c cVar, Object obj) {
        switch (this.f33979a) {
            case 0:
                a(cVar, (IptvEntity) obj);
                break;
            default:
                a(cVar, (IptvEntity) obj);
                break;
        }
    }

    @Override // androidx.room.g
    public final String createQuery() {
        switch (this.f33979a) {
            case 0:
                return "DELETE FROM `iptv_entity` WHERE `id` = ?";
            default:
                return "UPDATE OR ABORT `iptv_entity` SET `id` = ?,`name` = ?,`logo` = ?,`url` = ?,`group_title` = ?,`extra` = ?,`server_id` = ?,`created_at` = ?,`updated_at` = ? WHERE `id` = ?";
        }
    }
}
