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