Effective Quantum Oscillator of a Cavity with Oscillating Parameters