Minor refactor: pull out a common method for oneof's and switch to template literal string formatting.
Minor refactor: pull out a common method for oneof's and switch to template literal string formatting.

gsuitedevs/browser-samples,gsuitedevs/browser-samples,googleworkspace/browser-samples,googleworkspace/browser-samples