API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21TypedData...
There are no docs on what "setInternal" or "internal" property does.
Some info is here: https://www.drupal.org/node/2916592 but far from complete explanation.
Proposed resolution
Add more information about the internal property:
/**
* Sets the whether the data value should be internal.
*
* Internal fields and properties should not be exposed to outside
* systems.
*
* This can be used in a scenario when it is not desirable to expose data of
* this entity type to an external system.
*
* The implications of this method are left to the discretion of the caller.
* For example, a module providing an HTTP API may not expose entities of
* this type or a custom entity reference field settings form may
* deprioritize entities of this type in a select list.
Remaining tasks
- Write patch
- Review and confirm documentation change is accurate
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A