NOTE: This site is deprecated. The site will be turned down after January 31, 2023, and traffic will redirect to the new site at In the meantime, updates will be made only to


Stay organized with collections Save and categorize content based on your preferences.


[JVM] @Target(allowedTargets = [AnnotationTarget.CONSTRUCTOR, AnnotationTarget.ANNOTATION_CLASS])

annotation class OnlyForUseByGeneratedProtoCode

Opt-in annotation to make it difficult to accidentally use APIs only intended for use by proto generated code. See for details on how this API works.


OnlyForUseByGeneratedProtoCode [JVM] fun OnlyForUseByGeneratedProtoCode()