package vf;

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

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

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

    public final void a(k3.c cVar, ServerEntity serverEntity) {
        switch (this.f33968a) {
            case 0:
                if (serverEntity.getId() != null) {
                    cVar.a(1, serverEntity.getId().intValue());
                } else {
                    cVar.d(1);
                }
                break;
            default:
                if (serverEntity.getId() == null) {
                    cVar.d(1);
                } else {
                    cVar.a(1, serverEntity.getId().intValue());
                }
                if (serverEntity.getServerName() == null) {
                    cVar.d(2);
                } else {
                    cVar.s(2, serverEntity.getServerName());
                }
                if (serverEntity.getUpdateAt() == null) {
                    cVar.d(3);
                } else {
                    cVar.a(3, serverEntity.getUpdateAt().intValue());
                }
                if (serverEntity.getCreateAt() == null) {
                    cVar.d(4);
                } else {
                    cVar.a(4, serverEntity.getCreateAt().intValue());
                }
                if (serverEntity.getRootPath() == null) {
                    cVar.d(5);
                } else {
                    cVar.s(5, serverEntity.getRootPath());
                }
                if (serverEntity.getBaseUrl() == null) {
                    cVar.d(6);
                } else {
                    cVar.s(6, serverEntity.getBaseUrl());
                }
                if (serverEntity.getUsername() == null) {
                    cVar.d(7);
                } else {
                    cVar.s(7, serverEntity.getUsername());
                }
                if (serverEntity.getPassword() == null) {
                    cVar.d(8);
                } else {
                    cVar.s(8, serverEntity.getPassword());
                }
                if (serverEntity.getServerType() == null) {
                    cVar.d(9);
                } else {
                    cVar.a(9, serverEntity.getServerType().intValue());
                }
                if (serverEntity.getPathId() == null) {
                    cVar.d(10);
                } else {
                    cVar.s(10, serverEntity.getPathId());
                }
                if (serverEntity.getVisible() == null) {
                    cVar.d(11);
                } else {
                    cVar.a(11, serverEntity.getVisible().intValue());
                }
                if (serverEntity.getId() != null) {
                    cVar.a(12, serverEntity.getId().intValue());
                } else {
                    cVar.d(12);
                }
                break;
        }
    }

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

    @Override // androidx.room.g
    public final String createQuery() {
        switch (this.f33968a) {
            case 0:
                return "DELETE FROM `server_entity` WHERE `id` = ?";
            default:
                return "UPDATE OR ABORT `server_entity` SET `id` = ?,`server_name` = ?,`update_at` = ?,`create_at` = ?,`root_path` = ?,`base_url` = ?,`username` = ?,`password` = ?,`server_type` = ?,`path_id` = ?,`visible` = ? WHERE `id` = ?";
        }
    }
}
