docs: function Resource(uri, context) {
        // This constructor does not use the automatically created object but instantiate from a subclass instead
  
        // Intermediate prototype to add profile-specific properties to
        var prototype = Object.create(Object.getPrototypeOf(this));
  
        // Current profile(s)
        var profile = null;
  
        // Instantiated object
        return Object.create(prototype, {
  
          /**
           * The resource URI.
           *
           * @property {string}
           */
          $uri: {value: uri},
  
          /**
           * The resource context. Can be used to get related resources.
           *
           * @property {ResourceContext}
           */
          $context: {value: context},
  
          /**
           * Links to other resources.
           *
           * @property {object}
           */
          $links: {value: {
            self: {
              href: uri
            }
          }, writable: true},
  
          /**
           * The timestamp of the last successful GET or PUT request.
           *
           * @property {number} Resource.syncTime
           * @see ResourceContext#markSynced
           */
          $syncTime: {value: null, writable: true},
  
          /**
           * The resource profile URI(s). If profile properties have been registered for this URI (using
           * HalContextProvider.registerProfile or ResourceContext.registerProfile), the properties will be defined on the
           * resource.
           *
           * Setting the profile to 'undefined' or 'null' will remove the profile.
           *
           * @property {string|string[]}
           */
          $profile: {
            get: function () {
              return profile;
            },
            set: function (value) {
              // Remove old profile properties
              if (profile) {
                var oldProfiles = angular.isArray(profile) ? profile : [profile];
                oldProfiles.forEach(function (profile) {
                  var properties = registeredProfiles[profile] || {};
                  Object.keys(properties).forEach(function (key) {
                    delete prototype[key];
                  });
                });
              }
  
              // Apply new profile properties
              if (value) {
                var newProfiles = angular.isArray(value) ? value : [value];
                newProfiles.forEach(function (profile) {
                  var properties = registeredProfiles[profile] || {};
                  Object.defineProperties(prototype, properties);
                });
              }
  
              profile = value;
            }
          }
        });
      }