Below are the three access levels from highest access (least-restrictive) to lowest access (most-restrictive)
Public access allows access to classes, structs, variables, etc from any file within the model, but more importantly outside the module if the external file imports the module containing the public access code. It is popular to use public access when you create a framework.
Internal access allows files only with the module of the entities to use the entities. All entities have internal acccess level by default (with a few exceptions).
Private access prevents the entity from being used outside of that file.
A subclass cannot have a higher access than its superclass.
If property’s setter is private the getter is internal (which is the default). Also you can assign access level for both the getter and the setter. These principles also apply to subscripts as well
Other entity types include: Initializers, Protocols, Extensions, Generics, and Type Aliases