class RemoteClusterResourceProvider extends AbstractAuthorizedResourceProvider {

  protected Resource toResource(Set<String> requestedIds, RemoteAmbariClusterEntity cluster) {
    Resource   resource   = new ResourceImpl(Resource.Type.RemoteCluster);
    setResourceProperty(resource, CLUSTER_NAME_PROPERTY_ID, cluster.getName(), requestedIds);
    setResourceProperty(resource, CLUSTER_ID_PROPERTY_ID, cluster.getId(), requestedIds);
    setResourceProperty(resource, CLUSTER_URL_PROPERTY_ID, cluster.getUrl(), requestedIds);
    setResourceProperty(resource, USERNAME_PROPERTY_ID, cluster.getUsername(), requestedIds);
    ArrayList<String> services = new ArrayList<>();
    for (RemoteAmbariClusterServiceEntity remoteClusterServiceEntity : cluster.getServices()) {
      services.add(remoteClusterServiceEntity.getServiceName());
    }
    setResourceProperty(resource, SERVICES_PROPERTY_ID,services, requestedIds);
    return resource;
  }

  protected  RemoteClusterResourceProvider();

}