(Also, make some public methods private) PiperOrigin-RevId: 481912071 (cherry picked from commit a404fde4)