Is a Rock and play safe for a newborn?

Can my baby sleep in a rock and play all night ? Safe ?