private Resource toResource(Integer permissionId, RoleAuthorizationEntity entity, Set<String> requestedIds) {
    Resource resource = new ResourceImpl(Type.RoleAuthorization);
    setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, entity.getAuthorizationId(), requestedIds);
    if (permissionId != null) {
      setResourceProperty(resource, PERMISSION_ID_PROPERTY_ID, permissionId, requestedIds);
    }
    setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, entity.getAuthorizationName(), requestedIds);
    return resource;
  }
Creates a new resource from the given RoleAuthorizationEntity and set of requested ids.

@param entity       the RoleAuthorizationEntity
@param requestedIds the properties to include in the resulting resource instance
@return a resource
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProvider.java