Optical temporal rogue waves in the generalized inhomogeneous nonlinear Schrödinger equation with varying higher-order even and odd terms